Adf faces skin-family change for page or component

I know how to change this by editing adf-faces-config.xml tile. Is it possible to change the skin-family at a page level or for even for an individual component?

You can change the skin at the page level by setting the value of the skin-family property to an expression language:
<adf-faces-config xmlns="http://xmlns.oracle.com/adf/view/faces/config">
<skin-family>#{skinFamily.skinSelection}</skin-family>
</adf-faces-config>
Where skinFamily is a managed bean and skinSelecion can be implemented as follows:
public String getSkinSelection()
FacesContext context = FacesContext.getCurrentInstance();
UIViewRoot viewRoot = context.getViewRoot();
String viewId = viewRoot.getViewId();
System.out.println(viewId);
if ( viewId.startsWith("/blaf/") ) {
skinSelection = "oracle";
else if ( viewId.startsWith("/minimal/") ) {
skinSelection = "minimal";
else if ( viewId.startsWith("/vantive/") ) {
skinSelection = "vantive";
return skinSelection;
If you want to have two components, let's say, two tables, at the same page but with a different style you can accomplish that by using the inline-style tag.
[]'s

Similar Messages

  • Problem with a example of "Developing and Using ADF Faces Skins"

    Hi, I've tried the example "Developing and Using ADF Faces Skins", but when I run the sample.jspx page and choose the skin "MyCompany" in the select skin I obtain the next message:
    java.lang.NullPointerException
    at oracle.adfinternal.view.faces.ui.laf.simple.desktop.SideBarRenderer._getIconData(SideBarRenderer.java:393)
    at oracle.adfinternal.view.faces.ui.laf.simple.desktop.SideBarRenderer.prerender(SideBarRenderer.java:83)
    at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:79)
    Could somebody help me?
    Thanks a lot ;-)

    Hi there,
    I had the same issue last friday.
    It's probably because you are using JDeveloper 10.1.3.2 instead of 10.1.3.0 or 10.1.3.1 for which the example is made.
    I haven't been able to fix this yet, other then by commenting out the this part of the css.
    Luc Bors
    Message was edited by:
    lucbors

  • ADF Faces Skins Not Working

    I can't seem to get my ADF faces skins to register at all. I have a css file, an adf-faces-skins.xml file, and a <skin-family> element in my adf-faces-config.xml file, but to no avail.
    One possible hint--I think I might not be getting access to the appropriate XML namespace in my adf-faces-skins.xml file. I can't, for example, get code insight to work there ("No insight available"). I'm using
    <skins xmlns="http://xmlns.oracle.com/adfview/faces/skin">
    which looks like it's right out of the help. Am I missing a library of some sort?
    Thanks much,
    Avrom

    Yes, I have, and I don't see anything I've done substantially differently from there--with the exception of adding a new version of Faces to my project. I assume I don't have to do that if I'm using 10.1.3 Production (the HowTo says it's a "more recent" version of Faces, but it was written against EA 1).

  • Problem in Developing and Using ADF Faces Skins sample

    sample.jspx dose not have “Select Skin” box as the document shown.
    I am trying the sample project downloaded from sample WAR file - adffaces_skin.war in article “Developing and Using ADF Faces Skins”.
    In paragraph “Changing the Color Schema of a Skin”
    sample.jspx has a “Select Skin” box to allow user to select “Simple” or “MyCompany”. (in JSP Visual Editor)
    However, it does not show on the project built from downloaded from sample WAR file (adffaces_skin.war).

    After reading the whole document, I realize it is my mistake.
    The box will be created after all user skins setting.
    The sample works.
    Only thing need to remind is for later version Jdeveloper, Application Worksapce in only for early version Jdeveloper. All the version after 10g 1.3 EA1, Only have Application.

  • ER: ADF Faces Skins: "Unknown pseudo class:alias"

    Hi,
    I'm trying to create an ADF Faces Skin, by overriding aliases in my own CSS file.
    The code editor, however, is hilighting the word "alias" every time I use it (as in ".AFDarkBackground:alias") in red, and the error "Unknown pseudo class:alias" appears both on a popup and in the Structure Pane under "CSS Errors." Is Can I ignore this, or am I doing something wrong? Do I need to import some base CSS that defines the pseudo class? The sample from the HowTo doesn't seem to, but then it shows up with the same CSS Errors.
    Best,
    Avrom
    Message was edited by:
    [email protected]
    Changed topic title to reflect request for enhancement farther down.

    Thanks!
    I think I'll edit the title of this to contain ER: ... it would be very nice if it were possible to turn off this bit of validation. I can imagine varying degrees of "smartness" for such a feature--from a manual "accept simple desktop pseudoclasses" option to automatically checking to see if the CSS is listed in an adf-faces-skins.xml file or is imported by any CSS files that are.

  • Need file adf-faces-skins-doc.xml

    Hi
    I have down loaded the latest ADF release. I want to customize the ADF skins, I am not able to find file adf-faces-skins-doc.xml in skins folder which explains the Style sheet attributes of the ADF component.
    Can any one please send me this file or tell me the location on internet where I can find it.
    Thanks

    Hi!
    Download the sample application. The file you're searching for should be inside the warfile.
    http://www.oracle.com/technology/products/jdev/101/howtos/adfskins/adffaces-skin.war
    Claus

  • How to apply New ADF Faces Skin into JHeadStart Application

    Hi
    I have downloaded the new skins such as srdemo,mycompany..
    I have only changed skinfamily value in adf-faces-config file but when i generate application with JAG the new skin does not apply it.
    Can anybody help me what's the problem?
    thanks

    This should work fine. Did you accidently re-enable JHeadstart on your project? This wil overwrite adf-faces-config.xml again, so double check your skin family is specified correctly.
    Steven Davelaar,
    JHeadstart Team.

  • Using ADF Faces Skins

    I'm looking for a reference on deploying Skins with ADF Faces. The published howto on OTN is'nt very helpful because the sample code link is broken (See my previous post). The JDeveloper help files are somewhat helpful but I'm looking for a working example. I'm following the technique as implemented in SRDEMO but I must be missing something as my style sheet changes are not showing up.
    It would be nice if someone from Oracle could look into fixing the link to the sample code for:
    http://www.oracle.com/technology/products/jdev/101/howtos/adfskins/index.html
    I think if I had a working example that allows skins to change at runtime I would be able to figure out what I'm missing. I have been trying access the link for a couple days now and no one has reponded to any of my requests.

    The link to http://www.oracle.com/technology/products/jdev/101/howtos/adfskins/adffaces-skin.war
    seems to work for me.
    In any case to change the skin you are using you change the adf-faces-config.xml file.
    To get it to change at runtime - just put a reference to a value in a backing bean instead of the fixed "oracle" and then change the value in the bean at runtime.

  • ADF Faces & BC: Best pratices for project layout

    Season greetings my fellow JDevelopers!
    Our software group has been working with ADF for around 5 years and through the years we have accumulated a good amount of knowledge working with JDeveloper and ADF. Much of our current application structure has been resurrected in the early days of JDeveloper 10 where there were more samples codes floating around then there were "best pratice" documentation. I understand this is a subjective topic and varies site to site, but I believe there is a set of common practices our group has started to identify as critical to streamlining a development process(reusable decorated ui components, modular common biz logic, team development with svn, continuous integration/build, etc..). One of our development goals is to minimize dependency between each engineer as everyone is responsible for both client and middle layer implementation without losing coding consistency. After speaking with a couple of the aces at the last openworld, I understand much of our anticipated architectural requirements are met with JDeveloper 11(with the introduction of templates, declarative components, bounded task flows, etc..) but due to time constraints on upcoming deliverables we are still about an year away before moving on with that new release. The following is a little bit about our group/application.
    JDeveloper version: 10.1.3.4
    Number of developers: 7
    Developer responsibilties: Build both faces & bc code
    We have two applications currently in our production environments.
    1.A flavor of Steve Muench's dynamic jdbc credentials login module
    2.Core ADF Faces & BC application
    In our Core ADF Faces application, we have the following structure:
    OurApplication
         -OurApplicationLib (Common framework files)
         -OurApplicationModel (BC project)
              -src/org/ourapp/module1
              -src/org/ourapp/module2
         -OurApplicationView (Faces project)
              public_html/ourapp/module1
              public_html/ourapp/module2
              src/org/ourapp/backing/module1
              src/org/ourapp/backing/module2
              src/org/ourapp/pageDefs/
    Total Number of Application Modules: 15 (Including one RootApplicationModule which references module specific AMs)
    Total Number View Objects: 171
    Total Number of Entities: 58
    Total Number of BC Files: 1734
    Total Number of JSPs: 246
    Total Number of pageDefs: 236
    Total Number of navigation cases in faces-config.xml: 127
    Total Number of application files: 4183
    Total application size: 180megs
    Are there any other ways to divide up this application? Ie: module specific projects with seperate faces-config files/databindings? If so, how can these files be "hooked" together? A couple of the aces has recommended that we should separate all the entity files into its own project which make sense. Also, we are looking into the maven builds which should remove those pesky model.jpr files that constantly gets “touched”. I would to love hear how other groups are organizing their application and anything else they would like to share as an ADF best pratice.
    Cheers,
    Wes

    After discussions over the summer/autumn by members of the ADF Methodology Group I have published an ADF Coding Standards wiki page that people may find useful:
    [http://wiki.oracle.com/page/ADF+Coding+Standards]
    It's aimed at ADF 11g and is intended to be a living document - if you have comments or suggestions please post them to the ADF Methodology google group ( [http://groups.google.com/group/adf-methodology?hl=en] ).

  • ADF Faces and multiframe window for master/detail view

    Hi,
    I have a web page divide into 2 frames : frame1, the master view and frame2 the detail view.
    When I load the whole web page, the master frame print all the paginated list. Each row has a "show more" button. When I click one, the corresponding detail view is displayed in the detail view (frame2). And, when I clicked again the "show more" button, the paginated list (present in the master view) is displayed in the detail view !!! WHY ??
    When I click a third time on the "show more" button, the detail view display the corresponding detail information (work well like first click)....and alternatively clicking on the "show more" button, this problems occurs.
    Where does this problem come from ?
    The ADF Faces code shown in the master view (targetFrame attribute means to display on the detail view when show more button is clicked).
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!-- table displaying the list of buildings -->
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
         xmlns:af="http://xmlns.oracle.com/adf/faces">
         <jsp:directive.page contentType="text/html;charset=utf-8" />
         <f:view >
              <af:document title="List of buildings" >
                   <af:form >
                        <af:panelPage title="Show the list of buildings">
                             <af:table var="building" value="#{buildingsBean.buildingsList}">
                                  <af:column>
                                       <af:outputText value="#{building.name}" />
                                  </af:column>
                                  <af:column>
                                       <af:outputText value="#{building.objectId}" />
                                  </af:column>
                                  <af:column>
                                       <af:commandButton text="Show more"
                                            action="#{adfMasterSlaveBackingBean.showBuilding}" >
                                       </af:commandButton>
                                  </af:column>
                             </af:table>
                        </af:panelPage>
                   </af:form>
              </af:document>
         </f:view>
    </jsp:root>

    Yes I put a targetFrame (I forgot to restablish it).
    Code of the backing bean (to show building list) :
    public List getBuildingsList() throws Exception {
              System.out.println("getBuildings");          
              CLPNetworkInstanceAPI netAPI = CLPNetworkInstanceAPI.getNetworkInstanceAPI();
              buildingsList.clear();
    try {
         CTResource resources[] = netAPI.fetchAllResourcesByType("CLPRMBuilding");      
                   for (int i=0; i<resources.length;i++)
                        buildingsList.add(resources);
              } catch (CTConnectionException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (CTUnsupportedTypeException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              return buildingsList;
    and the backing bean to show building detail :
    public String showBuilding() {
              FacesContext context = FacesContext.getCurrentInstance();
              CLPRMBuilding building = (CLPRMBuilding)
         context.getApplication().getVariableResolver().resolveVariable(context, "building");
         if (building == null)
         return "error";
         AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
         afContext.getProcessScope().put("buildingDetail", building);
         return "showBuilding";

  • ADF Faces Components and HTML/JSP Pages

    We would like to create HTML/JSP pages and include some of the ADF Faces Components; ie: date picker, radio buttons, etc.
    When we develop this type of page, upon running in the embedded OC4J, the HTML is processed first and then the ADF Faces Components are processed. In the design panel/editor, everything is in the correct sequence. Upon running in the OC4J, it doesn't matter where in the code we place the ADF Faces Components, these ADF Faces Components always appear at the end of the other HTML and JSF Faces components in the displayed page.
    How can we mix the two technologies? ADF Faces alone is not flexible enough for our needs. We want to use the JSP:include tag for reusable code which works fine in a HTML/JSP page, but not in a ADF Faces PanelPage or PanelBorder or anything similar.
    We're running the EA17 version of the tag library.
    Can we mix the technologies? What are we missing? Is this an issue with the embedded OC4J? Will it make a difference if we develop JSP pages as pure JSP or the JSPX option?
    Thank you.
    Message was edited by:
    [email protected]

    The following tag lib allowed me to mix HTML and JSF tags (not sure about other JSP tags though). Hope this helps:
    http://jsftutorials.net/htmLib/
    Chris

  • ADF Faces skins problems using libraries

    Hi,
    I have been trying to use the tutorial on the following website:
    http://www.oracle.com/technology/products/jdev/101/howtos/adfskins/index.html
    This shows you how to create skins and things. The only problem is that I cannot see the view that is shown in the screenshot. I.e. I get a load of garbled gabage showing me the tags in the document instead of whats visually there.
    I realise this is a problem with the library but everytime I try and set up the JSF and ADF libraries in the JSP Tag libraries of Tools->Manage Libraries I click the Execute Tags in JSP Visual Editor it lets me do it but then I click refresh on the window with sample.jspx in it and JDeveloper just dies.
    The libraries I am using I have downloaded and followed the instructions on
    http://www.oracle.com/technology/products/jdev/howtos/10g/jsf_howto/jsf.html
    To do the JSF libraries and I have followed the same instructions for the ADF libraries. If anyone has any idea I would be glad of the help
    Cheers
    Daniel

    I tried the same example and it is working fine with me. May I know the JDeveloper version you are using?

  • ADF FACES: how to make a page re-render after returning from a dialog

    Using EA15.
    I am using a process to display a confirmation dialog to the user. However, when the dialog exits, the previous page is not re-rendered. The result of the operation that was confirmed by the dialog makes numerous changes to the underlying model that affect the layout of the original page. All these changes are made in the return listener.
    How can I force the original page (the one that launched the process) to fully re-render upon return?
    Thanks.

    Thanks Adam, but no luck.
    My situation is slightly different then the original poster's. I have a table with a 'add row' button in the header, and a 'modify row' button in each row. They both point at the same dialog to enter multiple data attributes about that row of data from a collection in the model. The 'modify row' pops a dialog and modifies item fine, but doesn't re-render the table automatically on return. If user performs any action on the page, the resulting table will then show the correct data. The 'add row' button on the header, but otherwise identical, modifes and re-renders correctly.
    I would think this is a fairly common use case. Anyone have example code of this that can be shared? The ADF dialog demo only modifies a single uicomponent, not the entire row or table. And we have other code which demonstrates that works fine.
    Is there a problem with a row button return listener adding a partial target of the table in which is resides? Whereas the header button (being outside of the table?) is capable of adding the table as a partial target?
    Table.jsp:
    <af:table value="#{formBean.dataBean.collection}" var="row" binding="#{formBean.table}">
    <af:column>
    <af:outputText value="#{row.attr1}"/>
    </af:column>
    <af:column>
    <af:outputText value="#{row.attr2}"/>
    </af:column>
    <af:column>
    <af:commandButton text="Modify..." action="#{formBean.modifyAction}" partialSubmit="true" useDialog="true" returnListener="#{formBean.dialogReturned"/>
    </af:column>
    <f:facet name="actions">
    <af:commandButton text="Add Row..." action="#{formBean.addAction}" partialSubmit="true" useDialog="true" returnListener="#{formBean.dialogReturned"/>
    </f:facet>
    </af:table>
    FormBean.java
    public void dialogReturned(ReturnEvent event) {
    Item item = (Item) event.getReturnValue();
    if (! dataBean.collection.contains(item) {
    dataBean.collection.add(item);
    table.setValue(dataBean.collection);
    AdfFacesContext.getCurrentInstance().addPartialTarget(table);
    DialogForm.java
    public String submitAction() {
    // perform some work against the row item AdfFacesContext.getCurrentInstance().returnFromProcess(item);
    ...

  • Community Effort : ADF Faces Skinning Workflow Pattern

    All,
    in the Blog entry below, I started the outline of a skinning work flow that should help new skin developers to walk on a beaten path instead of wasting their time in heading into the wrong direction. This thread here is to gather community feedback - including yours - of what steps should be added to this flow. Note that this entry is not for discussing skinning problems but sharing what has helped you in the past to build new skins. Its all about methodology (sorry Chris, I should have posted this on the EMG first, maybe you guys can chime in). Just in case, if there is an ER you see for the skin editor, start your post with ER - but make sure you stay realistic and focused ;-)
    http://blogs.oracle.com/jdevotnharvest/
    Frank

    Hi Frank,
    A few questions, largely on ADF Skin Editor (Standalone) Vs JDeveloper R2
    1. In the ADF Skin Editor(ASE), the Images section of the editor, for a skin, shows up a blank screen with below entry in logs
    Dec 21, 2011 11:43:48 PM oracle.adfdtinternal.view.rich.skins.editor.imagizer.ImagesMetadata$DefaultColorProfileCache create
    INFO: ImagesMetadata: calculating base color: 494 ms.
    This works in JDeveloper R2 release though.
    2. While trying to extend fusion.desktop screen, I have observed, the version of fusion-desktop.css in ASE is vastly different from the fusion-desktop.css in JDeveloper R2.
    For instance : in R2's version of CSS I can not find the selectors for af|PanelBox light Background. (and thus missing the image files needed for light Background of a panelBox)
    The combination of both 1 and 2 above is acting as a roadblock in my attempt to create a custom skin for one of the Customer POC's, need to generate image files with custom colors to be used largely in layout components.
    Any help regarding this would be greatly appreciated.
    Thank you.
    - Hemant

  • ADF Faces: Differring text sizes for AFFieldText and AFFieldTextDisabled

    I have found differing texts sizes in the generated css file for AFFieldText, AFFieldTextDisabled. Does anyone know the best way to fix this?

    I double checked and there was nothing in the WEB-INF/temp but the file was in the application-deployments/ directory. The contents of which are:
    more oracle-desktop-10_1_3_0_4-en-ie-6-windows-s.css
    /* CSS file generated on Tue Jan 31 14:24:27 EST 2006 */
    .AFInstructionText,.x0,.AFFieldText,.x6,.AFFieldTextLTR,.x42,.AFPhoneFieldText,.
    x44,.AFPostalCodeFieldText,.x46,.AFAddressFieldText,.x48,.PortletText1,.x6t,.Por
    tletText2,.x6u,.PortletText3,.x6v,.PortletText4,.x6w,.portlet-form-field,.x7l,.O
    raMessageBoxText,.x8p {font-family:Arial,Helvetica,Geneva,sans-serif;font-weight
    :normal;font-size:smaller;color:#000000}
    .AFInstructionTextDisabled,.x1,.AFFieldTextDisabled,.x7,.AFFieldTextLTRDisabled,
    .x43,.AFPhoneFieldTextDisabled,.x45,.AFPostalCodeFieldTextDisabled,.x47,.AFAddre
    ssFieldTextDisabled,.x49,.portlet-font-dim,.x6y {font-family:Arial,Helvetica,Gen
    eva,sans-serif;font-weight:normal;font-size:small;color:#999999}

Maybe you are looking for