javaweblogicoracle-adftrinidad

ADF skin styles loading wrong classes


I have an ADF application already deployed to an EAR file. Currently, the same application is running in three different enviornments in all of them over a WebLogic 11g server.

However, in a fourth (dev) environment (a fresh install of WebLogic 11g), I have a different display of some elements of the application.

I checked the HTML recieved by the client and the problem lies in that the name of the classes (supposedly autogenerated by ADF) are different in this fourth environment (despite the fact that exactly the same EAR is being ran in the server). So, some of the css rules are not applied because they reference other css classes.

I thought this might be an Apache Trinidad configuration issue (maybe I'm inheriting from a different skin as the base one?), but all the configurations files I've found lie inside the project itself (i.e. trinidad-skins.xml, trinidad-config.xml, web.xml) and since the same project works on other environments, I think that's not the issue.

My doubt here is: What should I check to compare the working environments with the newer one? What system-wise configuration or library could be the cause of this?


HTML/CSS sample with pictures


Working environment (correct display)

enter image description here






New environment (wrong display) enter image description here

As you may notice in the pictures, the loaded classes are different. Since the recieved sheet estilos_mw.css is exactly the same one for both applications, its rules don't apply in the new environment (in this case, a rule targeting .x14m elements).

Another difference are the generated fusionFx CSS's, but I'm not sure if the issue lies there and how to check it.

Thanks in advance.


Solution

  • Well, you doing it wrong. This is autogenerated classes and there is absolutelty no guarantee that it will stay the same.

    1. Read about skinning in ADF and use skin instead of plain css file. Actually it will look almost like css with some enchantement, however this file will be processed by skinning engine (somewhat like SASS). This way css will be generated from the skin file and your custom rules will point to the right classes. Also there are special version of jdeveloper - Skin Editor (this version will work for 11g too), that can aid you in skin development.
    2. You can disable css classes minifying by disabling content compression.
      To do so you need to add (or change) following Context Initialization Parameter org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION to true
      in web.xml. This way you will get actual css classes name that won't change at runtime.
      While this may be pretty helpfull at development stage, however it doesn't recommended to use on production environment since can cause perfomance issues.