RichFaces 4.5.15 x panelBorderRadius

35 Views Asked by At

I have tried to configure panelBorderRadius creating a new skin (from https://docs.jboss.org/richfaces/latest_4_5_X/Developer_Guide/en-US/html/chap-Developer_Guide-Skinning_and_theming.html#sect-Developer_Guide-Customizing_skins-Creating_a_new_skin) but it didn't work. I use packed compressed css/js files from RichFaces and somewhere said that it is a problem.

Also I tried all from this (How to customize SKIN in Richfaces?) but it didn't work too.

Also I extracted the richfaces-core.jar and changed the classic skin, putting panelBorderRadius=5px, rebuilt the jar file, but none worked.

1

There are 1 best solutions below

2
Makhiel On

If you want to use packed compressed resources you need to generate them yourself. This is why changing the skin properties in the core JAR doesn't work, it doesn't affect the actual resource files.

There is a plugin for that:

<plugin>
 <groupId>org.richfaces.cdk</groupId>
 <artifactId>maven-richfaces-resources-plugin</artifactId>
 <version>${richfaces.version}</version>
 <configuration>
      <skins>
           <skin>your_skin</skin>
      </skins>
      <includedContentTypes>
           <include>text/css</include>
           <include>image/.+</include>
      </includedContentTypes>
      <fileNameMappings>
            <property>
                 <name>^.+/([^/]+\.(png|gif|jpg))$</name>
                 <value>org.richfaces.images/$1</value>
            </property>
            <property>
                 <name>^.+/([^/]+\.css)$</name>
                 <value>org.richfaces.css/$1</value>
            </property>
      </fileNameMappings>
 </configuration>
 <executions>
      <execution>
           <id>process-resources</id>
           <goals>
                <goal>process</goal>
           </goals>
           <configuration>
                <staticResourceMappingFile>${project.build.outputDirectory}/META-INF/richfaces/your_skin-packedcompressed-resource-mappings.properties</staticResourceMappingFile>
                <resourcesOutputDir>${project.build.outputDirectory}/META-INF/resources/org.richfaces.staticResource/${richfaces.version}/PackedCompressed/</resourcesOutputDir>
                <staticResourcePrefix>org.richfaces.staticResource/${richfaces.version}/PackedCompressed</staticResourcePrefix>
                <pack>true</pack>                            
                <compress>true</compress>
           </configuration>
      </execution>
 </executions>
</plugin>

For more detail refer to the plugin docs or this old blog post of mine.