Decode not called for all UIComponents in tree

Many of the faces .jsp pages I have been working with in EA2 have not been updating their models properly.
The symptom I have observed is that the decode method is not called for all of the UIComponents on the page.
I think I have tracked this down to a bug in the class com.sun.faces.tree.TreeNavigatorImpl. This class appears to be used internally by some of the .jsf code to navigate the component tree.
Studying various stack traces, it looks like the method TreeNavigatorImpl.getNextStart() is supposed to provide a preorder traversal of the component tree. Starting from the root of the tree, each call is expected to return the next node. Experimental evidence suggests that it is not doing that properly, and it fails to visit all the nodes in the tree.
For example, if my component tree looks like this (this is a representation of the tree; not an example of a .jsp page):
<node id = "/">
   <node id = "page">
      <node id = "carStoreForm">
         <node id = "ba0">
             <node id = "ba1">
                 <node id = "ba3"/>
                 <node id = "br4"/>
             </node>
         </node>
         <node id = "bold1"/>
         <node id = "more1"/>
      </node>
   </node>
</node>A preorder traversal of these nodes should visit nodes:
'/page'
'/page/carStoreForm'
'/page/carStoreForm/ba0'
'/page/carStoreForm/ba0/ba1'
'/page/carStoreForm/ba0/ba1/ba3'
'/page/carStoreForm/ba0/ba1/br4'
'/page/carStoreForm/bold1'
'/page/carStoreForm/more1'
However, when I write test code that calls TreeNavigatorImpl.getNextStart() directly, only the following nodes are returned:
'/page'
'/page/carStoreForm'
'/page/carStoreForm/ba0'
'/page/carStoreForm/ba0/ba1'
'/page/carStoreForm/ba0/ba1/ba3'
'/page/carStoreForm/ba0/ba1/br4'
It looks to me like the method loses track of the state of the traversal, and prematurely returns null before all the nodes are visited. (It is failing to return the "bold1" and "more1" nodes.)
This is all extremely speculative. Without jsf source or doc for any of the tree classes, it is difficult to know what is supposed to be going on. And, of course, I may just have a bug in my code.

Okay, rather than wait for Max to respond, I decompiled the TreeNavigatorImpl class myself and studied the source code. The
problem arises in the getNextStart() method. If the method returns
a null value, then presumably the class has successfully traversed
the entire tree in preorder. Unfortunately, there was a slight
logic error that would halt traversal after you got to the last node
of the last subtree at the beginning of your travels.
The following code should correct this situation (let me know if I've
introduced any new problems into the mix...). I tested this out using the simple example that Max describes above. The test code appears at the end of my revised method:
public UIComponent getNextStart() {
UIComponent cur = null;
if (startTraversalDone) {
return cur;
if (startStack.empty()) {
cur = root;
Iterator iter = cur.getChildren();
if (iter.hasNext()) {
startStack.push(iter);
else {
while (!startStack.empty()) {
     Iterator iter = (Iterator) startStack.peek();
     if (iter != null && iter.hasNext()) {
     cur = (UIComponent) iter.next();
     Iterator childIter = cur.getChildren();
     if (childIter != null && childIter.hasNext()) {
     startStack.push(childIter);
     else {
     if (!iter.hasNext()) {
     startStack.pop();
     break;
else {
     startStack.pop();
if (startStack.empty()) {
startTraversalDone = true;
if (cur != null) {
endStack.push(cur);
return cur;
     public static void main(String[] args) {
          MyComp root = new MyComp("root");
          // build tree....
          MyComp page = new MyComp("page");
          root.addChild(page);
          MyComp csf = new MyComp("csf");
          page.addChild(csf);
          MyComp ba0 = new MyComp("ba0");
          csf.addChild(ba0);
          csf.addChild(new MyComp("bold1"));
          csf.addChild(new MyComp("more1"));
          MyComp ba1 = new MyComp("ba1");
          ba0.addChild(ba1);
          ba1.addChild(new MyComp("ba3"));
          ba1.addChild(new MyComp("ba4"));
          MyTreeNavigator nav = new MyTreeNavigator(root);
          MyComp comp = null;
          while ((comp = (MyComp) nav.getNextStart()) != null) {
               System.out.println(comp.getComponentId());
public class MyComp extends UIComponentBase {
     public MyComp(String id) {
          this.setComponentId(id);
     public String getComponentType() {
          return "MyComp";

Similar Messages

  • Hi there I'm wanting 2 phones 1 for wk an a good ph for out of wk on 1 SIM card so I can finish wk put that ph down an use my good ph not call diversion , all these flash apps an you can't do this from any ph so I've been told iPad, iOS 6.1.3

    Hi there I'm wanting 2 phones 1 for wk an a good ph for out of wk on 1 SIM card so I can finish wk put that ph down an use my good ph not call diversion , all these flash apps an you can't do this from any ph so I've been told
    iPad, iOS 6.1.3

    why don't you post using full words, no abbreviations, and proper punctuation?  Then perhaps your question will actually be legibile.

  • I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build.  The same call works fine when running on the device

    I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build. The same call works fine when running on the device (iPhone) using debug build. When running with a release build, the result handler is never called (nor is the fault handler called). Viewing the BlazeDS logs in debug mode, the call is received and send back with data. I've narrowed it down to what seems to be a data size issue.
    I have targeted one specific data call that returns in the String value a string length of 44kb, which fails in the release build (result or fault handler never called), but the result handler is called as expected in debug build. When I do not populate the String value (in server side Java code) on the object (just set it empty string), the result handler is then called, and the object is returned (release build).
    The custom object being returned in the call is a very a simple object, with getters/setters for simple types boolean, int, String, and one org.23c.dom.Document type. This same object type is used on other other RemoteObject calls (different data) and works fine (release and debug builds). I originally was returning as a Document, but, just to make sure this wasn't the problem, changed the value to be returned to a String, just to rule out XML/Dom issues in serialization.
    I don't understand 1) why the release build vs. debug build behavior is different for a RemoteObject call, 2) why the calls work in debug build when sending over a somewhat large (but, not unreasonable) amount of data in a String object, but not in release build.
    I have't tried to find out exactly where the failure point in size is, but, not sure that's even relevant, since 44kb isn't an unreasonable size to expect.
    By turning on the Debug mode in BlazeDS, I can see the object and it's attributes being serialized and everything looks good there. The calls are received and processed appropriately in BlazeDS for both debug and release build testing.
    Anyone have an idea on other things to try to debug/resolve this?
    Platform testing is BlazeDS 4, Flashbuilder 4.7, Websphere 8 server, iPhone (iOS 7.1.2). Tried using multiple Flex SDK's 4.12 to the latest 4.13, with no change in behavior.
    Thanks!

    After a week's worth of debugging, I found the issue.
    The Java type returned from the call was defined as ArrayList.  Changing it to List resolved the problem.
    I'm not sure why ArrayList isn't a valid return type, I've been looking at the Adobe docs, and still can't see why this isn't valid.  And, why it works in Debug mode and not in Release build is even stranger.  Maybe someone can shed some light on the logic here to me.

  • WL6.1 : Get '404 : File not found' for all WARs

    I had some web applications deployed which were running perfectly. Now suddenly
    , I get '404 - File not found' for any URL - including the server root, i.e. http://localhost/
    I was able to access admin console using http://localhost/console. I checked the
    config of each application & couldn't find anything wrong.
    Finally I had to re-deploy the WARs to get some applications running.
    However, I am still unable to get the Default Web App running - the one handling
    server root path.. (I've checked the server config & it shows DefaultWebApp as
    the default application).
    Any pointers on what could be wrong / correction needed ?
    TIA,
    Subodh

    Create a subdirectory called 'classes' and copy your servlet class file
              to the 'classes' dir.
              mydomain/applications/
              DefaultWebApp/
              WEB-INF/classes.
              Modify the web.xml file located in the mydomain/applications/
              DefaultWebApp/
              WEB-INF/ directory
              <web-app>
              <servlet>
              <servlet-name>
              myServlet
              </servlet-name>
              <servlet-class>
              package.name.myServlet
              </servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>
              myServlet
              </servlet-name>
              <url-pattern>
              servlet-url-pattern
              </url-pattern>
              </servlet-mapping>
              </web-app>
              Start the default WebLogic Server.
              Call your servlet from a Web browser with the following URL:
              http://localhost:port/servlet-url-pattern
              servlet-url-pattern is the value of the <url-pattern> element that you
              defined in the web.xml file.
              prakash wrote:
              > Hi everybody ,I have this web app on weblogic 7 .The application
              > works file with Tomcat 4.0 but on WebLogic server 7,I am getting
              > 404 not found for all the servlets ,although weblogic is serving
              > the html files without any problems
              

  • CreateRowFromResultSet not called for first row

    Hi all,
    Jdev Version: 11.1.1.7.0
    I have an XML stored in DB as  a CLOB. I fetch this XML as a CLOB (using clobdomain) in my VO and need to populate a few other transient attributes. I attempted to achieve this by overriding (as per blog entry) method 'createRowFromResultSet'. I observe a weird behaviour where this method does not get invoked for the first row alone.
    A while back, I see another member suffer from a similar issue - forum thread. Is this a bug that appears when using clob and overriding this method?
    Thanks in advance,
    Srini

    Hi,
    we have the same problem. The method createRowFromResultSet() is not called for the first row. We don't have a CLOB. We have a primary key of type Raw. Maybe this is causing the problem.
    We are using JDev 11.1.1.6.
    Regards,
    Linda

  • Excise is not captured for all or Second line item.

    Dear Experts,
    Excise is not updating for all the line items in while making Goods Receipt.
    while making goods receipt excise is not capturing for all the line items.
    but excise is captured at header level,its presumed that all the line items
    are capturing excise,please suggest me,what might be the reason.
    Thanks in advance.
    Varun

    Hello,
    As i think, you are creating Goods receipt With Excise option "Only Part1" in MIGO, then system will update only J_1ipart1 table with qty and without internal document number, after J1IEX only system will Update J_1IEXCDTL  table with all value and qty and internal document number.
    Suppose you have done the GR -Option' 'No excise entry" then system will not generate any Excise realted tables. Then you should  Capture Part1 entry with help of J1I5 t code, then system will update qty field , here also system will not update internal doc number.
    Write a Updation program for J_1IPART1 table for qty field
    Mahesh Naik

  • Key focus is not visible for all objects when tabbing

    I'm using LabView 5.1.
    The key focus is not visible for all objects when tabbing through a "disabled and grayed-out" object.
    For example, let's say I create a panel with 3 buttons. If I create a "disabled" attribute for button 2 and assign the value "2" (disabled and grayed-out) to it. When I will run this VI, the key navigation will go through button 1 and button 3 (skipping button 2 as expected) but the key focus on button 3 will not be visible.
    Is this a bug with LabView or am I doing something wrong ?

    Hi Ben,
    Don't worry, time is not an issue... I'm posting an example of a VI with the problem I described. I noticed that the problem occurs only with "dialog buttons".
    When you have time, let me know if you see the same behavior. If you do, I will report the problem to National Instrument.
    Thanks for your time !
    BigBen
    Attachments:
    3buttons.vi ‏22 KB

  • CsrAttachmentUploadDiv part attachment is not rendered SP 2013(Attach file in not working for all the list forms)?

    csrAttachmentUploadDiv partattachment  is not rendered SP 2013(Attach file in not working for all the list forms)?
    Ravi
    function ShowPartAttachment() {
    ULSopi:
        if (document.getElementById("part1") == null || typeof document.getElementById("part1") == "undefined") {
            alert(Strings.STS.L_FormMissingPart1_Text);
            return;
        (document.getElementById("part1")).style.display = "none";
        (document.getElementById("partAttachment")).style.display = "block"; //problem here

    Am also facing the similar problem....any iputs are highly appriciated.
    Issue..
    1) Defined the attachment type in IMG.
    2) Added the attachment type "SFREEATTM" by selecting other attributes---> Attachment Types.
    3) Attached the excel file in the design.
    See the screen shot below:
    The Issue is when testing through tcode nwbc in the inbox the attachment tab is not visible after selecting the particular form.
    Please see the screen shot below:
    Did i miss any Configuration?? Please suggest...
    Regards,
    Naveen

  • Will it be ok if API  DestroyJavaVM is not called at all?

    As mentioned on http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4712793
    DestroyJavaVM does not destroy java vm.
    Is it still required to call this API while exiting the program or will it be ok if API DestroyJavaVM is not called in entire program?
    Edited by: ketu1 on Apr 2, 2009 2:41 AM

    will it be ok if API DestroyJavaVM is not called at all?It doesn't do anything, so yes.

  • Decode function not called for a custom component

    I know this problem happened in the past - in the EA2, EA4 and I believe the beta version as well, but does anyone know if it has been solved for the release ?
    In short - I'm working with the release, created a menuBar component and the decode method in the renderer is not called after I submit the page. In the past, there were rumors that this happened due to relative paths in the JSP (for js files, images, etc.).
    Does anyone else have this problem ? or better , know how to solve it ?
    Thanx,
    Netta.

    It's not that simple - The component is getting rendered, all the encode methods are called and the decode is called also , but only the first time the form is submitted.
    I added this custom component to the guessNumber application, and I have a menuBar in the greeting.jsp that leads to the response.jsp and vice versa. it looks like this in the greeting.jsp page -
    <!-- Start Menu -->
    <t:MenuBar id="bar1" styleClass="myClass" >
    <t:Menu id="menu1" name="menu1">
    <t:Menu id="menu2" name="menu2">
    <t:MenuItem id="item2_1" name="item2_1" action="/mytest/guess/response.jsp"/>
    <t:MenuItem id="item2_2" name="item2_2" action="http://www.msn.com"/>
    <t:Menu id="menu3" name="menu3">
    <t:MenuItem id="item3_1" name="item3_1x" action="http://www.msn.com"/>
    </t:Menu>
    </t:Menu>
    </t:Menu>
    <t:MenuItem id="item3" name="item3" action="http://www.cnn.com"/>
    </t:MenuBar>
    <!-- End Menu -->
    In the response it looks like this -
    <!-- Start Menu -->
    <t:MenuBar id="bar2" styleClass="myClass" >
    <t:MenuItem id="item3" name="item3" action="/mytest/guess/greeting.jsp"/>
    </t:MenuBar>
    <!-- End Menu -->
    and every time a menuItem is clicked on, the JS calls submit form.
    Since the menus are rendered, I assume there's nothing wrong with the rendererType and any other renderer problem. Since the decode is called only once, I assume the right form is being submitted.
    So, what can cause it to stop calling the decode ???
    Could it be that becase I go directly to the page and not through the navigation rules ( I call window.open directly from the JS), it creates a problem ??
    Please help, I've been wasting so much time on this !
    Netta.

  • Why is VO getter not called for custom VO attributes?

    Hi,
    The requirement is to add couple of fields on a OAF page. Here is what I did:
    - Created custom VO by extending the standard VO
    - Added fields to the page via personalization.
    The issue is that the values for the custom fields on the page were not showing up. On investigation, I found the VORowImpl getter getAttrInvokeAccessor was not being called for my custom attribute. I tried to check the difference between the attributes for which the getter was called and for which it was not called. I couldn't find any and I'm totally left clueless as to what determines the getter to be called.
    Really appreciate your help to move ahead.
    Thanks,
    Anil
    Edited by: AnilMenta on Mar 5, 2013 10:40 AM

    Hi Anil,
    First of all, Could you please make sure that Extended VO is being picked up during the execution of the page . Ensure that extended VO is substituted
    If the VO is substituted then try Steps below
    1. Enable the diagnostics .. show log on page statements
    2. Search for your custom VO name .
    If you can find your extended VO here, then substitution is right and page is picking up the extended VO.
    Thanks

  • ActionListener,action  called for all buttons.

    hi,
    I have developed my own toolbar in that i have my own buttons as input type='image' I have attached action and actionListener for that tag.
    Problem...
    If i give action or actionListener to one button it is invoked for all the buttons but i did't speacified for other buttons. Where the problem lies??
    plz help me i am stuck in my work.
    here's my jsp.
    <av:toolbar enabled="true" id="tbar" rendered="true" bar="lower">
                        <av:tbItem enabled="true" type="delete" actionListener="#{registar.countryChanged}" action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="edit" actionListener="#{registar.countryChanged}" action="second_page"></avaya:tbItem>                                             
                        <av:tbItem enabled="true" type="convert" actionListener="#{registar.countryChanged}" action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="print" actionListener="#{registar.countryChanged}" action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="view" actionListener="#{registar.countryChanged}"action="second_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="seprator" ></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="sched" action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="move" action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="copy" action="second_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="design" actionListener="#{registar.countryChanged}"action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="ddbtn" actionListener="#{registar.countryChanged}" value="#{toolbarBean.list}" action="third_page"></avaya:tbItem>                                                                                                                             
                   </av:toolbar>     
    Here see some where i have given action ,actionListener somewhere not but both of the attributes are invoked on every button.
    Message was edited by:
    prashantak

    You are on the right track.
    Implement a diaolgListener for the dialog. It'll be called when you click the ok button of the dialog. delete the record from the listener. If the user clicks the cancel button, the dialog just closes without giving you any event. This is OKif you just want to cancel the deletion of the record (no rollback needed, just abort the action). If you need more control over the process use a panelWindow inside a popup. There you can use the normal action listeners for buttons.
    Timo

  • #550 5.1.1 RESOLVER.ADR.RecipNotFound; not found ## for all emails to one of my domains

    Hi All
    I can see this question has been asked allot, but none of the answers seem to be the same as my issue
    Exchange  2007 / SBS 2008
    I have 3x domain email addresses for all of my recipients
    @domain1.com (default reply)
    @domain2.com
    @domain3. com
    @domain4.com
    all of a sudden, all emails getting sent to anyone with @domain2.com are bouncing, to start with there was no reponse, but the mail logs were showing "550 5.1.1 User unknown" in the logs
    So I unticked "Block messages to recipients not listed in the GAL" on exhange anti spam, after this the messages were getting to the exchange server, but then getting bounced with the above message
    I have tried removing domain2.com from the email address policy and the acceprted domains, and readding it, but it made no difference 
    all my other domains still work fine, its only this one
    I'm at my wits end with this, if anyone can shed some light it would be appreciated 
    Let me know what other info i need to provide 
    Cheers

    No issues related to the GAL in the event log
    I have disabled all the anti spam features
    first I restarted all the services, no change, then I booted the whole sever and that made no difference 
    all the domains are set up as authoritive
    the domain2.com is a seccondary email address for all users, so
    user1 has
    [email protected], [email protected], [email protected], [email protected]
    I can email successfully to user1 on all emails execpt for [email protected], that bounces, and the same issue occurs for everyone not just mail sent to user1, so its definitely related to domain2.com
    it's really odd
    any other ideas
    Cheers

  • FORMS: Reader Enabled forms are not saving for all users

    I have created several fillable forms with both Acrobat Pro 8 & 9. All have been created with Extend Reader Rights In my testing i have success saving the forms in Reader (various versions as old as 7).
    After sending the forms out via email the saving functionality is hit and miss for all of our employees. Some can save others cannot. I can't seem to find a common thread as to why this is happening.
    All forms are created on a Mac OS X 10.6.1 and then sent out via email to Windows and Mac users about 50/50. Both OS users are having trouble
    There is no need to collect the data on a server or anything just trying to make it easier and waste less paper. We don't mind send PDF attachments all the time.
    Any help would be great!
    Thanks!

    here is one of the forms that is not working in Reader (except on my wife's PC and another Mac) it is the current PDF form i am having trouble with. If we can resolve the issue then it will help me resolve my other forms too. I have made them all using the same process. (Maybe therein lies a problem)
    Form Creation Process:
    Create initial page layout in Pages (mac app for those that are not familiar)
    Export as PDF
    Open PDF in Acrobat Pro 9 (started making forms in v8 now i am working in v9 - both have produced this problem)
    Run Form wizard, adjust fields, save final version of form
    Extend Features in Adobe Reader (via Advanced menu) - Follow steps to save a new Reader Enabled version
    Email new RE version to co-workers
    All can fill out the form, only a couple can actually save the partially completed / fully completed form for reference, filing, or submission.
    Am I missing something? Thanks for all the help so far!

  • Resolve installed Flash player not excuted for all the Vista users on my PC?

    I have a Windows Vista 32-bits system.
    I have created 2 admin and 2 standard users.
    Internet Explorer 9 (IE9) 32 bit is installed but also Chrome and Firfox are used.
    For 1 admin user Flash works fine when accessing a site in IE9 that requires Flash.
    For the other users, including the admin user, IE9 must be run "as adminstrator" by specifically choosing that option.
    If not run "as administrator" IE9 states that Flash needs to be installed. That either leeds to Flash player not being installed (error is that it is already installed) or that after a succesful installation the problem simply occurs again (and again and again ...)
    I want the standard users on the pc to be able to navigate to trusted sites without running IE9 in "as adminstrator" mode.
    What do I need to do?
    Can I set Adobe Flash player to be available for all the users for Vista and IE9?
    Do I need to alter registry settings manually?
    If yes - how and which?
    Thanks in advance.

    Chris,
    Thanks for the reply but unfortunately it does not resolve the problem.
    Other users (including the other system administrator) still need to run IE as administrator.
    When in my sysadmin account the shortcuts for other users to a URL requiring Flash and using IE9 execute fine GRRRRRRR.
    This is very frustrating.
    On my pc Chrome aand Modzilla have no problems.
    The childrens protective software I have however is based on IE.
    Do you have any more suggestions?
    My alternative is to downgrade IE9 to IE8 or 7 but that is also not an easy exercise ...
    Thanks in advance for any input.

Maybe you are looking for

  • "no data found" when trying to generate report

    Hi, I have a problem when I try to generate a report. It says "no data found", but the property figures in the data collection on the host. With another property, I get the graph (Overall % CPU Utilization), but with this (Overall % CPU Idle) I get o

  • Error when i click on layout tab in transaction SFP

    Hi Experts, I am using SAP GUI 7.1 and Adobe reader 8.0.1. but getting follwing error. Could not start Layout Designer (see long text) This is the long text. Diagnosis The forms design tool for developing the form layout could not be started; either

  • "Access Privileges Error" in iTunes 5

    I get an error message when I close the prefs box in iTunes 5.0.1. The error tells me iTunes tried to update the default player for audio files but I don't have enough "access privileges" to do this. This happens the first time I close the prefs box

  • Install base based on ship to and sold to

    Hi , How i can find install base from table level based on 1. Sold to party 2. Ship to party Thanks , Nitin

  • Upgrading from Panther 10.3.8 to Tiger

    Is this as straightforward as buying the upgrade? Can i just load this over the top, currently having to run Leonardo ISDN software, does this have any issues with Tiger? Thanks