ADF Faces: af:column and styleClass

The styleClass attribute of the af:column tag does not seem to have any effect. Do styleClass and inlineStyle only work with certain ADF Faces tags?
For example,
<af:column styleClass="headerXXSmall">
<f:facet name="header"><af:outputText value="First Name"/></f:facet>
<af:commandLink action="#{tabularBB.editLinkAction}">
<af:outputText value="#{row.firstName}"/>
</af:commandLink>
</af:column>
produces the following html. My "headerXXSmall" style class is ignored in favor of the ADF "xd" style class.
<td headers="M__Ida" class="x1l x4x">
<span class="headerXXSmall">
<a onclick="submitForm('_id3',1,{source:'_id3:_id4:0:_id8'});return false;" href="#" class="xd">Fred
</a>
</span>
</td>

Hallo,
Did anyone find ever a solution for that?
I have tried it with the following:
<af:column headerText="#{bindings.findAllFonds1.labels.quSt}" sortProperty="quSt" sortable="false" styleClass="myStyle">
... looking at the generated HTML, I don't see anything.
Thx, Willi

Similar Messages

  • ADF FACES: af:table and complex column data

    Using EA15.
    I want to use an af:table to allow the in-place editing of the data. However, I have some fields that are not simple text entry fields. Two of them would ideally use af:selectOneList elements. This doesn't work given the limitations of how af:column elements work.
    Is there anyone out there creating complex, in-place edit tables? If so, how are you doing it?
    Thanks.

    I was mistakenly believing that you couldn't use a selectOneChoice in an af:table given some experimentation where they simply failed to render at all.
    It turns out that I had a hadn'e created the appropriate setter method for the property. However, instead of making the data readOnly (as most of the ADF FACES controls do) it just didn't render anything. Thus making me think it just didn't work inside of a table.
    FYI - in case this happens to anyone else.

  • Problems with combination of ADF Faces, Tomahawk, Facelets and MyFaces

    Hello,
    I am trying to combine all things named in the Subject and run into several problems:
    1. ADF Render Kit forces the Tomahawk Components to be rendered in a wrong way or stop there functionality.
    Example 1: The clickable parts of the t:dataScroller Tag can not be accessed because an empty a Tag will be rendered after the outputText.
    Example 2: The t:commandSortHeader Tag can be clicked but the table content will not be sorted anymore.
    The given examples works if i remove the default-render-kit-id element from the faces-config.xml
    2. The ad:table Tag runs into an ClassCastException, only when I put a simple example code snipped into my xhtml file.
    Code snipped:
    <af:table>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Firstname"/>
    </f:facet>
    </af:column>
    <af:column>
    <f:facet name="header">
    <h:outputText value="Lastname"/>
    </f:facet>
    </af:column>
    </af:table>
    The stack trace look like this:
    java.lang.ClassCastException at oracle.adfinternal.view.faces.renderkit.core.xhtml.DesktopTableRenderer._renderRegularColumns(DesktopTableRenderer.java:1029)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.DesktopTableRenderer.renderSingleRow(DesktopTableRenderer.java:109)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.TableRenderer.encodeAll(TableRenderer.java:229)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.DesktopTableRenderer.encodeAll(DesktopTableRenderer.java:79)
         at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)
         at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
         at oracle.adf.view.faces.component.UIXCollection.encodeEnd(UIXCollection.java:438)
         at oracle.adfinternal.view.faces.renderkit.RenderUtils.encodeRecursive(RenderUtils.java:54)
         at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:232)
         at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeAllChildren(CoreRenderer.java:255)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:65)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:117)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:147)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:60)
         at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)
         at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
         at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
         at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
         at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:521)
         at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    I followed all steps for the ADF installation and the suggested steps for using ADF with Facelets.
    Used versions:
    - Oracle ADF Faces 10.1.3 Early Access
    - myFaces 1.1.1
    - Facelets 1.1.1
    - oc4j 10.1.2.0.2
    Has somebody try to use these things together, too?
    Thanks,
    Carsten

    Hi,
    Inside our fusion applications(ADF/Webcenter) using combination of JSTL and ADF Faces is good practice or pitfal?
    To suggest a a rule of thumb: Try ADF Faces on-board functionality first before reaching out to JSTL. The difference between JSF in general and JSTL is that the JSTL expressions are evaluated at page compile time wheras JSF expressions are evaluated deferred. This difference may have an impact to PPR refreshes and the data rendering (which in many cases I assume you can fix by setting the ADF Faces component content delivery to immediate instead of deferred). On a training slight I flagged JSTL with a "heads up" alert because of this
    Frank

  • ADF FACES: af:forEach and panelGrids

    Hi,
    I can't get code resembling the following to work:
    <h:panelGrid columns="4">
      <af:forEach items="#{bindings.WebCategoriesIterator.collectionModel}"
        var="current">
        <af:panelGroup>
          <af:outputText value="#{current.CatName}" />
          <af:outputText value="#{current.CatDesc}" />
        </af:panelGroup>
      </af:forEach>
    </h:panelGrid>Am I misunderstanding how one of these components works? I know <af:forEach> "only works with ADF Faces components", but I'd been assuming that means that all the components inside it have to be ADF Faces components, not that all the components on the page do. (That is, I'd assumed that the panelGrid was fine.)
    I get a couple of Log4J "Error null" messages on the console when I run this, and the panel grid doesn't seem to render at all. A table built on the same data model works fine.
    Assuming I can't use a forEach inside a panel grid, does anyone have any suggestions? Eventually, there will be images and links in these cells--the idea is to have a n x m grid of images, each linked to a "product" page, much as you might see in most web stores.
    I suppose I could use a large tableLayout with cellFormats and manually check each row in the range in the form bean, setting rowLayout and cellFormat properties to "false" once there aren't any more rows, but this seems hideously ugly for what should be a fairly simple widget.

    Hi,
    I can't get code resembling the following to work:
    <h:panelGrid columns="4">
      <af:forEach items="#{bindings.WebCategoriesIterator.collectionModel}"
        var="current">
        <af:panelGroup>
          <af:outputText value="#{current.CatName}" />
          <af:outputText value="#{current.CatDesc}" />
        </af:panelGroup>
      </af:forEach>
    </h:panelGrid>Am I misunderstanding how one of these components works? I know <af:forEach> "only works with ADF Faces components", but I'd been assuming that means that all the components inside it have to be ADF Faces components, not that all the components on the page do. (That is, I'd assumed that the panelGrid was fine.)
    I get a couple of Log4J "Error null" messages on the console when I run this, and the panel grid doesn't seem to render at all. A table built on the same data model works fine.
    Assuming I can't use a forEach inside a panel grid, does anyone have any suggestions? Eventually, there will be images and links in these cells--the idea is to have a n x m grid of images, each linked to a "product" page, much as you might see in most web stores.
    I suppose I could use a large tableLayout with cellFormats and manually check each row in the range in the form bean, setting rowLayout and cellFormat properties to "false" once there aren't any more rows, but this seems hideously ugly for what should be a fairly simple widget.

  • Adf faces, data control and more than one session context ?

    I already put the question in the forum but nobody answered may be my question may not be so clear so i would put it again with other words.
    Each xml page definition are instantiated in a binding container for a http session, you are able to get the data with bindings or data that represent the current binding container (bindings) or a given container corresponding to an another page that the current (data).
    It is perfect when you don't allow multiple instances of the same page in the same application session. Browser are now offering tab management that allow user to navigate through multiple applications just by changing the current tab. It's very useful. I imagine that user's will be using it also in my application and will use it to compare or more simply just watch about two different entities of the same type (the same xml page definition, the same object instantiated in the binding container).
    Because the binding container is associated with the http session all tabs will share the same one, isn't ? So i understand the problem and that it is forbidden to have many identical page for a single instance in the binding container because of synchronization issues.
    Is all that i said true ?
    Is it a way to solve this type of problem ?
    Will this problem be addressed by adf faces and data controls ?
    Hope somebody will answer !
    Message was edited by:
    micwic

    I already put the question in the forum but nobody answered may be my question may not be so clear so i would put it again with other words.
    Each xml page definition are instantiated in a binding container for a http session, you are able to get the data with bindings or data that represent the current binding container (bindings) or a given container corresponding to an another page that the current (data).
    It is perfect when you don't allow multiple instances of the same page in the same application session. Browser are now offering tab management that allow user to navigate through multiple applications just by changing the current tab. It's very useful. I imagine that user's will be using it also in my application and will use it to compare or more simply just watch about two different entities of the same type (the same xml page definition, the same object instantiated in the binding container).
    Because the binding container is associated with the http session all tabs will share the same one, isn't ? So i understand the problem and that it is forbidden to have many identical page for a single instance in the binding container because of synchronization issues.
    Is all that i said true ?
    Is it a way to solve this type of problem ?
    Will this problem be addressed by adf faces and data controls ?
    Hope somebody will answer !
    Message was edited by:
    micwic

  • ADF Faces & BC: PPR and refresh condition on pagedef executables.

    Hi all,
    I'm running into some problems on my page when a command button is pressed. It's partialSubmit attribute is set to true, it seems that iterators/invokeActions within my pageDef are re-executed and thus resetting the index iterator cursor to its original position which leads to the following two messages:
    Jun 2, 2008 5:34:57 PM oracle.adfinternal.view.faces.model.binding.FacesCtrlRangeBinding$FacesModel setRowKey
    WARNING: row is null for rowKey:oracle.jbo.Key[TEST_MN 00123456 2008-05-08 98 98 4 ]
    Jun 2, 2008 5:34:57 PM oracle.adfinternal.view.faces.model.binding.FacesCtrlRangeBinding$FacesModel makeCurrent
    My pageDef code:
    <iterator id="MasterVoIterator" RangeSize="10"
    Binds="MasterVo"
    DataControl="AppModule" />
    <iterator id="DetailVoIterator" RangeSize="10"
    Binds="DetailVo"
    DataControl="AppModule" />
    <invokeAction Binds="invokeInitValues" id="initValues"/>
    I would like to know how to setup the refresh property under the following scinero:
    1. when the page shows up for the first time:
    MasterVoIterator - invoke
    DetailVoIterator - invoke
    invokeInitValues - invoke
    2. When a show/hide button is used to display the detail rows is clicked:
    MasterVoIterator - do nothing
    DetailVoIterator - invoke // to refresh the detail records.
    invokeInitValues - do nothing
    Here is a pic of the component I am working with:
    http://i108.photobucket.com/albums/n23/zeoneozero/mrbhelp.jpg
    Any advice is appreciated
    Thanks,
    Wes

    Hi,
    use
    ${!adfFacesContext.postback}
    as the refresh condition property value to avoid a refresh on postback (when a button is clicked)
    Frank

  • ADF Faces Dialog position and status bar

    Hi,
    I would like to set the status ="no" for the popup and set the position before it is launched..
    Is there a way to do this with a selectInputText custom renderer or something else?? using the JSF navigation rules "dialog:"
    Thanks
    JO

    Yes you can. Try to lauch the dialog manually.
    FacesContext context = FacesContext.getCurrentInstance();
    UIViewRoot root = context.getApplication().getViewHandler().createView(context, "/faces/test.jspx");
    HashMap properties = new HashMap();
    properties.put("width", new Integer(200));
    properties.put("height", new Integer(200));
    properties.put("status","no");
    properties.put("left", new Integer(80));
    properties.put("top",new Integer(80));
    AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    Map dialogParameters = new HashMap();
    dialogParameters.put("message", "This is a test.");
    afContext.launchDialog(root, dialogParameters, null, true, properties);
    Regards,
    Luis R.

  • ADF FACES: af:panelForm and wrapping text

    Using EA15.
    I have a long piece of text being displayed in the "value" (right) column of a panelForm element. The text is not wrapping and I can't find an easy way to make it wrap (as it should in a table cell). I can see that the generated HTML includes a "noWrap" in the TD element in the table. I don't see any way to control this setting.
    Is there a way to allow the text in the right hand column of the panelForm to wrap?
    Thanks.

    Sure, here's a snippet:
    <af:panelForm labelWidth="5%">
    <af:panelLabelAndMessage label="some data:">
    <af:outputText value="this is a really long string and it should wrap unless the panelForm prevents it from doing so when it would normally want to."/>
    </af:panelLabelAndMessage>
    </af:panelForm>
    Take a look at the generated html and you'll see that the TD cell containing the value string is marked "noWrap" and that seems to be the culprit.
    Thanks.

  • ADF FACES: af:column sortProperty not working on EL expression

    If you use an EL expression as a sortProperty on an af:column element, the column is not actually made sortable.
    For example, if you have this:
    <af:column sortProperty="#{row.phys.name.firstName}" sortable="true">
    <f:facet name="header">
    <af:outputText value="First Name"/>
    </f:facet>
    <af:outputText value="#{row.phys.name.firstName}"/>
    </af:column>
    The data is properly represented in the table, but the column is not sortable. If you create a "firstName" property directly on the objects in the table data and use a specification like what's shown below, then the column is sortable.
    <af:column sortProperty="firstName" sortable="true">
    Why this difference in behavior? It's very common to have complex object trees and only allowing direct properties to be sortable is a significant limitation.
    So, is this a bug, or is it working as designed?

    My data model is fairly deep, with subordinate objects for things like Names and Addresses. So, a Physician object contains numerous sub-objects that can be accessed using simple methods GetName() and getAddress().
    Given an af:table in which I'm trying to display information on a physician, I'd like to be able to reference the nested data directly and still have it be sortable. Thus, I would like to be able to specify sortProperty="phys.name.lastName" and have the column sort on the value of that nested property.
    Is that enough of an explanation? If not, I'd be happy to expand on it.
    Also, given that you say it is working as designed, I'm assuming that it was designed to be a simple property name directly accessible on the bound variable, correct?
    Thanks.

  • ADF FACES: af:table and cellpadding

    How do I control the basic table attributes of cellspacing and cellpadding when using an af:table with sortable headers?
    I have searched through the documentation, and it's not clear at all. The attributes you'd expect (ala h:table) are not legal on af:table.
    Thanks.

    Andy, thanks for picking up this thread - I know the demands of a development schedule :-)
    The problem with no padding on the table is that the data becomes very difficult to read when the cell contents are fairly uniform in size. You need padding around the contents in order to make it easy to read. Also, you should have some control over the border size (cell spacing) in order to create specific visual effects. I need control over the alignment of the cell contents. Not just left, right, and center, but also control over the vertical alignment as well. Finally, some control over things like background color and border color would be very helpful.
    Although abstracting away from the underlying HTML has merits from a device independence perspective, there are capabilities in the HTML model that should not be lost in the process. Since HTML is the underlying view model in almost all cases, we should have proper control over that view. I don't really care how the functionality is realized, but tables are one of the most versatile components in HTML and we need solid control of that component from the ADF abstractions. The ability to control the table cell layout is just one example. Also, L&F guidelines should be just that - guidelines. The defaults should provide your goal L&F, but the developer should have the capability to override that guideline to meet specific project needs.
    Thanks,
    Larry.

  • ADF Faces: included pages and bindings

    Hello all,
    I want to create a page with a panelSplitter, where the left panel has some sort of selection menu and the right panel displays a page depending on the selection made.
    I am displaying the pages with ppr using f:subview and jsp:include. I have already learned that the bindings for the included page must be in the pageDef of the enclosing form for it to work properly. Now I found a post in the forum where someone said that in JDev 11 it would be possible to include one pageDef into another pageDef. Is that feature already available in the 11g Preview? If so, how do I use it?
    Thanks,
    Achim

    Achim,
    Including a .jsff page in a jspx/jsp page with the jsp:include tag will not include any pageDef associated with the page fragment. Instead you can include a page fragment in a page by creating a task flow that contains the fragment you wish to reference and then include the task flow in you jspx via an af:region. Below is a link to an online demo the illustrates how-to create a task flow.
    http://www.oracle.com/technology/products/jdev/viewlets/11/index.html
    --Ric                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • ADF FACES: af:messages and autosubmit

    Using EA14.
    I have a view comprised of a main .jspx and two included .jspx files that each contain a f:subview. The main .jspx uses an af:panelPage with a "messages" facet containing an af:messages element. An af:inputText field in a subview has the autoSubmit atrribute set "true". In a valueChangeListener on that field the value entered may be incorrect and a global error message is created by calling
    FacesMessage fmsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, message, detail);
    getFacesContext().addMessage(null, fmsg);
    I give all this as prelude to asking why the message added above would not be displayed. If I add a message to the specific component, it appears properly. If I add a global message (clientid=null), the message does not appear. I even tried adding a partialTriggers to the af:messages element, but that didn't work either.
    So, is there anything obvious that would be preventing the error message from being displayed?
    Thanks.

    Are you saying that, whether or not you specify a null clientId, it won't appear in the <af:messages>? When it's non-null, and refers to a specific component, does it appear both by the component or in <af:messages>, or only by the component?

  • ADF Faces: columns sort problem

    Hi all,
    I'm new ADF Faces italian user and I have some problem sorting columns of table component...
    I have tried to convert my ResultSet in a List, and the data are correctly inserted in the "af:table" but the column sort don't work...
    I have already read the "af:table" Oracle specification but I have not just found a solution...
    This is the part of my backing bean that return the List:
    private List anagsList;
    public List getAnagsList()
    Connection connection;
    Statement statement;
    ResultSet resultset;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    connection = DriverManager.getConnection("jdbc:oracle:thin:@192.168.168.75:1521:ORA1", "EL2DEMO", "admin");
    statement = connection.createStatement();
    if(inputText1.getValue().toString().equals(""))
    resultset = statement.executeQuery("SELECT AN_RAGSOC, AN_NOME, AN_DATANASCITA FROM ANAGS");
    else
    String query="SELECT AN_RAGSOC, AN_NOME, AN_DATANASCITA FROM ANAGS WHERE ";
    query=query + "AN_RAGSOC LIKE '%" + inputText1.getValue() + "%' OR ";
    query=query + "AN_NOME LIKE '%" + inputText1.getValue() + "%' OR ";
    query=query + "AN_DATANASCITA LIKE '%" + inputText1.getValue() + "%'";
    resultset=statement.executeQuery(query);
    anagsList = new ArrayList();
    while(resultset.next())
    anagsList.add(new AnagsRecord(resultset.getString(2), resultset.getString(1), resultset.getString(3)));
    resultset.close();
    statement.close();
    connection.close();
    catch(Exception e)
    System.out.println(e);
    return anagsList;
    This is my AnagsRecord class:
    package mypackage.backing;
    public class AnagsRecord
    private String nome;
    private String cognome;
    private String dataNascita;
    public AnagsRecord(String nome, String cognome, String dataNascita)
    setNome(nome);
    setCognome(cognome);
    setDataNascita(dataNascita);
    public String getNome()
    return nome;
    public void setNome(String nome)
    this.nome = nome;
    public String getCognome()
    return cognome;
    public void setCognome(String cognome)
    this.cognome = cognome;
    public String getDataNascita()
    return dataNascita;
    public void setDataNascita(String dataNascita)
    this.dataNascita = dataNascita;
    And this is table component:
    <af:table var="al" emptyText="No records found."
    rows="20" value="#{backing_ADFFaces.anagsList}"
    banding="row" bandingInterval="1">
    <af:column sortable="true" sortProperty="dataNascita">
    <f:facet name="header">
    <af:outputText value="DATA NASCITA"/>
    </f:facet>
    <af:outputText value="#{al.dataNascita}"/>
    </af:column>
    <af:column sortable="true" sortProperty="cognome">
    <f:facet name="header">
    <af:outputText value="COGNOME"/>
    </f:facet>
    <af:outputText value="#{al.cognome}"/>
    </af:column>
    <af:column sortable="true" sortProperty="nome">
    <f:facet name="header">
    <af:outputText value="NOME"/>
    </f:facet>
    <af:outputText value="#{al.nome}"/>
    </af:column>
    </af:table>
    I have already installed the ADF Faces demos (column_sortable.jspx) and it works well, but the backing bean is not very understandable...
    please help me...
    ciao!

    Hi,
    I have the same problem (with another language), national characters are not sorted properly.
    Any pointers how to solve this?
    Regards,
    Patrik

  • ADF-Faces table and mass data

    Hello Oracle,
    we consider to use ADF-Faces with Spring and TopLink or Hibernate that supports all important commercial databases.
    We need a solution for selecting mass data and show them using a ADF-Faces component.
    ADF-Faces table looks great and is fine for for some hundred datasets. But we have customers who could do a select over 80.000 or more datasets and it cannot be the solution to load them completly in collection-model in memory.
    Do you have a solution or do you plan somthing? A JSF data table component for mass data (e.g. load from database on every "next or "previous" click)?
    Regards
    Florian

    I'm pretty new to ADF Faces etc. but I know the ADF Table component supports paging. If you're using ADF Business Components as the persistence framework it supports paging out of the box giving you exactly what you're looking for.
    If you're using EJBs or Toplink I think you have to write your own paging interface but I don't know this for sure.
    Corey
    Message was edited by:
    cpuffalt
    Message was edited by:
    cpuffalt

  • How to Redirect to another page Using JavaScript in ADF Faces?

    Hi Guys,
    I have a UI user case that has a af:menu which contains mutiple af:goMenuItem. When user click on the menu, the menu slides down and shows up the af:goMenuItem. As we know, you could define the page destinations in af:goMenuItem to go to another page when user clicked, but af:menu itself cannot be redirected to another page. Well, the user case wants the menu itself could be redirected if user click on it.
    So I am thinking using JavaScript to do this: when the af:menu gets clicked, redirect to another page. BUT, I looked over the ADF Faces Javascript API and was not able to find that piece of code to do this. Any help???
    Another work around for the user case scenario is to use HTML marks + CSS/JavaScript instead of af:menu and af:goMenuItem but this changes the scope of technology although it's not hard to do
    Any other idea to accomplish the user case other than what I could think of ?
    Thanks Guys!
    Jay

    Hi,
    1 - you can have a hidden command item to do the navigation based on a control flow case. In this case, you access the command component from JavaScript create a new ActionEvent and queue it
    2 - JavaScript can use an af:serverListener to call into a server side managed bean method to perform the navigation
    there is no JavaScript API for navigation in ADF Faces because navigation in JavaServer Faces is an event driven framework and we don't support developers fighting the framework.
    Frank

Maybe you are looking for