Programmatic changes to HtmlForm do not get rendered

What I want to do sounds actually very simple:
I have a form containing a button which when clicked should dynamically add new components (input field, text) to the form. These components are added programmatically in the backing bean method which is called when the button gets clicked.
When checking the HtmlForm component in the debugger these objects properly appear in childrenList of the form object and they add up there when clicking the button multiple times.
The problem is, that the created components never appear on the page in the browser. I've been looking now for quite some time but didn't find any solution to this problem. It seems that the renderer just doesn't know that the component tree has changed. Do I have to notify the JSF framework/the renderer/whatever somehow to refresh the view?
Calling facesContext.renderResponse(); in addRow() doesn't make any difference.
What am I missing or doing wrong here? Any help is greatly appreciated. See code below...
Thanks.
Environment: Tomcat 5.5.23, MyFaces 1.1.5
the simplified JSP fragment:
    <h:form id="dynamicFormId" binding="#{dynamicFormBean.dynamicForm}">
        <h:commandButton value="Add Row" action="#{dynamicFormBean.addRow}" immediate="true"/>
    </h:form>the simplified backing bean implementation:
class DynamicFormBean {
   private HtmlForm dynamicForm;
   // the method called when the button to add components to the form is clicked
   public void addRow() {
       HtmlOutputText outputText = new HtmlOutputText();
       outputText.setId( "someid" ); // this is just for simplicity, the real code creates unique ids ...
       outputText.setValue( "some label" );
       dynamicForm.getChildren().add( outputText );
}

Try these small changes:
   public String addRow() {
       HtmlOutputText outputText = new HtmlOutputText();
       outputText.setId( "someid" ); // this is just for simplicity, the real code creates unique ids ...
       outputText.setValue( "some label" );
       dynamicForm.getChildren().add( outputText );
       return "reload";
   }And in your faces-config.xml file, add a navigation rule for the JSP with the dynamic form:
     <navigation-rule>
          <from-view-id>/dynamicForm.jsp</from-view-id>
          <navigation-case>
               <from-outcome>reload</from-outcome>
               <to-view-id>/dynamicForm.jsp</to-view-id>
          </navigation-case>
     </navigation-rule>Notice that I added a String return on your action method. What this should do is force JSF to reload the view, and thus the component tree (when coupled with an appropriate navigation case).
CowKing

Similar Messages

  • Issue regarding Planning layout is not getting rendered and is dumping at : CL_RSDRC_TREX_QUERY_LAYER ~ _GET_PARTPROVS_WITH_TREX_PART in SAP TPM IP

    Gurus,
    I am facing an issue regarding SAP TPM IP ( HANA)
    I have 3 Infoproviders
    Planning infocube, Planning DSO1, Planning DSO2 and i created multiprovider and added these 3 infoproviders into it. I have created Aggregation level on multiprovider. Created Bex Input ready query on Aggregation level.
    Issue is  Planning layout is not getting rendered and is dumping at : CL_RSDRC_TREX_QUERY_LAYER ~ _GET_PARTPROVS_WITH_TREX_PART.
    I tried debugging it and found it is trying to read   i_r_pro -> n_ts_part. It is populated with only 3 values (i.e. 2DSOs and 1 Cube), whereas <l_partprov>-partprov is referring to Aggergation level, hence read statement isn't successful, it is dumping.
    The class CL_RSD_INFOPROV_CACHE->GET() method is trying to populate the N_TS_PART.N_TS_PART uses P_R_INFOPROV table which seems to be already populated.  So, I debugged all the below methods to find out how the P_R_INFOPROV but couldn't find any clue.
    Can any one help,it would be really help.
    Thanks
    Ashok

    Hello Gregor,
    On the launch of planning layout it throws an error message:
    Planning is not possible RSCRM_IMP_CORE008.
    When I debugged, i got to a point wherein
    particular Real Time Planning DSO is
    not getting retrieved under the MultiProivder in below class.
    Class: CL_RSCRM_IMP_ACTIONS_SERVICE, Method: GET_INFOPROV is not
    returning the real time Info-Provider Name(i.e. Planning DSO)
    underlyingthe Multiprovider.
    I've also tried to run the report mentioned by you for the Multiprovider but issue still exists.
    Let me know, if you have any pointers on this topic.
    Thanks,
    Jomy

  • Flash content in browser dialog is not getting rendering with IE10 - Windows 8

    Hi,
    I am trying to launch window popup dialog. The dialog points to HTML page which loads swf file.
    Everything works fine but in case of IE10 on Windows 8, the flash content is not getting rendering inside popup dialog.
    I have verified that .swf file loads but it is not showing its content. If I close the dialog, the flash file conten get diaplay for a moment.
    This isssue occurs if I open dialog using showModalDialog or showModalessDialog. Works fine if popup opened using window.open.
    Reiterating again - this issue occurs only with IE10 on Windows 8. It works fine otherwise with IE10 on Windows 2012, Firefox on Windows 8 and on both browser in rest of the windows version.
    Look at it get the clear idea - http://youtu.be/SupJYZoLk5I.
    Requesting you to share your idea.
    Thanks,
    Prithveesingh.

    Firefox does not use the same version of Flash as Internet Explorer, you need to download and install the version of Flash used by Firefox.
    Using Firefox go to http://get.adobe.com/flashplayer/ to download the installer, then run this file to install Flash.
    This support article has further details - [[Install the Flash plugin to view videos, animations and games]]

  • HT1212 After I got IOS 7 my password is changed and I can not get in to my iPad. Can anyone help?

    After I got IOS 7 my password is changed and I can not get in to my iPad. Can anyone help?

    The following may help http://www.macworld.co.uk/how-to/mac/how-remove-your-apple-id-completely-shut-do wn-your-itunes-store-icloud-other-accounts-3474388/ but note that if you want to sell or give away the iPad you may need a working password to sign it out of iCloud due to Activation Lock. The following has instructions: What to do before selling or giving away your iPhone, iPad, or iPod touch - Apple Support

  • I am going crazy changing passwords that do not get recognized by the different services when it is time to use them, until I am asked to change the password again, until the next time I need to use it and it does not get recognized again. Is there any fi

    I am going crazy changing passwords that do not get recognized by the different services when it is time to use them, until I am asked to change the password again, starting the vicious cycle again: i need to use the password, it does not get recognized three times, then the system asks me to change it again, and again, and I am stuck!! Is there any fix for this "glitch?

    The first thing I would suggest is for you to go to the folder containing your catalog, using your system browser. There will be a folder that has the extension .lrdata. Delete that folder, and then try to start Lightroom. If that doesn't work, replace your catalog with your most recent backup.

  • CHANGES MADE IN ECC NOT GETTING REPLICATED TO CRM - CUSTOMER

    Hi All
    We are currently working on CRM 4.0 connected to ECC 4.6C. 
    All the middleware connectivity have been configured and we have a process of creating customers (BP) in CRM which inturn flows to R/3.  We dont create customers in R/3 system.  Now when i make any changes to the customer in R/3 system i dont find a queue getting generated in SMQ1 in R/3 system and also the changes not getting reflected in CRM system.  But any changes made to CRM is flowing to backend R/3 system.
    Settings like groupings, number ranges, PIDE etc are configured.
    Please let me know how to sove this issue.
    Cheers
    Ramesh

    The issue lies in the following customizing in your R/3 system:
    1) Go to tx SM30 in the R/3 system.
    2) Open the view CRMRFCPAR.
    3) For CUSTOMER_MAIN and CUSTOMER_REL objects you need to uncheck the 'Discard' checkbox  Save.
    This will make sure that the delta changes for your Customer Master flow
    to the CRM system.
    Check out these notes as they maybe of assistance
    914437
    504169
    504265

  • Images of SharePoint site is not getting rendered after migration

    We did migration of sharepoint 2007 site to different server to SharePoint 2010.
    After migration site is functioning normally but not showing images on the pages, instead of image cross sign is appearing on the page.
    Can someone please help. I have copied images of old server to new server in 14 hive Templates\Images folder.
    I have checked properties of image, there Type,Size,Modified,Created these attributes value is "Not Available"
    When I tried to open the image using URL on browser then Runtime Error  Description: An application error occurred on the server. occuerd.
    Please let me know what needs to check to resolve the same.
    Rushikesh_Khadtare

    Path of the image is http://servername/_layouts/images/folder.gif
    now images like folder icon are getting rendered but not showing theme, (page's background is clean white).
    Even though site is restored on SharePoint 2010 still it gets rendered like MOSS look and feel.
    Rushikesh_Khadtare

  • ADF Issue with Tree Table , Child Row not getting rendered.

    Hi All,
    I am trying to show a single Level Master-Detail Table via ADF Tree Table.
    I have MasterVO : InventoryVO (1 SubInventoryCode)
    DetailVO: SubInventoryVO (n :SubInventoryCode)
    Both VOs are SQL query based VO with bindVariables.
    I have a viewLink between MasterVO and ChildVO (1:n relationship)
    I dragged and drop the MasterVO as a tree Table. I added the Rule in the Tree Binding too.
    I have the Tree table under a Tab , I execute the AM impl method when the Tab is clicked where I set the bindvariables of the MasterVO and ChildVO and execute it.
    when I run the Page , the VO query gets executed but the I am able to see only the MasterVO Datas, and when I click MasterVO ROW , the Table doesnt expand and it doesnt render any ChildVO ROws.
    Please find the Page Definition and Jspx Page Code Below
    Page Definition Code
    <tree IterBinding="ItemsLocatorIterator" id="ItemsLocator">
          <nodeDefinition DefName="xxplp.oracle.adf.items.model.view.ItemsLocatorVO"
                          Name="ItemsLocator0">
            <AttrNames>
              <Item Value="SubinventoryCode"/>
              <Item Value="Openorderqty"/>
              <Item Value="Openwoqty"/>
              <Item Value="Qoh"/>
            </AttrNames>
            <Accessors>
              <Item Value="ItemSubInventoryVO"/>
            </Accessors>
          </nodeDefinition>
          <nodeDefinition DefName="xxplp.oracle.adf.items.model.view.ItemSubInventoryVO"
                          Name="ItemsLocator1">
            <AttrNames>
              <Item Value="Locator"/>
            </AttrNames>
          </nodeDefinition>
        </tree>Jspx Page Code
    <af:treeTable value="#{bindings.ItemsLocator.treeModel}"
                                          var="node"
                                          selectionListener="#{bindings.ItemsLocator.treeModel.makeCurrent}"
                                          rowSelection="single" id="tt2"
                                          styleClass="AFStretchWidth"
                                          rowDisclosureListener="#{backingBeanScope.TabListenerBean.LocationTableRowDisclosureListener}">
                              <f:facet name="nodeStamp">
                                <af:column id="c110">
                                  <af:outputText value="#{node.SubinventoryCode}" id="ot116"/>
                                </af:column>
                              </f:facet>
                              <f:facet name="pathStamp">
                                <af:outputText value="#{node}" id="ot117"/>
                              </f:facet>
                              <af:column id="c111"
                                         headerText="#{bindings.ItemsLocator.hints.Qoh.label}">
                                <af:outputText value="#{node.Qoh}" id="ot118"/>
                              </af:column>
                              <af:column id="column1"
                                         headerText="#{bindings.ItemsLocator.hints.Openorderqty.label}">
                                <af:outputText value="#{node.Openorderqty}"
                                               id="outputText1"/>
                              </af:column>
                              <af:column id="column2"
                                         headerText="#{bindings.ItemsLocator.hints.Openwoqty.label}">
                                <af:outputText value="#{node.Openwoqty}"
                                               id="outputText2"/>
                              </af:column>
                              <af:column id="column3"
                                         headerText="Locator">
                                <af:outputText value="#{node.Locator}"
                                               id="outputText3"/>
                              </af:column>
                            </af:treeTable>

    I was able to find the issue which is causing the problem, both the VOs are SQL Query Based VOs.
    The ChildVO (SubInventoryVO) is has a bindvariable in its Query, which is losing its value when the viewlink accessor query gets appended to it.
    Please find the query below
    SELECT * FROM (SELECT MOTV.ORGANIZATION_CODE, MOTV.SUBINVENTORY_CODE  
    FROM MTL_ONHAND_TOTAL_V MOTV
    WHERE INVENTORY_ITEM_ID = :P_INVENTORY_ITEM_ID) QRSLT  WHERE ORGANIZATION_CODE = :Bind_OrganizationCode Though I am setting the VO query before the Table is rendered, ":P_INVENTORY_ITEM_ID".
    Its Losing its value, when the above whereclause "ORGANIZATION_CODE = :Bind_OrganizationCode " gets appended to it.
    I am thinking to use ExecuteWithParams Operation on SelectionListener method of the Tree Table to set the ":P_INVENTORY_ITEM_ID" bind variable, but I also want the viewLinkAccessor rule also to be applied ..
    Please suggest me how to retain the implicit bindVariable of the Query.

  • Fields not getting rendered based on fire partial action

    Dear Friends
    I have req like based on the selected value in message choice input (UOM), the other values(BOX,EACH,VOLUME) in page sholud render .
    These are my codes in AM and CO.
    ******************************AM***********************
        public void xxcreaterow() {
            OAViewObject vo = getuomVO1();
            System.out.println("am is getting executed");
            //Number=null;
             Number val = 1;
                if (vo != null)
                  if (vo.getFetchedRowCount() == 0)
                   vo.setMaxFetchSize(0);
                   vo.executeQuery();
                   vo.insertRow(vo.createRow());
                   OARow row = (OARow)vo.first(); 
                    //  row.setAttribute("RowKey", new Number(1));
                      row.setAttribute("RowKey", val);
                      row.setAttribute("BoxAttr", Boolean.FALSE);
                      row.setAttribute("EachAttr", Boolean.FALSE);
                      row.setAttribute("VolumeAttr", Boolean.FALSE);
    ************************   CO *********************************
      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processRequest(pageContext, webBean);
          OAApplicationModule am = pageContext.getApplicationModule(webBean);
          OAViewObject vo = (OAViewObject)am.findViewObject("uomVO");
          am.invokeMethod("xxcreaterow");
       * Procedure to handle form submissions for form elements in
       * a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processFormRequest(pageContext, webBean);
         OAApplicationModule am = pageContext.getApplicationModule(webBean);
         OAViewObject vo = (OAViewObject)am.findViewObject("uomVO1");
                 OARow row = (OARow)vo.getCurrentRow();
                      if ("HandleUom".equals(pageContext.getParameter(EVENT_PARAM)))
            if (pageContext.getParameter("UnitOfMeasure").equals("Box"))
             row.setAttribute("BoxAttr", Boolean.TRUE);
                row.setAttribute("EachAttr", Boolean.FALSE);
                row.setAttribute("VolumeAttr", Boolean.FALSE);
               else
                     row.setAttribute("BoxAttr", Boolean.FALSE);
               if (pageContext.getParameter("UnitOfMeasure").equals("Each"))
                row.setAttribute("BoxAttr", Boolean.FALSE);
                   row.setAttribute("EachAttr", Boolean.TRUE);
                   row.setAttribute("VolumeAttr", Boolean.FALSE);
               else
                     row.setAttribute("EachAttr", Boolean.FALSE);
               if (pageContext.getParameter("UnitOfMeasure").equals("Gallon"))
                row.setAttribute("BoxAttr", Boolean.FALSE);
                   row.setAttribute("EachAttr", Boolean.FALSE);
                   row.setAttribute("VolumeAttr", Boolean.TRUE);
               else
                     row.setAttribute("VolumeAttr", Boolean.FALSE);
    How to resolve this plz help.
    Thanks
    Aravinda

    Have a fire partial action event enabled on text field 2, capture the event in processFormRequest of CO, throw an exception using throw OAException when textfield1 < textfield 2 or your required condition is met. You don't need javascript for this. I don't recommend using javascript in OAF. You have most of the features available in OAF (except popup alerts though which can be achieved as mentioned above but no popup window).
    Thanks
    Shree

  • Rich text editor in OOTB taskflow not getting rendered in iPad

    Hi,
    We have a Webcenter Portal(11.1.1.6) Framework application. One of the pages, we have used a Blogs OOTB taskflow.
    When we try to access the application from an iPad, the area where i can key in data is missing and it gives a pop up saying "The page could not be loaded".
    On analysis of the taskflow, we could see that it was the <rte:editor> component that was missing from the page.
    We could understand from certain forums that there is an incompatibility between rich text editor components and Safari browser.
    Do we have any alternate way to solve this issue.
    Any help is appreciated.

    ADF and such WebCenter is not supported on Safari iOS 6 until 11.1.1.7
    You probably have to use a different rich text editor however those can interfere with the ADF JS framework.

  • Bank master data changes not getting tranported to another client

    Hi all
    While i am making changes to the bank master data, they are not reflected in the transport to another client.
    Please let me know how to do this.
    Thanks
    ES

    Hi
    While creating the house bank , i created the bank master using the create button.
    This was saved in the transport request and moved correctly through the transport.
    Now i find that the description etc. to be changed in FI02. I have done the changes.
    These changes when transported do not get reflected in the new environment.
    Please let me know the reason.
    Thanks & Regards
    ES

  • Component image not getting displayed in Portal

    Hi All,
    I have added a jpg image to MIME folder in my component and used it as source for Image UI and also as a separator in Breadcrumb. When I run this web dynpro application in portal, the image is not getting rendered. I am getting cross mark instead of the image. But the image is getting displayed if I run the application as a stand alone application from SE80 -> Test. Once I do this, the image starts appering even in portal and again disappears after sometime.
    Could you please help me to resolve this issue?
    Thanks & Regards,
    Vishweshwara P.K.M.

    Vishweshwara,
    I hope you referred the MIME object in below way.
    '/sap/bc/webdynpro/sap/ZCOMP_EPI/SELECTED.JPEG'
    Where zcomp_epi is my component name and selected.jpg is mime object name. Check and let me know
    Regards
    Srinvias

  • SystemWideClassABPWP in RZ20 not getting updated

    Hi All,
    We need some help from you.
    We have shortlisted the monitoring contexts in RZ20 around which we would like to configure our alerts in the system.
    But just one concern, here in the monitoring tree under  the monitoring tree Background,  we have shortlisted SystemWideClassABPWP which tell the System Wide Class A Background Work Process across the instances.
    But, we noticed that the value for this particular parameter is not getting updated (value 5 in the below screenshot).
    The SystemWideClassABPWP and SystemWideTotalBPWP show inactive. This also seems to be non-modifiable (as per the legend in rz20)
    Any clue as to how to activate them and update them with the latest value.
    Thanks in advance and any pointers would be appreciated.
    Warm Regards
    Rajeet

    Hi Michael,
    Thanks a lot for your reply. But we find that these parameters are not getting updated and so we do not see the log like Green 06.03.2008 , 20:03:31 besides them (for other )
    One more thing is we have 2 application servers (1 central instance & other application instance) with each having 5 work process for A priority jobs and 20 work processes for other jobs. So these parameters should show the values as
    SystemWideClassABPWP - 10
    SystemWideTotalBPWP - 40
    But this is not the case. Also, when the operation mode changes these values are not getting updated.
    Request your kind help in this regard.
    Warm regards,
    Rajeet

  • Profile Imanges are not getting deleted from Profile Image library

    Hi,
    If I go mysite and edit my profile and set a profile images and save the changes. Image is uploaded to profile Image library in the root of the mysite.
    I Edit my profile again and this time I remove the profile image and save the changes. Image is not getting deleted from the profile Image library.
    as per my understanding it should get deleted. My site clean job is running. user profile is active in AD.
    Thanks
    Omkar

    My first question would be is it a big deal if the picture doesnt get deleted from the libarary?  My understanding is that the profile picture field is a URL link, the first time you add a picture it will provision 3 copies of differing sizes to the
    library.  When you "remove" the picture, it just empties out the picture URL field.  Which is a nice hidden recovery if someone accidently deletes a profile photo they really wanted (Or if your company really locks down picutures so you only get
    a choice of a couple avatars instead of a personal photo).
    Similar issue:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/17bc8538-568f-4fff-8933-458fdba4b701/delete-user-profile-picture-in-sharepoint-2010-when-account-is-deactivated-or-deleted-from-ad?forum=sharepointadminprevious
    and response:
    Since the user photo library follows certain standards OOB:
    http://iedaddy.com/2010/12/sharepoint-2010photo-management-for-social-mysites/
    I would say just create a small script that will periodically read the UPS and make sure there are no photos sitting in the library not associated to an account... here's an example of accessing the User Profiles w/ Powershell:http://iedaddy.com/2010/06/sharepoint-2010-updating-user-profile-properties-with-powershell/
    You would just modify it to delete image files whose name is not associated to an existing NTName in the UPS.
    ieDaddy
    Blog: http://iedaddy.com
    Twit: @iedaddy

  • HT201210 I can not get the iphone to sync with itunes and the iphone locked up my ipad too. I have downloaded the recent itunes 10.6.3 and restarted my computer. What do I do?

    My iphone was not synced when I received it. I plugged it in to charge it, and it locked up my ipad. My itunes was not updated on my desktop, so I just updated it to itunes 10.6.3. I have restarted my computer, and nothing is changing. I can not get the iphone to move from the screen, its stuck on the itunes icon. Help please.

    I am downloading the 11.0.2 as we speak. I will update in a bit.

Maybe you are looking for

  • How do I get a refund for 3.0

    How do I get a refund for 3.0 my computer has not installed it on my ipod yet, and apple refuses to update it for it, so how do I get a refund back?

  • Swing actionPerformed behaviour

    I have a problem: I've made a JFrame with a JProgressBar in to show the progress of some file operations. I can use this class ok in a "normal" method, but as soon as I move this into a actionPerformed method (for a button) it doesn't seem to work. I

  • Deactivate mandatory check bank account,bank control key

    For certain Italian customers we use payment method 'R' where it is only necessary to have a bank key and no bank account or bank control key. Unfortunatly SAP always asks for those 2 when you enter a bank key. In other words, you cannot only enter a

  • Create Long Text in MM01 for material

    Hi, I'm trying to create long text in MM01. After entering industry sector and material type and also the necessary views, i hit EDIT --> Long Text , the create text option is greyed out (inactive).. How can i make this work ? Or is there any other f

  • How to use facetime to call my iphone 4s?

    I have an ipad2 & i cant used facetime to call my iphone 4s & vice versa.