JSF 2.0: View Scope Problem

Hey,
I 'm having trouble using the JSF 2.0 view scope. My application is a search page displaying some search parameters and a list of results. The search parameters are backed by a session scope bean, the results a backed by a request scoped bean and there is some kind of controller bean in request scope, too. Searching and displaying the results works fine.
The second step was some kind of details page to display when clicking on one result element. I have another controller bean for this goal, but when pressing the link the requested action is not performed. I remembered similar problems I had in the past where I put the bean containing the result list into view scope.
But after putting the results bean into view scope searching is not working anymore. You click the search button, the search action is performed. But after successfully storing the results a new results bean is instantiated. An empty one of course.
Now I 'm not sure anymore if I understand the view scope: I have a single page, I search something and the results are displayed on the same page. I cannot believe that request scoped results work fine and view scoped results do not.
Can anyone help me?
Thanks,
Stephan

I found the problem and a solution :-) The missing piece of the puzzle was the id attribute for the form tag. After some debugging of the JSF JavaScript I found the solution.
The JavaScript function response(request, context) is invoked to handle the server response. Inside this function the doUpdate(element, context) is invoked.
The doUpdate() function is doing the modification of the DOM. The function doUpdate() is two times invoked for a response. The first time the html elements are updated.
The second time the view state hidden field is updated or created but only under the following condition:
Comment in the JavaScript source code of the jsf.js
//Now set the view state from the server into the DOM
//but only for the form that submitted the request.If the forms of the both side haven't the same id the form can't be found on the second page.
In the following way it is working:
page1.xhtml
<h:form id="myform">
        <h:commandLink value="Go to page 2" action="page2">
            <f:ajax render="@all" execute="@all"/>
        </h:commandLink>
</h:form>
.....page2.xhtml
<h:form id="myform">
            <h:commandLink value="Go to page 1" action="page1">
                <f:ajax render="@all" execute="@all"/>
            </h:commandLink>
</h:form>So always set an explicit id for each JSF tag.

Similar Messages

  • F:view causing problem in 11.1.1.4

    Hi,
    We are facing some problem in our application when we move to Jdev 11.1.1.4 from 11.1.1.3.
    I have even developed a sample app which works fine in 11.1.1.3 but gives an error in 11.1.1.4. We use <f:view> with a phaseListener inside one of the jsff.
    We get the following error when trying to launch the applcn:
    Root cause of ServletException.
    java.lang.IllegalStateException: <f:view> was not present on this page; tag oracle.adfinternal.view.faces.unified.taglib.output.UnifiedOutputTextTag@1d496c4encountered without an <f:view> being processed.
         at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.setProperties(UIXComponentELTag.java:108)
         at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:733)
         at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1354)
         at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:71)
         at oracle.adfinternal.view.faces.unified.taglib.output.UnifiedOutputTextTag.doStartTag(UnifiedOutputTextTag.java:50)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspNode.execute(OracleJspNode.java:89)
         at oracle.jsp.runtimev2.ShortCutServlet._jspService(ShortCutServlet.java:89)
         at oracle.jsp.runtime.OracleJspBase.service(OracleJspBase.java:29)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:665)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:385)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:802)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:726)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    myTabs.jspx makes use of dynamicTabShell template..This jspx makes use of a bounded taskflow-myBoundedTFdefinition.xml which has the jsff(abc.jsff).This jsff contains the f:view tag.
    Any idea why <f:view> inside the jsff is causing the problem in 11.1.1.4 but worked in 11.1.1.3??
    Thanks,
    Santosh
    Sample code below
    mytabs.jspx
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:form id="f1">
            <af:pageTemplate viewId="/oracle/ui/pattern/dynamicShell/dynamicTabShell.jspx"
                             value="#{bindings.pageTemplateBinding}" id="pt1">
              <f:facet name="copyright"/>
              <f:facet name="about"/>
              <f:facet name="navigation"/>
              <f:facet name="globalLinks"/>
              <f:facet name="status"/>
              <f:facet name="globalToolbar"/>
              <f:facet name="globalSearch"/>
              <f:facet name="globalTabs"/>
              <f:facet name="welcome">
                <af:region value="#{bindings.myBoundedTFdefinition1.regionModel}"
                           id="r1"/>
              </f:facet>
              <f:facet name="innerToolbar"/>
            </af:pageTemplate>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    abc.jsff
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:f="http://java.sun.com/jsf/core">
      <f:view beforePhase="#{backingBeanScope.secondBean.myphaseMethod}"></f:view>
      <af:outputText value="This is from the abc jsff" id="ot1"
                     binding="#{backingBeanScope.secondBean.textop}"/>
    </jsp:root>Thanks

    In your abc.jsff:
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:f="http://java.sun.com/jsf/core">
    <f:view beforePhase="#{backingBeanScope.secondBean.myphaseMethod}"></f:view>
    <af:outputText value="This is from the abc jsff" id="ot1"
    binding="#{backingBeanScope.secondBean.textop}"/>
    </jsp:root>
    Why is <af:output> after you've closed the <f:view>? Shouldn't it be:
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:f="http://java.sun.com/jsf/core">
    <f:view beforePhase="#{backingBeanScope.secondBean.myphaseMethod}">
    <af:outputText value="This is from the abc jsff" id="ot1"
    binding="#{backingBeanScope.secondBean.textop}"/>
    </f:view>
    </jsp:root>

  • JSF 2.0 view handler

    JDeveloper documentation has an error in configuring the view handler.
    http://download.oracle.com/docs/cd/E16162_01/user.1112/e17455/dev_wpt.htm#OJDUG3574
    Example 11-4 Facelet Code Added to Your faces-config.xml
    <application>
    <view-handler>com.sun.Facelets.FaceletViewHandler</view-handler>
    </application>
    com.sun.Facelets.FaceletViewHandler is the JSF 1.2 view handler. For JSF 2.0 a view handler is not to be configured.
    Edited by: dvohra16 on Jul 7, 2012 2:07 PM

    Thank-you for pointing out this in our documentation. I have removed this section since the faces-config.xml does not get modified to add the view handler detail in JSF 2.0. when one adds a facelet page.
    Edited by: user742463 on Jul 10, 2012 1:30 PM

  • Scop problem

    Hi ,
    I having a problem communicating with loaded swf inside main
    file.
    Im using that script to have a transition between external
    swf :
    http://www.kirupa.com/developer/mx2004/transitions.htm
    most of it working fine but im having problem communicating
    with variable:
    Stage.swf:
    The main movie start to play and on its last frame it has the
    following action:
    this._lockroot=true
    //loading the first movie after the animation finish
    _root.currMovie = "main";
    _root.MC_Container.loadMovie(_root.currMovie+".swf");
    stop();
    portfolio.swf
    Than I press on the portfolio button and I get another main
    portfolio swf that has external files loeaded as well.its dividing
    the portfolio into categories , each category loading external
    file.
    First frame:
    this._lockroot=true
    _root.currMovie = "portfolio_3d";
    _root.MC_Container.loadMovie("portfolio_3d.swf");
    midframe=10;
    stop();
    buttons :
    on (release) {
    if (_root.currMovie == undefined) {
    _root.currMovie = "portfolio_print";
    _root.MC_Container.loadMovie("portfolio_print.swf");
    } else if (_root.currMovie != "portfolio_print") {
    if (_root.MC_Container._currentframe >=
    _root.MC_Container.midframe) {
    _level.currMovie = "portfolio_print";
    _root.MC_Container.play();
    portfolio_3d.swf
    the external file that loaded into the portfolio file is for
    example : portfolio_3d.swf ,
    the first frame action:
    this._lockroot=true
    midframe=10;
    middle frame has a stop(); command
    the last frame loading the next after the current movie
    finish:
    _root.MC_Container.loadMovie(_root.currMovie+".swf")
    the problem is that in the portfolio page, when I click the
    sub categries(3d,print,etc) , I get always the same movie. It seems
    like the variable doesn’t see the movie in the lowest level.
    It seems like a scop problem
    my url :
    www.shaygaghe.co.il
    thanks for your time ,
    Shay Gaghe

    what is the script that you have on the buttons on the bottom
    of the page that are supposed to load the new content? I think it
    may have something to do with your lockroot.

  • Variable scope problem?

    I am not quite sure if this is a scope problem at all, but it looks like one....
    Here is the problem:
    I have a class in which I define a variable x as folowing:
    public class XX
    public var x:Integer;
    In my fx script file I give it a value:
    var t: XX {
    x: 10
    and it seems that it is initialized... however when I try to use the variable inside the class XX, it cannot be done.
    for example I what try to do is
    public var yy = YY {
    for (i in [1..x]){
    ...do something...
    and the cycle is executed only once!
    Is this due to my inexperience in javafx or it is a standard behavior?

    Is this due to my inexperience in javafx or it is a standard behavior? Both? :-)
    The classical way to compute a class variable from those initialized at construction time is to do that in an init (or postinit) block.
    It isn't really a problem of scope, rather of order of initialization.

  • Function scope problem

    Hi all,
    I am using a class-based system for all my actionscript, but
    am having trouble getting the following code to work properly, and
    I am pretty certain it is a scope issue.
    public function
    setNavButtons(prevStart:Number,prevEnd:Number,nextStart:Number,nextEnd:Number){
    var owner = this;
    if (prevStart != undefined){
    mcPropertiesNav.btnBack.onRelease = function():Void{
    owner.reloadView(prevStart,prevEnd);
    if (nextStart != undefined){
    mcPropertiesNav.btnNext.onRelease = function():Void{
    owner.reloadView(nextStart,NextEnd);
    I've traced it out and know that when I use the reloadView
    method, the prevStart and prevEnd parameters are being passed in as
    undefined. Does anyone know how I would reference these variables
    within the onRelease functions?
    Thanks in advance
    Robert

    In the code you are posting a scope problem can't be
    pinpointed. The arguments you are providing are local to the
    function so there is no problem there. We might be able to help if
    you post the complete class.

  • Integration of Spring, JSF as a view through portlets...

    I am trying to integrate Spring and JSF as a View. Furthermore I am trying to run this combination within a Portlet environment. I have got as far as been able to display the components by the url on the form post is not the portlet action URL as it should be. Can someone look at this thread and perhaps propose a next step.
    http://forum.springframework.org/viewtopic.php?t=4950

    Hi
    If you are new to EBS then read up on EBS. Take a look at:
    http://www.packtpub.com/service-oriented-java-business-integration
    http://en.wikipedia.org/wiki/Enterprise_service_bus
    In Siebel take a look at Bookshelf:
    Transports and Interfaces:
    Siebel eBusiness Application Integration Volume III
    and
    Integration Platform Technologies:
    Siebel eBusiness Application Integration Volume ll
    For Siebel 8.0 you find it here:
    http://download.oracle.com/docs/cd/B40099_02/books/EAI3/EAI3TOC.html
    Axel

  • Meterlized view Refreshtime problem

    Hi,
    I have an issue with my MATERIALIZED view refreshment.
    Server170 having schema "Afccv" with the table name " Tbl_voicechat".
    Server 169 having a db link name "SERVICEDB1" point to same server.
    MATERIALIZED view on server 169 DB user "smschat" with the following code ::
    CREATE MATERIALIZED VIEW "SMSCHAT"."TBL_VOICECHAT_NEW1" TABLESPACE "SMSCHAT"
    BUILD IMMEDIATE
    REFRESH FAST
    AS SELECT <COLUMNNAMES>
    FROM AFCCV.TBL_VOICECHAT@SERVICEDB1;
    Refreshment time is 15 min.
    alter MATERIALIZED VIEW SMSCHAT.TBL_VOICECHAT_NEW1 REFRESH FAST ON DEMAND START WITH sysdate+0 NEXT sysdate+(15/86400*60);
    Also there is 5 indexes on this MATERIALIZED view.
    Problem is ::
    Sometimes it is refreshing properly in time and taking approximate 5-8 min to refresh. But sometimes it seems to be like hang or when I m checking the job for refreshment its only showing runnning.
    SQL> set time on
    11:44:02 SQL> alter session set nls_Date_format='dd-mon-yyyy hh24:mi:ss';
    Session altered.
    11:44:03 SQL> select mview_name ,last_refresh_date from dba_mviews;
    MVIEW_NAME LAST_REFRESH_DATE
    MGMT_ECM_MD_ALL_TBL_COLUMNS 20-jan-2011 11:44:40
    TBL_VOICECHAT_NEW1 07-jun-2012 09:44:54
    11:44:33 SQL> select * from dba_jobs_running;
    SID JOB FAILURES LAST_DATE LAST_SEC THIS_DATE THIS_SEC INSTANCE
    2893 252 0 07-jun-2012 09:44:51 09:44:51 07-jun-2012 11:14:06 11:14:06 0
    11:44:34 SQL>
    Now What to do and why it is not refreshing properly. DB link is working fine. no network issue is there. no locking is there on db.
    Kindly tell me where to check related to this issue. or what I can do for this.
    thanks in Advnace
    Pradeep.

    Pradeep Sharma wrote:
    Hi,
    I have an issue with my MATERIALIZED view refreshment.
    Server170 having schema "Afccv" with the table name " Tbl_voicechat".
    Server 169 having a db link name "SERVICEDB1" point to same server.
    MATERIALIZED view on server 169 DB user "smschat" with the following code ::
    CREATE MATERIALIZED VIEW "SMSCHAT"."TBL_VOICECHAT_NEW1" TABLESPACE "SMSCHAT"
    BUILD IMMEDIATE
    REFRESH FAST
    AS SELECT <COLUMNNAMES>
    FROM AFCCV.TBL_VOICECHAT@SERVICEDB1;
    Refreshment time is 15 min.
    alter MATERIALIZED VIEW SMSCHAT.TBL_VOICECHAT_NEW1 REFRESH FAST ON DEMAND START WITH sysdate+0 NEXT sysdate+(15/86400*60);
    Also there is 5 indexes on this MATERIALIZED view.
    Problem is ::
    Sometimes it is refreshing properly in time and taking approximate 5-8 min to refresh. But sometimes it seems to be like hang or when I m checking the job for refreshment its only showing runnning.
    SQL> set time on
    11:44:02 SQL> alter session set nls_Date_format='dd-mon-yyyy hh24:mi:ss';
    Session altered.
    11:44:03 SQL> select mview_name ,last_refresh_date from dba_mviews;
    MVIEW_NAME LAST_REFRESH_DATE
    MGMT_ECM_MD_ALL_TBL_COLUMNS 20-jan-2011 11:44:40
    TBL_VOICECHAT_NEW1 07-jun-2012 09:44:54
    11:44:33 SQL> select * from dba_jobs_running;
    SID JOB FAILURES LAST_DATE LAST_SEC THIS_DATE THIS_SEC INSTANCE
    2893 252 0 07-jun-2012 09:44:51 09:44:51 07-jun-2012 11:14:06 11:14:06 0
    11:44:34 SQL>
    Now What to do and why it is not refreshing properly. DB link is working fine. no network issue is there. no locking is there on db.
    Kindly tell me where to check related to this issue. or what I can do for this.
    thanks in Advnace
    Pradeep.
    >Hi,
    I have an issue with my MATERIALIZED view refreshment.
    Server170 having schema "Afccv" with the table name " Tbl_voicechat".
    Server 169 having a db link name "SERVICEDB1" point to same server.
    MATERIALIZED view on server 169 DB user "smschat" with the following code ::
    CREATE MATERIALIZED VIEW "SMSCHAT"."TBL_VOICECHAT_NEW1" TABLESPACE "SMSCHAT"
    BUILD IMMEDIATE
    REFRESH FAST
    AS SELECT <COLUMNNAMES>
    FROM AFCCV.TBL_VOICECHAT@SERVICEDB1;
    Refreshment time is 15 min.
    alter MATERIALIZED VIEW SMSCHAT.TBL_VOICECHAT_NEW1 REFRESH FAST ON DEMAND START WITH sysdate+0 NEXT sysdate+(15/86400*60);
    Also there is 5 indexes on this MATERIALIZED view.
    Problem is ::
    Sometimes it is refreshing properly in time and taking approximate 5-8 min to refresh. But sometimes it seems to be like hang or when I m checking the job for refreshment its only showing runnning.
    SQL> set time on
    11:44:02 SQL> alter session set nls_Date_format='dd-mon-yyyy hh24:mi:ss';
    Session altered.
    11:44:03 SQL> select mview_name ,last_refresh_date from dba_mviews;
    MVIEW_NAME LAST_REFRESH_DATE
    MGMT_ECM_MD_ALL_TBL_COLUMNS 20-jan-2011 11:44:40
    TBL_VOICECHAT_NEW1 07-jun-2012 09:44:54
    11:44:33 SQL> select * from dba_jobs_running;
    SID JOB FAILURES LAST_DATE LAST_SEC THIS_DATE THIS_SEC INSTANCE
    2893 252 0 07-jun-2012 09:44:51 09:44:51 07-jun-2012 11:14:06 11:14:06 0
    11:44:34 SQL>
    Now What to do and why it is not refreshing properly. DB link is working fine. no network issue is there. no locking is there on db.
    Kindly tell me where to check related to this issue. or what I can do for this.
    thanks in Advnace
    Pradeep.
    Hi All,
    Some more queries I also being use to check this process working
    11:44:34 SQL> select LAST_DATE,LAST_SEC,THIS_DATE,THIS_SEC,NEXT_DATE,NEXT_SEC,TOTAL_TIME,BROKEN from dba_jobs where job=252;
    LAST_DATE LAST_SEC THIS_DATE THIS_SEC NEXT_DATE NEXT_SEC TOTAL_TIME B
    07-jun-2012 09:44:51 09:44:51 07-jun-2012 11:14:06 11:14:06 07-jun-2012 11:14:04 11:14:04 44877 N
    11:49:28 SQL> SELECT t.used_ublk, t.used_urec FROM v$session s, v$transaction t WHERE s.taddr=t.addr and s.SID =2893 ;
    USED_UBLK USED_UREC
    389 27054
    11:49:59 SQL> /
    USED_UBLK USED_UREC
    390 27084
    11:50:02 SQL>

  • Scope problem

    here is the function:
    public void readVector(File file)
    AddressBook addressBook = new AddressBook();
    try
    String string, token1 ="", token2 ="", token3 ="", token4 ="",
    token5 ="", token6 ="";
    FileInputStream fis1 = new FileInputStream(file);
    BufferedReader in = new BufferedReader(new FileReader(file));
    StringTokenizer st;
    while((string = in.readLine()) != null )
    st = new StringTokenizer(string);
    token1 = (st.hasMoreTokens())?st.nextToken():"";
    token2 = (st.hasMoreTokens())?st.nextToken():"";
    token3 = (st.hasMoreTokens())?st.nextToken():"";
    token4 = (st.hasMoreTokens())?st.nextToken():"";
    token5 = (st.hasMoreTokens())?st.nextToken():"";
    token6 = (st.hasMoreTokens())?st.nextToken():"";
    Contact c = new Contact(token1, token2, token3, token4, token5, token6);
    addressBook.addContact(c);
    catch(Exception ex)//catch exception and print stacktrace if try fails
    ex.printStackTrace();
    problem- some how I need to return the addresBook to another class, I can't do this because of a scope problem. Also if a solution is possible how would I call teh function in my other class.
    if this function returns an addressbook
    the prototype would be:
    AddressBook readVector(File file);
    how would I call this functino from another class to obtain the addressbok.

    I dont know what you mean by scope problem. Maybe you wanna elaborate on that a bit more. However, returning AddressBook should be straightforward. You can actually do it in two slightly different ways.
    1. You can define your readVector() method to be static:
    public static AddressBook readVector(whatever arguments) {
    ....your code here...
    Assuming you defined this method in class "foo", you can call this method using foo.readVector(arguments). In your calling function, you will probably have something like:
    AddressBook addressbk = foo.readVector(arguments);
    2. If you dont want to make your readVector() static, you will have to instantiate the class which contains this method. Again assuming class "foo" contains a definition like:
    public AddressBook readVector(args) {
    ....your code...
    In your calling method you will do the following:
    foo foo_obj = new foo();
    AddressBook addrbk = foo_obj.readVector(arguments);
    Of course, in either case your foo class has to be visible to the calling method. If your foo class is part of a different package, you will need to import it in the calling class.

  • View Scope in JSF with template

    Hello,
    I have one view template with scope view in jsf, When I navigate to other page the jsf don't close the session, because it's view template and the pages are fragments.
    Do you know this problem?
    Thank you!

    Your question makes absolutely no sense. No, you don't want to kill a session. Why don't you go figure out what the session really is so you stop using wrong terminology, and then go figure out what you are talking about so you can ask a question that does make sense.

  • Problem doing JSF tutorial - design view not working

    Hi everyone.
    I am fairly new to Java and followed the tutorial bellow to styart learning about it.
    http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/adf_richclient/adfrichclient.htm#o
    I managed to finish the tutorial using the structure explorer because the design view wasn't working for me. Whenever I make a JSF Template and use it to make another JSF page, the design view does not shows the facet I've added, thus I cannot put any components using the design view. I basically fail to get the screen shown at #4 of the "Create a Page Using the Page Template" section in the tutorial.
    Am I missing a configuration or something ?
    Thanks.

    I tried looking at the logs (with the option on) and didn't see anything. I'll continue to investiguate on this.
    Here is the template code followed by the "child" page code. On the page code, I can't put anything inside the facet using the designer, but using the structure, I can.
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <af:pageTemplateDef var="attrs">
    <af:decorativeBox id="pt_db1">
    <f:facet name="center">
    <af:panelSplitter id="pt_ps1" orientation="vertical"
    splitterPosition="25" positionedFromEnd="true">
    <f:facet name="first">
    <af:panelSplitter id="pt_ps2">
    <f:facet name="first">
    <af:panelAccordion id="pt_pa1">
    <af:showDetailItem text="showDetailItem 1" id="pt_sdi1"/>
    </af:panelAccordion>
    </f:facet>
    <f:facet name="second">
    <af:facetRef facetName="content"/>
    </f:facet>
    </af:panelSplitter>
    </f:facet>
    <f:facet name="second"/>
    </af:panelSplitter>
    </f:facet>
    <f:facet name="top"/>
    </af:decorativeBox>
    <af:xmlContent>
    <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
    <display-name>master</display-name>
    <facet>
    <facet-name>content</facet-name>
    </facet>
    <attribute>
    <attribute-name>Title</attribute-name>
    <attribute-class>java.lang.String</attribute-class>
    <default-value>*Default Title</default-value>
    </attribute>
    </component>
    </af:xmlContent>
    </af:pageTemplateDef>
    </jsp:root>
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:pageTemplate viewId="/templates/master.jspx"
    value="#{bindings.pageTemplateBinding}" id="pt1">
    <f:facet name="content"/>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Edited by: 833334 on Feb 2, 2011 2:28 PM --> Replaced with smaller code that has the same issue.

  • JSF Design Time View Not working correctly for ADF/JSF components

    My project is not using any external tag libraries. It is based purely on ADF core/html and JSF core/html components. The design time view does not show the appropriate presentation, everything is shown as nexted frame containers (I suppose how you would show a component that does not have a visual representation).
    If I create a new project and copy my jsp (jsf) pages over they show perfectly. I did this activity and all was going well in the new project and then I lost the design time view again. I cannot tell you what I did to cause the issue, maybe it was a modification to the web.xml as has been suggested in some other threads. Can anyone tell me what I should be looking for that causes this problem, what corrective actions I might take to eliminate the issues

    Ok I have isolated this issue. In my phase listener I had this line of code:
    private static final Logger _logger =  Logger.getLogger(EigRequest.class.getPackage().getName());
    and I changed it to
    private static final Logger _logger =
    Logger.getLogger(EigRequest.class.getName());
    and design mode started to work. I guess either of the above works for me although I do not understand why the line works when you run the application but not in design mode.
    Moral to the story is if something fails in any one of these types of decorators you will drop into a raw view mode. The question I have is if errors are occuring how do I figure out where they may be. There is no indication that anything is wrong with the exception that you lose most of the design mode functionality.
    This was not a compile issue, this was not a runtime issue. It took me quite a few hours of writing a test program to validate that it was not just writing a phase-listener issue; then launching, editing, relaunching the application to find the problem. I will say that a good portion of the code came from a Eclipse project. If you add the offending lines of code while using JDeveloper you do not loose design mode immediately. You only see the problem the next time you start JDeveloper which complicates finding the problem.

  • JSF 2.0 Ajax navigation problem

    Hello
    I have some problem with new AJAX functionality of JSF 2.0.
    I want to do the navigation between two pages via AJAX because it looks more smooth and I have the possibility to show a wait screen during the server request.
    Here is a short example. I have two facelet page (page1.xhtml and page2.xhtml)
    page1.xhtml
    <h:form>
            <h:commandLink value="Go to page 2" action="page2">
                <f:ajax render="@all" execute="@all"/>
            </h:commandLink>
    </h:form>
    .....page2.xhtml
    <h:form>
                <h:commandLink value="Go to page 1" action="page1">
                    <f:ajax render="@all" execute="@all"/>
                </h:commandLink>
    </h:form>
    ....The example is very simple. Two pages and on each page is a link to navigate to the other page. I open the page1.xhtml in my browser and I click on the link. The first request is processed as expected. The second pages is displayed successfully. Now I want to go back to the other page. If I click on the link ("Go to page 1") nothing happens. If I click a second time on the link the navigation is working agian. Why I have to click twice? Is this a bug or feature of jsf? Do I use the <f:ajax> feature wrong?
    I did some investigations with firebug and what I can see is that after the second click on page2.xhtml a hidden field is available.
    <input type="hidden" name="javax.faces.ViewState" value="-6158142916843935211:2501145469136072012">
    If I add this hidden field via firebug into the page the navigaiton back to the first page is working after the first click. Why is this hidden field only after the second click available?
    Any ideas what I'm doing wrong?
    Thanks in advance

    I found the problem and a solution :-) The missing piece of the puzzle was the id attribute for the form tag. After some debugging of the JSF JavaScript I found the solution.
    The JavaScript function response(request, context) is invoked to handle the server response. Inside this function the doUpdate(element, context) is invoked.
    The doUpdate() function is doing the modification of the DOM. The function doUpdate() is two times invoked for a response. The first time the html elements are updated.
    The second time the view state hidden field is updated or created but only under the following condition:
    Comment in the JavaScript source code of the jsf.js
    //Now set the view state from the server into the DOM
    //but only for the form that submitted the request.If the forms of the both side haven't the same id the form can't be found on the second page.
    In the following way it is working:
    page1.xhtml
    <h:form id="myform">
            <h:commandLink value="Go to page 2" action="page2">
                <f:ajax render="@all" execute="@all"/>
            </h:commandLink>
    </h:form>
    .....page2.xhtml
    <h:form id="myform">
                <h:commandLink value="Go to page 1" action="page1">
                    <f:ajax render="@all" execute="@all"/>
                </h:commandLink>
    </h:form>So always set an explicit id for each JSF tag.

  • JSF UI component view restore.

    Good day,
    Please help me with my problem.
    The problem is:
    I use this http://myfaces.apache.org/tomahawk/panelNavigation2 to make a menu on my site. Component renered perfect: I can open submenu items, click on them, todo some actions and so on. But if I will be redirected to another page the view of my menu cleared. I mean, that all items collapsed and there is no active menu item what had been clicked.
    How can I realise a component view saving for example in session? I mean, If I click on some item I want to see this item opened after refresh.
    This problem not in http://myfaces.apache.org/tomahawk/panelNavigation2 realisation, because if I use another components of the same type (rich components from JBOSS for example) I have the same....
    Please help me!

    I don't use tomahawk but in other similar components you have a flag or something that controls state, like expanded/collapsed, selectedItem, etc.
    The problem is that the component will remember the state because it saves it internally as a local value. Thus as long as you are using the same view (viewId) the component state is stored in the component tree. The minute you go to another view, that view state is lost.
    The answer is typically to create a managed bean, put it is session scope, and have it hold the view state. That way when you return to the view all of the expanded/collapsed, selectedItem, etc information is restore correctly.

  • Datatable: reuqest scope problem

    Hi everyone
    Im using A textfield where the user can input a searchstring. After he submits, a datatable is shown (dynamically generated) with the search results.
    My problem is, after the user submits, the request bean is set to null again, so if i want to get the next page (paging function) also the datatable object in the bean is null again and thus cannot get the next rows.
    I know i can avoid this problem by setting the bean scope to session, but actually im looking for a better solution. Can anyone help me? Im using JSF RI.
    Thanks for your help.

    One way of doing it is answered by BalusC
    Another way of doing it is by using *<a4j:keepAlive>* tag. For more information regarding this tag please visit the following web site :
    [http://livedemo.exadel.com/richfaces-demo/richfaces/keepAlive.jsf?c=keepAlive|http://livedemo.exadel.com/richfaces-demo/richfaces/keepAlive.jsf?c=keepAlive]

Maybe you are looking for

  • ORACLE 8I 에서 ELIMINATED ,UNDERSCORE 된 PARAMETER

    제품 : ORACLE SERVER 작성날짜 : 2000-03-21 initSID.ora 에 사용되는 파라미터 중에 8i 에서 Eliminated, Underscore 된 파라미터입니다. SQL> select kspponm Name, decode( KSPPOFLG,1,'Eliminated','Underscore') Setting from x$ksppo order by Setting, name; NAME SETTING allow_partial_sn

  • Program name for Web page

    Helo Experts, I have a transaction which opens a web page. Its a page with many tabs n tables n drop down menu. Each of which will open a different view. The web page is a development in webdynpro for abap... I tried finding in SE80... for which i lo

  • FDMEE : Batch Loader Issue

    Dear All, I am facing problem with Batch loader. It was working fine earlier but not now. The changes made between working and not working status is UNC update. UNC details got updated from F:/FDMEE to \\frs-ICT-03\FDMEE.  Below mentioned is error. E

  • Attach files in email

    when I opens my mail account in browser I cant find any attachment options how do I attach my files from there.is it the phone bug??but when I opens the email from hub there is available the attachment option.then why not I see in browser. Solved! Go

  • TS3682 on trying to reset ipod, screen now goes white, apple disappears, computer not picking up ipod, its only 5 months old

    On trying to reset ipod, screen has now gone white, computer not registering it, can't turn off ipod.  Its only five months old.  Please help