ADF Faces and Struts confusion

Hello alltogether,
I'm developing with struts for some years now but I'm completely new to ADF and Faces.
I want to integrate a "simple" ADF Faces page with one TreeTable to an existent struts application.
The idea I had is to create an action within the struts-config.xml inheriting from the DataAction or DataForwardAction in order to load and prepare the data for the TreeTableModel.
When I call the ADF Faces page using the .do call for the Action created (I have to prepend /faces/ to the normal Action call) the page is rendered correctly but I do not enter my derived Action class at all.
So my question is: How is the preferred way to fill the Model of the TreeTable before the ADF Faces page is rendered. The necessary datasource is obtained from a struts basic action throughout the whole application.
I'm now struggeling with the pageDef.xml (using the documentation from here: http://www.oracle.com/technology/documentation/jdev/b25947_01/index.html) but I'm really lost since I do not understand what happens when and how resp. why it happens.
All I want is the following: Prepare and load the necessary TreeModel before the page gets rendered (the appropriate model depends on a parameter which is given in the request that is send and which successfully response should be the ADF Faces page with the TreeTable filled with the appropriate data)!
Can please somebody give me the necessary piece of advice?
I'm trying for almost a day now!
Many thanks in advance
Best Regards

Dear Mr. Vohra, It is not yet Clear whether we can use ADF Faces with Tiles,
With out using Facelets, of MyFaces?
Some users say they are using these two frameworks, but still complain of problems.
And you are suggesting to use facelets with ADF faces .
Can't we use ADF Faces and Tiles with out any other intermediate technology?
Thanking you,
Samba.
Message was edited by:
saasira

Similar Messages

  • JavaServer Faces and Struts

    For those of you interested in using JavaServer Faces and Struts together (and my mailbox indicates that this is quite a few people :-), I'm happy to announce the immediate availability of an integration library that allows you to use the EA3 release of JavaServer Faces with a recent nightly build (20030216 or later) of Struts 1.1 -- it will also work with the upcoming 1.1-rc2 and 1.1-final releases -- together. Nightly builds of the integration library are available at <http://jakarta.apache.org/builds/jakarta-struts/nightly/struts-faces/>.
    The sources for this package are in the Struts CVS repository, in the "contrib/struts-faces" directory, and will be included in the source nightly distributions starting with the 20030307 version. It is not currently planned to include the struts-faces integration library with binary distributions of Struts 1.1, since it is still an EA quality release.
    See the README.txt file (included in the nightly build) for more information on running the example application and using the integration library in your own applications.

    What are the reasons not to have extended
    RequestProcessor from Struts with the
    capabilities of the FacesServlet... a sort of
    "FacesProcessor" (extended the regular
    RequestProcessor)? (should be nice for views
    with no JSF components: in order not to execute
    FacesServlet for each views , event if there is
    no JSF component in the view)It turned out that I needed a customized RequestProcessor anyway (a couple of the processXxx methods had to work differently), but it actually would have been more work incorporating FacesServlet directly into it. In essence, there is now (in the combined version) a "front controller" for UI events , FacesServlet, and a "middle controller" for form submit events (RequestProcessor). When a UI event happens that just causes the current page to be redisplayed (think of a tree control where you click on the "expand this node" icon), you don't really want the Struts controller servlet to even be bothered by this request. Indeed, if you're using a presentation that was based on DHTML+Javascript, such an event would have been handled on the client anyway, and would never have been sent to the server at all.
    The combined approach still supports Faces and non-Faces pages, though. This means you can migrate one page at a time and test things (which is exactly what I did when I ported the pages of the example app).

  • Faces and Struts Intregration

    Its a hot topic nowadays.but there is no any help/answer is avaialable in this forum...
    i and many other develpers want to intregarte both framework.
    anybody knows the TESTED n VALID examle or sampe application.kindly give us link here.....or if anybody has done it then kindly let me know here as i have done some examples but facing some problems.
    PLEASE HELP ME AS OON AS U CAN

    Dear Mr. Vohra, It is not yet Clear whether we can use ADF Faces with Tiles,
    With out using Facelets, of MyFaces?
    Some users say they are using these two frameworks, but still complain of problems.
    And you are suggesting to use facelets with ADF faces .
    Can't we use ADF Faces and Tiles with out any other intermediate technology?
    Thanking you,
    Samba.
    Message was edited by:
    saasira

  • ADF Faces and MapViewer

    Hello,
    i'm investigating the possibility to write an ADF Faces MapViewer Client. I'm especially thinking of some Google Maps style navigation, e.g. panning by dragging the map.
    I'd like to use AJAX to prevent full page reloads, so if i drag the map only the map image is reloaded.
    Now the question are:
    1. How do i extend the ADF Faces Components with AJAX Scripts without breaking the ADF Faces PPR concept?
    2. Is it possible to trigger the reload of an ADF Faces component from my javascript?
    3. Is it possibe to extend the java classes for the components or the renderer with my own code?
    4. Has anyone already created an example that uses ADF Faces and MapViewer?
    Thanks for help,
    Dirk

    Hi,
    I just talk with our admin. The problem was server port 8080. Some of internet providers (also one of the biggest Polish) blocks this port. It's a reason - when I change internet connection to other everythig works OK. I thing it would be nice to change server port to default 80, if you want to make this application accessile for all.
    Kuba

  • ADF Faces and BI Graph?

    Is it possible to use BI Graph with ADF Faces?
    So far I was using BC4J/JSP/Struts and to put Graph (<graph:Graph/>) into JSP page was easy - using Data Control Palette. Now I want to migrate to JSF (ADF Faces) but when I create JSF JSP - it is impossible to insert some ViewObject as Graph from Data Control Palette.
    Thanks for any clue.
    brano

    My current solution is:
    The ADF Faces main page:
    <af:showOneTab position="above">
    <af:showDetailItem text="Graph Include" disclosed="true">
    <f:verbatim>
    <jsp:include page="${pageContext.request.contextPath}/graphs/Graph.jspx"
    </f:verbatim>
    </af:showDetailItem>
    The Graph page:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:graph="/webapp/graph.tld"
    xmlns:adf="http://xmlns.oracle.com/adf/ui/jsp/adftags">
    <jsp:output omit-xml-declaration="true"
    doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <html>
    <adf:pagedefinition/>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>Graph</title>
    </head>
    <body><graph:Graph data="${bindings.EmployeesView1}"
    imageHeight="240" imageWidth="320"/>
    </body>
    </html>
    </jsp:root>
    When I try to run this, I get the following error:
    500 Internal Server Error
    javax.servlet.jsp.JspException: data attribute evaluates to null
         at oracle.jbo.html.jsp.graph.GraphTag.doStartTag(GraphTag.java:212)
         at graphs.Graph_jspx._jspService(_Graph_jspx.java:67)
         [graphs/Graph.jspx]
    Could you please post the solution?

  • ADF Faces and BC4J integration

    If I drag and drop my BC4J View Objects from the data control palette, Jdeveloper 10G generates an input form using tags from the struts TLD (WEB-INF/struts-html.tld).
    How can I configurate JDeveloper to use the ADF Faces tags in this case?
    Now JDeveloper generates for an attribute in an input form this code:
    <html:text property="CodigoTipoCliente"/>
    I want to generate something like this:
    <af:inputText property=”xx”> where xx is the attribute name for the BC4J.
    Is this possible?
    If it not possible, can I integrate ADF Development to JSF?
    thanks

    i have a requirement where i need to have Java Beans as Model Layer in ADF Faces.
    i have executed a project in ADF UIX with Java Beans Model Layer it works fine.
    but when i tried the same in ADF Faces like i have created some java beans as Data controls and drag and drop them onto the JSP page which in turn convert into <af:inputText value="#{bindings.lastName.inputValue}"
    label="Last Name"
    required="#{bindings.lastName.mandatory}"
    columns="#{bindings.lastName.displayWidth}"
    binding="#{backing_inputPage.inputText2}"
    id="inputText2">
    <af:validator binding="#{bindings.lastName.validator}"/>
    </af:inputText> but these fields are always shown as ReadOnly fields even though i set the readOnly attribute to false and by which i cannot insert any values into it on runtime
    but where as when i convert them into normal JSF HTML tags then i can enter values and even pass values between pages but WHY DO I NEED TO DO THIS
    is the ADF FACES JAVA MODEL LAYER IS NOT YET integrated or what?
    please reply or clarify

  • ADF Faces and Facelets.

    How to use Facelets with ADF Faces I'm getting the ADF Components displayed, but the alignments are not working.And also , the JDeveloper is not recognising the <ui:insert> and <ui;composition> saying, No grammer available.
    Further , In the source for the HTML page rendered we could see the Facelets tags. these are not being converted to HTML.
    So where lies the problem?
    I added all the jar files neeed, added all web.xml entries; but could not get the correct out put.
    Can any one help me?
    Thanking you,
    Samba.

    Hi Samba,
    If you get any headway, please post it here. I am in the same boat!
    Are there other people out there using facelets with ADF? I would really appreciate any insight. Thanks!

  • ADF-Faces and JDeveloper 11

    I have an application that already done and running, the JSPs of this application almost generated with JHeadStart,
    the components are ADF-Faces components with the ADF-Faces implementation of the release 10.1.3.3 of Jdeveloper.
    I'd like to find a way to migrate this application to new JDeveloper 11.
    so the tables becomes not fixed width and height columns, and also to be possible to use the new features in JDEV 11

    Saeed,
    this is really a JHeadstart Forum question (JHeadstart
    There is no JHeadstart 11g available yet.
    Migration should not be done without proper JHeadstart support.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Compare between component id in adf faces and component id in html.

    Hi all,
    [Oracle ADF Faces 11g]
    When I design layout and set ID for ADF Component such as:
    <af:inputText id="*itCalendar*" />
    After I run and view HTML source, I saw:
    <INPUT class=x25 id=*j_id_id7:itCalendar* name=*j_id_id7:itCalendar*/>
    My question:
    1. Why ID changed after I run ?
    2. How to away: ID don't change ?
    3. Why all atributes of Javascript attributes in adf faces 11 don't show? such as:
    onchange
    onclick
    ...etc.,
    Can you help me, please?
    thanks all.

    User,
    1). The ID changes because your af:inputText is inside another component that is a naming container. the *j_id_id7 is the (apparently auto-generated) ID used by the naming container.
    2). Don't put your component inside of a naming container (tongue-in-cheek, as that's usually not very possible). The best thing is to put ID's on all of your components, then you can know what the final ID in the HTML will be
    John

  • Oracle ADF UIX and Struts

    Does Oracle ADF UIX use Struts components internally? If yes, Does Oracle Support the issues that arises because this internally used Struts components? (I am using Oracle ADF in my application.
    Thanks,
    Aravind.

    DataForwardAction and DataAction are build on top of struts actions to coordinate ADF databindings and it's life cycle;
    UIX, has xmlns:struts="http://xmlns.oracle.com/uix/struts" this XML namespace has some elements like
    <struts:form> and <struts:messageTextInput> also <struts:dataScope>
    They work like struts jsp tag;
    here a good paper;
    http://download-west.oracle.com/otn_hosted_doc/jdeveloper/904preview/uixhelp/uixdevguide/struts.html
    Marcos Ortega
    Brazil

  • Does Studio Creator support Oracle ADF Faces and other components?

    Hi everyone
    According to:
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/faq.html
    "Although ADF Faces is "vanilla" JSF we have not been able to run with Java Studio Creator Build 04.06.2. We are working with Sun to resolve the issues in Java Studio Creator."
    Does anyone know if Oracle ADF faces now work with Studio Creator and if so which version.
    In addition I am also looking for JSF visualization components. In addition to advanced 3-D graphs (send as PNG to client) I am also looking for components to visualize the structure of a website. These all need to work with Studio Creator.

    Importing 3rd party libraries used to be complicated. The .complib stuff was added precisely to make it easy.
    It does make packaging slightly harder for third party -vendors-, since there's one extra step, but this makes everything easier for (the much larger number of) users of the third party components, since the packaging format specifies a bunch of stuff that we used to have to ask of users when trying to add the jar and associated metadata into the IDE.
    The complib stuff is documented, so if you're producing a 3rd party JSF library, or if you really want to use one that hasn't yet been packaged, you can do the steps yourself.
    See http://wiki.java.net/bin/view/People/EdwinGoei -- the first couple of links describes the process. Yes, we're working with third party vendors to get this done for their component sets, and yes, there's talk with other IDE vendors to standardize all this.
    -- Tor
    http://blogs.sun.com/tor

  • JDev ADF Faces and XML publisher integration

    Hi,
    I have an ADF Faces / BC project which I want to integrate XML Publisher for reporting and output purposes.
    Following this note by Deepak Vohra http://www.oracle.com/technology/pub/articles/vohra-jdev-xmlpub.html (which was incredibly helpful by the way)
    So far it's looking very promising but I have a few unknowns with the design.
    1. The database connection.
    In the examples a JDBC connection is opened (and actually forgotten to be closed!). I would like to utilise the AM pooling mechanisim rather than a seperate open/close situation. How do i properly reference/use the pooled AM java.sql.Connection?
    2. Output
    The examples write the PDF (what i am using) to the file system. Is it possible to write this to the browser response stream using a JSP or servlet? My preference is NOT to produce PDF's on the middle tier file system if possible. Need some guidance here.
    thanks and regards,
    Brenden

    1. The database connection.
    In the examples a JDBC connection is opened (and actually forgotten to be closed!). I would like to utilise the AM pooling mechanisim rather than a seperate open/close situation. How do i properly reference/use the pooled AM java.sql.Connection?
    To obtain JDBC connection from ApplicationModule refer
    http://radio.weblogs.com/0118231/2004/01/30.html#a232
    2. Output
    The examples write the PDF (what i am using) to the file system. Is it possible to write this to the browser response stream using a JSP or servlet? My preference is NOT to produce PDF's on the middle tier file system if possible. Need some guidance here.
    Output may be set to an OutputStream with the FOProcessor method
    setOutput(java.io.OutputStream stream)

  • Adf faces and xhtml

    I'm trying to generate xhtml 1 strict html pages using adf faces, but it doesn't seem to work correctly. What do i need to do to make it work?
    For example, the following jsf file:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns="http://www.w3.org/1999/xhtml"
    xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
    <f:view>
    <afh:html>
    <jsp:output omit-xml-declaration="false" doctype-root-element="html"
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <afh:head title="Edit country">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    </afh:head>
    <afh:body>
    <h:form>
    <af:inputText label="Label 1"/>
    </h:form>
    </afh:body>
    </afh:html>
    </f:view>
    </jsp:root>
    Will generate an html document with 2 Doctypes, one for xhtml 1 strict and 1 declaring it html 4 loose. The page doesn't conform to xhtml, the input tag for example isn't closed.
    I also noticed that draging and dropping data controls on an xhtml jsf page doesn't work. You need to declare it as html 4 transitional to make drag and drop work.
    Another issue: i'm using the minimal skin. This skin generates invalid css files. For example, the selector for the body tag is in uppercase, but the tag itself is in lowercase. Css selectors are case sensitive, which means that the css file doesn't work in firefox.

    Andrejy,
    try and disable ADF Faces compression
    http://www.jroller.com/page/cschalk?entry=disabling_adf_faces_content_compression
    Mybe I am mixing things up with Oracle Reports, but I think I remember that compression also excluded unnecessary closing tags (might be wrong here)
    Frank

  • ADF Faces and BC: Scope problem with managed bean

    Hi,
    I am using JDev 10.1.3 and ADF Faces with ADF BC.
    I have created a managed bean which needs to interact with the binding layer and also receive actions from the web pages. I have a managed property on the bean which is defined as follows:
    <managed-bean>
        <managed-bean-name>navigator</managed-bean-name>
        <managed-bean-class>ecu.ethics.view.managed.Navigator</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
          <property-name>bindings</property-name>
          <value>#{bindings}</value>
        </managed-property>
      </managed-bean>I need the been to session scope because it needs to keep previous and next pages to navigate the user through their proposal. If i use session scope (as above) i get the following error when i click on a comand link which references a method in the above bean: #{navigator.forwardNext_action} which returns a global forward.
    this is the exception:
    javax.faces.FacesException: #{navigator.forwardNext_action}:
    javax.faces.el.EvaluationException: javax.faces.FacesException:
    javax.faces.FacesException: The scope of the referenced object: '#{bindings}' is shorter than the referring object     at
    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)     at
    oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211) at
    javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)at
    javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)     at
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)     at
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)     
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)     at
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)how can i get around this?
    Brenden

    Hi pp,
    you need to create a managed (not backing) been set to session scope.
    You can call/reference the managed bean from your page.
    the backing bean is designed around a page lifecyle which is request oriented in it's design.
    This is a simple managed bean from faces-config.xml
    <managed-bean>
        <managed-bean-name>UserInfo</managed-bean-name>
        <managed-bean-class>ecu.ethics.admin.view.managed.UserInfo</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
          <managed-property>
          <property-name>bindings</property-name>
          <property-class>oracle.adf.model.BindingContext</property-class>
          <value>#{data}</value>
        </managed-property>
      </managed-bean>and the getters and setters for bindings in your session scope managed bean:
        public void setBindings(BindingContext bindings) {
            this._bindings = bindings;
        public BindingContext getBindings() {
            return _bindings;
        }you can access the model from the managed bean using the the BindingContext if needed.
    also have a look at JSFUtils from the ADF BC SRDemo application, there are methods in this class such as resolveExpression which demonstrate how to get the values of items on your page programatically using expression language. You can use this in your managed bean to get values from your pages.
    regards,
    Brenden

  • 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";

Maybe you are looking for

  • RAISE EXCEPTION  "INVALID_TARGET" r

    Hi, We geta ABAP dump Exception condition "INVALID_TARGET" raised. For program "SAPLBTCH" which was started as a background job. error where terminated.   363             xbp_msgpar2 = targetgroup.   364          endif.   365   366          call meth

  • Facebook notifications on taskbar

    I cannot seem to clear my facebook notifications from my taskbar once I have looked at them in facebook.  The icon still stays on the taskbar, just without the astrick next to it.  Please help!

  • Email with PDF As attachment

    Hello SDN,                I am working on a process, which has visual composer UI as iview, The input from the Visual composer Screen should go as a pdf with attachment to the receipient (Email should be send dynamically from the "mail id " field of

  • Data Extraction in Open Hub Destination using Process Chain

    Hi I want to extract data in Open Hub Destination (database table)from Data Store Object(ODS) through Process Chain. When i tried to create process chain, i found only one option under Process types - Data export into External System. Here it asks fo

  • Files won't go on External after Mac Reboot

    My External Hard Drive won't allow files to be put on it after I rebooted my Macbook Pro to factory settings. I still have all old files on my external, but it won't accept any new files after I reboot it. Any idea how I can fix this without losing w