Nesting multiple h:dataTables with bindings

Hi,
I'm trying to nest multiple dataTables with nested bindings. I'm not sure if it's possible, but here are the error and associated code:
Aug 3, 2010 12:10:30 PM com.sun.faces.lifecycle.Phase doPhase
SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /news/create.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1b4e829]
Aug 3, 2010 12:10:30 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
org.apache.jasper.el.JspPropertyNotFoundException: /news/create.jsp(411,21) '#{otherBean.thirdBeanData}' Target Unreachable, identifier 'otherBean' resolved to null
     at org.apache.jasper.el.JspValueExpression.setValue(JspValueExpression.java:91)
     at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:254)
<h:dataTable value="#{MyBean.otherBeanList}" var="otherBean"
                   binding="#{MyBean.otherBeanData}" id="otherBeans">
      <h:outputText value="#{otherBean.name}"/>
      <h:dataTable value="#{otherBean.thirdBeanList}" var="thirdBean"
                         binding="#{otherBean.thirdBeanData}" id="thirdBeans">
            <h:outputText value="#{thirdBean.name}" />
            <h:outputText value="#{thirdBean.value}" />
      </h:dataTable>
</h:dataTable>I use the data bindings to maintain dynamic lists which can be expanded and deleted from by the user. I need to have a dynamic list within a dynamic list. Any ideas what I am doing wrong, or if it's not possible - how I can achieve this in another manner? If I don't have the nested data tables, it works great but when I nest one I get the error.
Thanks!
EDIT: So I thought I had solved this.  I added another UIData field to MyBean and tried to bind the inner data table to that instead of to otherBean.thirdBeanData.  I thought it was working, but it turns out that it is not.  I can only access the data from the inner data table where the button is clicked.  I believe this would work fine if I only needed to be able to add/delete from the lists.
However, I am also using the data bindings to update the model values from the form on every click. This is to maintain data between page refreshes so that the user will not lose any data they entered.  Since I cannot access the other inner datatables, I cannot update and maintain these values.  I guess I am back to square one, so any advice or help would be greatly appreciated.
John
Edited by: jrock on Aug 3, 2010 2:41 PM

I found an ugly hack which is probably not the way to go, but it works:
private void fixValueChangeListeners() {
     if(this.selectedWorkCenter.getValueChangeListeners().length > 1) {
          this.selectedWorkCenter.removeValueChangeListener(this.selectedWorkCenter.getValueChangeListeners()[1]);
          logger.debug("Workcenter dropdown contained too many ValueChangeListeners");
}This method is called each time a ValueChangedListener is fired... :-|
Please, if anyone has a better method of fixing this I'm still listening!

Similar Messages

  • How to create dynamic DataTable with dynamic header/column in JSF?

    Hello everyone,
    I am having problem of programmatically create multiple DataTables which have different number of column? In my JSF page, I should implement a navigation table and a data table. The navigation table displays the links of all tables in the database so that the data table will load the data when the user click any link in navigation table. I have gone through [BalusC's post|http://balusc.blogspot.com/2006/06/using-datatables.html#PopulateDynamicDatatable] and I found that the section "populate dynamic datatable" does show me some hints. In his code,
    // Iterate over columns.
            for (int i = 0; i < dynamicList.get(0).size(); i++) {
                // Create <h:column>.
                HtmlColumn column = new HtmlColumn();
                dynamicDataTable.getChildren().add(column);
                // Create <h:outputText value="dynamicHeaders"> for <f:facet name="header"> of column.
    HtmlOutputText header = new HtmlOutputText();
    header.setValue(dynamicHeaders[i]);
    column.setHeader(header);
    // Create <h:outputText value="#{dynamicItem[" + i + "]}"> for the body of column.
    HtmlOutputText output = new HtmlOutputText();
    output.setValueExpression("value",
    createValueExpression("#{dynamicItem[" + i + "]}", String.class));
    column.getChildren().add(output);
    public HtmlPanelGroup getDynamicDataTableGroup() {
    // This will be called once in the first RESTORE VIEW phase.
    if (dynamicDataTableGroup == null) {
    loadDynamicList(); // Preload dynamic list.
    populateDynamicDataTable(); // Populate editable datatable.
    return dynamicDataTableGroup;
    I suppose the Getter method is only called once when the JSF page is loaded for the first time. By calling this Getter, columns are dynamically added to the table. However in my particular case, the dynamic list is not known until the user choose to view a table. That means I can not call loadDynamicList() in the Getter method. Subsequently, I can not execute the for loop in method "populateDynamicDataTable()".
    So, how can I implement a real dynamic datatable with dynamic columns, or in other words, a dynamic table that can load data from different data tables (different number of columns) in the database at run-time?
    Many thanks for any help in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    flyeminent wrote:
    However in my particular case, the dynamic list is not known until the user choose to view a table. Then move the call from the getter to the bean's action method.

  • How to get selected values from datatable with paging

    hi all
    here is my problem
    I have a datatable with paging size of 2 and first column as checkbox.
    now i have total record of 5 data,2 row on each page.
    Now i m selecting 1-1 row from each page.
    When i m clicking Command button to display all the selected row from different page ,i m only able to display values selected from last page.
    Through debug i can see that only last page value is set to TRUE OR FALSE and every other value is neither true nor false.
    any help???
    thanks

    <f:facet name="footer">
    <h:panelGroup binding="#{Page1.groupPanel1}" id="groupPanel1"
    style="display: block; text-align: center" styleClass="list-paging-footer">
    <h:commandButton action="#{Page1.dataTable1_firstPageAction}" binding="#{Page1.dataTable1FooterFirstButton}" id="dataTable1FooterFirstButton" image="resources/paging_first.gif" immediate="true"/>
    <h:commandButton action="# Page1.dataTable1_previousPageAction}" binding="#{Page1.dataTable1FooterPreviousButton}"
    id="dataTable1FooterPreviousButton" image="resources/paging_previous.gif" immediate="true"/>
    <h:commandButton action="#{Page1.dataTable1_nextPageAction}" binding="#{Page1.dataTable1FooterNextButton}"
    id="dataTable1FooterNextButton" image="resources/paging_next.gif" immediate="true"/>
    <h:commandButton action="#{Page1.dataTable1_lastPageAction}" binding="#{Page1.dataTable1FooterLastButton}"
    id="dataTable1FooterLastButton" image="resources/paging_last.gif" immediate="true"/>
    </h:panelGroup>
    </f:facet>
    Above is the code which i m using for paging which is command button
    Any problem with it.???
    thanks

  • We have multiple users, each with multiple devices, on 1 apple id - as we want to share music and ibooks etc.  We want the children to have access to the store, but with a financial limit. How do we do this?

    We have multiple users, each with multiple devices, on 1 apple id - as we want to share music and ibooks etc.  We want the children to have access to the store, but with a financial limit. How do we do this?

    Welcome to the Apple Community.
    That's simply not possible I'm afraid. You'd need to give them their own account and allowance or make it so you are required to be there to input the password when they wish to make a purchase.

  • I have multiple emails associated with my i phone, but can't get my mac to associate some of the email names because it is associated with other apple id , but it's my id. how can i get around this?

    I have multiple emails associated with my i phone, but can't get my mac to associate some of the email names because it is associated with other apple id , but it's my id. how can i get around this?

    - Try contacting iTunes for the password problem:
    Apple - Support - iTunes - Contact Us
    - For the other problem you can try a reset. Nothing will be lost
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - The next standard thing to do is to download/install a new app but you cant 'do that.
    - Instead, try restoring from backup.

  • How to FaceTime and iMessage on multiple apple devices with one iTunes account

    We recently received iPad 2's for Christmas and was looking for some advice on how to FaceTime and iMessage on multiple apple devices with One iTunes Account (Apple Id).  I have created or attached other e-mail addresses to our apple id but do not know how to use them on the new devices.  Our home MacBook Pro uses our main apple id for FaceTime.  The iPads have been setup with the main apple id w/o being able to use FaceTime and iMessage.
    Please Help...
    I appreciate the help and support.

    P and V-
    If you are trying to connect to someone with a different Apple ID, I think all the devices should work, but one at a time.
    The problem is when you try to connect between two with the same Apple ID.  Once the calling device tries to make the connection, it finds the second device to be "busy".  That is where each needs to use a different E-Mail address when setting it up.
    On iOS devices, when you press the Home button to exit an App, the App may still be active in the background, even when the device is sleeping.  If FaceTime or iMessage is merely being active that way, it may be enough to "tie up" the E-Mail address.
    From the Home screen, double click your Home button.  You will see a list of recent Apps along the bottom of the screen.  Press and hold on one of them until they start to wiggle.  You will then see a red minus sign on each.  Pressing the minus sign will remove an App from the list, and stop it from working in the background.  (Click the Home button to stop the wiggling, and again to hide the recent Apps.)
    Fred

  • HT204053 can i have multiple iCloud accounts with the same Apple id

    Can i have multiple iCloud accounts with the same Apple id

    Welcome to the Apple Community.
    No, your ID is essentially your account. You can have email aliases and you can have multiple accounts, but I don't think that's what you are asking.

  • How can I create multiple sales orders with reference to one contract?

    Hello Gurus,
    Can you please how can I create multiple sales orders with reference to one contract?
    thanks!
    Rakesh

    hi
    Lets consider example
    In your contract for line item 1 you have entered qty 100
    You careated sales order with 70 quantity, and now you want to creat another sales order for 30
    For this first you need to check what is your item category in contract (VA42)
    Goto VOV7
    SPRO - IMG  - Sales and distribution - Sales - Sales document item - Define item categories - Go to change mode
    Make the completion rule = B Item is completed after full quantity has been referenced

  • Multiple users found with the same name

    Hi,
    In my ADF bean, I am trying to access some users from ldap. I found there are two users with the same email in my console under "Users and Groups" tab.
    I am getting the following error in logs:
    oracle.jbo.JboException: multiple users found with same name
            at com.castandcrew.portal.am.StartPaperworkCenterAMImpl.setStartPaperworkApprovalHistory(StartPaperworkCenterAMImpl.java:627)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:657)
            at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:2143)
            at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:3114)
            at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:261)
       at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:3114)
            at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:261)
            at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1635)
            at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2151)
            at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
            at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)
            at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
            at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)
            at com.castandcrew.portal.view.bean.startpaperwork.StartPaperworkCenterManagedBean.handleRowDisclosure(StartPaperworkCenterManagedBean.java:696)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
            at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
            at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)
            at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:263)
            at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:147)
            at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:404)
            at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
            at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:280)
            at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:147)
            at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:404)
            at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:93)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
            at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:93)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
            at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
            at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
            at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:431)
            at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:34)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    I am wondering how open ldap can allow two users with same email.
    Any suggestions are welcome.can i try some work around for that?
    Thanks.

    Hi.
    For some reason you have duplicates. Normally is something strange but it can occurs in heavy load / database corruptions or other situations.
    You should contact a LDAP Administrator in order to find and fix the duplicate problem.
    Regards.

  • Can you have multiple iCloud's with one Apple ID?

    Can you have multiple iCloud's with one Apple ID?

    You can have multiple iclouds with multiple id's

  • How do I merge multiple Excel files with more than one tab in each file using PowerQuery?

    Hello
    I have 12 Excel (.xlsx) files and each file has three identically named and ordered tabs in them. 
    I know how to merge multiple Excel files in a folder using M (those guides are all over the web) but how do I merge multiple Excel files with multiple (yet identically named and ordered) tabs? Surely it is possible? I just don't know how to do it in M.
    Cheers
    James

    What Laurence says is correct, and probably the best thing to do when the sheets have differing structures. Here is an alternate approach that works well when the sheets all have the same structure.
    When you first open the Excel file from Power Query, you can see its structure in the navigator at the right-hand-side of the screen. If you select the root (which is the filename itself) and click Edit, you'll see all the tabs in the sheet as a single table.
    You can now do filtering based on the Name, Item and Kind values. When you've reduced the set of things down to the sheets you want, select the Data column and say "Remove Other Columns". If the sheets don't have any header rows, you can just click the expand
    icon in the header and you'll be done.
    Otherwise, if the sheets have headers or if some other kind of sheet-level transformation is required against each sheet before doing a merge, you'll have to write some M code manually. In the following example, each sheet has a header row consisting of
    two columns: Foo and Bar. So the only step I need to perform before merging is to promote the first row into a header. This is done via the Table.TransformColumns operation.
    let
        Source = Excel.Workbook(File.Contents("C:\Users\CurtH\Desktop\Test1.xlsx")),
        RemovedOtherColumns = Table.SelectColumns(Source,{"Data"}),
        PromotedHeaders = Table.TransformColumns(RemovedOtherColumns,{{"Data", each Table.PromoteHeaders(_)}}),
        ExpandData = Table.ExpandTableColumn(PromotedHeaders, "Data", {"Foo", "Bar"}, {"Data.Foo", "Data.Bar"})
    in
        ExpandData

  • How to delete multiple data domains with single step ?

    how to delete multiple data domains with single step ?

    You can go to your Endeca-Server domain home e.g.($WEBLOGIC-HOME$/user_projects/domains/endeca_server_domain/EndecaServer/bin)
    run
    [HOST]$ ./endeca-cmd.sh list-dd
    default is enabled.
    GettingStarted is enabled.
    endeca is enabled.
    BikeStoreTest is enabled.
    create a new file from the output just with the domains that you want to delete and then create a loop
    [HOST]$ vi delete-dd.list
    default
    GettingStarted
    endeca
    BikeStoreTest
    [HOST]$ for i in $(cat delete-dd.list); do; ./endeca-cmd.sh delete-dd $i; done
    Remember that this can not be undone, unless you have a backup.

  • Can I have multiple event structures with the same event cases?

    Hello, 
    I'm doing an application that reproduces the front panel of the HP6675A power supply. To achieve this, I have done a state machine with different states
    (initialize, measures, voltage, current, ocp, ov, store, recall, etc). In each state, should have an event structure that catches the events of the buttons, like for example: if the current state is the Voltage mode and the user press the current button the next state will be the Current mode. For this in each state of the state machine should be the same event structure with the same events.
    My problem is that the Vi doesn't work properly when I have multiple event structures with the same event cases. There are some possibily to do this, and how? Or is impossible to have multiple events? I have been reading some posts, but I don't find solutions. 
    Any help is appreciated.
    Thank you very much.
    Solved!
    Go to Solution.

    natasftw wrote:
    Or as others mentioned, make two parallel loops.  In one loop, have your state machine.  In the other, have just the Event Handler.  Pass the events from the handler to the state machine by way of queues.
    A proper state machine will not need the second loop.  The "Wait For Event" or "Idle" state (whatever you want to call it) is all you really need in order to catch the user button presses.  The setup is almost there.  Maybe add a shift register to keep track of which state to go to in the case of a timeout on the Event Structure.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How can I validate a DataTable with inputText and other JSF components?

    I have a DataTable with various input components. I need to be able to validate what the user has entered on all the rows of the DataTable. Does anyone have any examples they can point me to, experiences with this, or knowledge on how to do this?
    Thank you so much.

    Do you have to use backing beans instead of managed beans to validate components inside a DataTable?

  • Is it possible to maintain multiple payment formats with a single Program

    Hi,
    Is it possible to maintain multiple payment formats with in a single program.
    For example let us assume that we have created 2 payments formats as 'XX-PAY1' & 'XX-PAY2'.
    When i select the parameter as '1' then 'XX-PAY1' has to run else 'XX-PAY2'.
    if its possible could you please tel us where to define the parameters in Setups.
    Many thanks,
    Zaheer S

    nazzu wrote:
    Hi,
    Is it possible to maintain multiple payment formats with in a single program.
    For example let us assume that we have created 2 payments formats as 'XX-PAY1' & 'XX-PAY2'.
    When i select the parameter as '1' then 'XX-PAY1' has to run else 'XX-PAY2'.
    if its possible could you please tel us where to define the parameters in Setups.
    Many thanks,
    Zaheer SSounds like an Apps question. Start here: https://forums.oracle.com/forums/category.jspa?categoryID=3

Maybe you are looking for

  • Mirror display menu

    Hi, I´m kind of new on this, so, i have a question. I have a  a MacBook pro 10.7.5 and i dont find my mirror display option,  I have the  little computer icon, but does not show that option; please help. Thank you.

  • News Videos won't play - Fox & a local TV news station.

    When I try and watch my news videos Fox News & my local TV station news (WHIO CBS) will not play. Fox just has a black video screen which never starts & my local news has a small circle that just spins but never starts the video. MSNBC, CBS, ABC & so

  • Active/passive policies

    My Organization want me build two node cluster Active/passive windows server 2012,sql server2012 multiple instances  node1=active,node2=passive i have created cluster ,installed sql server....but the problem is for automatic failover. 1)do i need to

  • Unable to Connect Notes

    I am trying to crawl in Lotus Notes Documents from Lotus Notes Domino Server.i have already installed Crawler Web Service for Lotus Notes and registered in Portal as mentioned in the installation Guide. Now when i m configuring Remote Data Source i a

  • Poor battery life since Yosemite upgrade

    Hi all, Since upgrading to Yosemite I have noticed that I only get about 5 hours of battery life, even when just running Safari and Mail. I have checked the battery life and it is reporting as good. I have also reset PRAM and SMC but that didn't seem