DataTable in dataTable fix details (JSF 1.1)

I posted a message yesterday indicating that some of the problems with nested dataTables had not been fixed in the JSF 1.1 release. Since that posting, I have done some more research, and have more specific information regarding the remaining problems and a way to fix them. The remaining problems are:
1) Values from inputText fields in the inner dataTable are ignored on submit (except for the last row of the table). The problem is that processDecodes is called on the inner table component multiple times (once per row of the outer table), and the "saved = new HashMap();" statement effectively wipes out any values that were decoded from the previous row, so that at the end of the process, the only decoded values that remain are those from the last row. My suggested fix for that problem is:
a) to create a "boolean isOuterTable()" method on UIData that determines whether or not this table is the outermost table (i.e. go up through the parent chain and see if there are any UIData ancestors).
b) create a "clearSaved" method on UIData as follows:
protected void clearSaved() {
    saved = new HashMap();
}c) create a "clearDescendants" method on UIData that goes visits all of the UIData's descendants (i.e. facets and children, and their facets and children, recursively), and calls clearSaved on any UIData components that are found
d) in the processDecodes method for UIData, replace:
saved = new HashMap();with
if (isOuterTable()) {
    clearSaved();
    clearDescendants();
}2) When a commandButton in the inner dataTable is clicked, actions are fired for all rows of the outer dataTable. This is one case of a larger problem. The implementation of getClientId in UIComponentBase uses a cached value, if the ID has been computed previously. For components within dataTables, this is a problem because these components are referenced multiple times for different rows of the outer table, and the row number of the outer table is part of the client ID. To fix this, I suggest the following (maybe overkill, but it works):
a) Create a "clearCachedValues" method on UIData, which visits all of the UIData's descendants, and sets their clientId to null. A hack to do this is:
descendant.setId(descendant.getId())It would be better to have a method on UIComponent for this. NOTE: I have also found that if I come across a descendant that is a UIData, I also need to set that component's "model" attribute to null, because the calculation of this model refers to that dataTable's value valueBinding, which may be defined in terms of the current row of the outer table.
b) Add a call to clearCachedValues to the end of the setRowIndex method on UIData.
There may be other, better ways to fix these problems, but I thought it might be helpful to describe my fixes in detail, so that whoever is responsible for fixing the reference implementation can at least have the benefit of my research.
I would like to see a bug opened for these problems, and I would like to be able to see the descriptions of known JSF bugs. Before JSF 1.1 came out I was worried that the nested dataTables bug (C026) description (which I was unable to find) might not be complete, and that as a result, the problems with nested dataTables would not be completely fixed in JSF 1.1. As it turned out my worries were not unfounded.

JD> 2) When a commandButton in the inner dataTable is clicked, actions
JD> are fired for all rows of the outer dataTable. This is one case of a
JD> larger problem. The implementation of getClientId in UIComponentBase
JD> uses a cached value, if the ID has been computed previously. For
JD> components within dataTables, this is a problem because these
JD> components are referenced multiple times for different rows of the
JD> outer table, and the row number of the outer table is part of the
JD> client ID. To fix this, I suggest the following (maybe overkill, but
JD> it works):
I've fixed part 1). I've essentially done as you suggested.
I can't reproduce part 2). I've posted the webapp where I try to do
this at
http://blogs.sun.com/roller/resources/edburns/jsf-nested-datatables.war
Please put the JSF 1.1 jars in common lib, or WEB-INF/lib in this war
and then visit
http://host:port/jsf-nested-datatables/faces/test2.jsp
Click on the outer buttons, you'll see that the outer listener fires
once.
Click on the inner buttons, you'll see that the inner listener once.
Can you please help me reproduce this?
Ed

Similar Messages

  • t:dataTable scrollable with fixed headers

    I need to make my dataTable scrollable with fixed headers, I have seen few solutions like having 2 data Tables one for headers and the other for columns and one more solution is CSS
    In the first solution the column widths in the both tables doesn't match( I think this can be fine tuned to have a fixed column size)
    Can some one help me out in doing this with CSS.

    I did some thing like this, please help me out my columns of botht ables doesn't match
    <htm:table>
    <htm:body>
    <htm:tr>
    <htm:td>
    <t:div>
    <t:div>
    <t:dataTable
         renderedIfEmpty="false"
         preserveDataModel="false"
         preserveSort="true"
         varDetailToggler="detailToggler"
         headerClass="alignLeft"
         rowClasses="oddTableRow,evenTableRow"
         columnClasses="lastName,namePrefix,firstName,middleName,nameSuffix,dirType,orgName,county,city,state,valid,select"
         rows="1"
         value="#{result.result}"
         var="legalProfessional">
    <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Last Name" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Name Prefix" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="First Name" style="font-size:8pt;" />
    </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Middle Name" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Name Suffix" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column >
              <f:facet name="header">
                   <h:outputText value="Dir Type" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Organization Name" style="font-size:8pt;" />
              </f:facet>
                   </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="County" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="City" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="State" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Valid" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column rendered="#{resultPage eq resultsBean.pageSearch}" defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Select" style="font-size:8pt;" />
              </f:facet>
         </t:column>
    </t:dataTable>
    </t:div>
    <t:div style="overflow:auto;height:50px">
    <t:dataTable
         renderedIfEmpty="false"
         preserveDataModel="false"
         preserveSort="true"
         varDetailToggler="detailToggler"
         headerClass="alignLeft"
         rowClasses="evenTableRow,oddTableRow"
         columnClasses="lastName,namePrefix,firstName,middleName,nameSuffix,dirType,orgName,county,city,state,valid,select"
         rows="#{sessionUserBean.user.resultsPerPageOption}"
         value="#{result.result}"
         var="legalProfessional">
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.lastName}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.namePrefix}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.firstName}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.middleName}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.nameSuffix}" />
         </t:column>
         <t:column >     
              <h:outputText value="#{legalProfessional.directoryType}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:commandLink action="#{legalOrganizationSearchByNameBean.searchLegalOrganizationsByName}">
                 <h:outputText value="#{legalProfessional.relatedOrgNormName}" />
                   <t:updateActionListener property="#{legalOrganizationSearchByNameBean.name}" value="#{legalProfessional.organization}" />
                  <t:updateActionListener property="#{legalOrganizationSearchByNameBean.resultKey}" value="#{legalOrganizationBean.legalOrganizationsSearchResultKey}" />               
              </h:commandLink>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.county}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.city}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.normRegion}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <t:graphicImage value="images/yellow_check.jpg" border="0" />
         </t:column>
         <t:column rendered="#{resultPage eq resultsBean.pageSearch}" defaultSorted="false" sortable="true">
              <t:commandButton
                   id="viewLegalProfessionalCommand"
                   forceId="true"
                   title="#{bundle.view_entity_title}"
                   value="#{bundle.text_view_value}"
                   action="#{legalProfessionalBean.actionGotoView}">
                   <t:updateActionListener property="#{heavyWeightBean.uuid}" value="#{legalProfessional.profileUuid}" />
                   <t:updateActionListener property="#{legalProfessionalBean.LPAEntity}" value="#{legalProfessional}" />
              </t:commandButton>
         </t:column>
         <t:column rendered="#{pageStatus eq resultsBean.pageAdd || pageStatus eq resultsBean.pageEdit}">
              <!-- Employment relationship with general -->
              <t:commandButton
                   title="Make Employment Relationship."
                   rendered="#{result.key eq legalOrganizationBean.legalProfessionalsResultKey}"
                   value="Employment"
                   action="#{legalOrganizationBean.actionMakeEmploymentRelationship}">
                   <t:updateActionListener property="#{legalOrganizationBean.selectedLPAEntity}" value="#{legalProfessional}" />
              </t:commandButton>
              </t:column>
    </t:dataTable>
    </t:div>
    </t:div>
    </htm:td>
    </htm:tr>
    </htm:body>
    </htm:table>{.lastName{
    width:100px;
    .namePrefix{
    width:100px;
    .firstName{
    width:100px;
    .middleName{
    width:100px;
    .nameSuffix{
    width:100px;
    .dirType{
    width:100px;
    .orgName{
    width:100px;
    .county{
    width:150px;
    .city{
    width:250px;
    .state{
    width:100px;
    .valid{
    width:100px;
    .select{
    width:100px;
    code}

  • Jsf datatable inside datatable component rendering problem.

    I am creating an online survey application using JSF with IceFaces component library. The survey can have any number of questions. Each question can be any one of the types checkbox, radio button, etc with multiple options.
    For this, I am using a datatable to dynamically add a question to the survey. Inside that datatable, I am using another datatable to add option to the survey.
    Now the problem is, if I keep on click on add question button, in the outer data table, question is being added without any issue. Once I click on inner data table to add a option to any of the added questions, I am able to add. But after that, if I click again on add question button, it is not working.
    This is my xhtml code:
    <ice:dataTable id="icePnlQuestionAdd" var="questAdd" value="#{createSurveyManagedBean.surveyQuestionList}">
    <ice:column>
    <table border="0" cellspacing="0" cellpadding="0">
    <tr>
    <th><ice:outputText value="Question English" style="white-space: nowrap;" /></th>                                        
    <td colspan="15">                              
    <ice:inputText id="QuestionEn" style="width:485px;" value="#{questAdd.questionEn}" />
    </td>
    </tr>
    <tr>
    <ice:dataTable id="icePnlOptionAdd" var="optionAdd" value="#{questAdd.surveyQuestionOptionList}">                               <ice:column>
    <th><ice:outputText value="Option " /></th>
    <td><ice:inputText id="OptionEn" value="#{optionAdd.optionEn}" /></td>
    </ice:column>
    </ice:dataTable>
    </tr>
    </table>
    </ice:column>
    </ice:dataTable>
    This is the add question method:
    public String addQuestion() {
    SurveyDTO addSurveyQuestionDTO = new SurveyDTO();          
    questionNum = surveyQuestionList.size();          
    addSurveyQuestionDTO.setQuestionNum(questionNum);
    surveyQuestionList.add(addSurveyQuestionDTO);
    return "createSurvey";
    This is the add option method:
    public String addOption() {
    FacesContext context = FacesContext.getCurrentInstance();          
    if (context.getExternalContext().getRequestParameterMap().get("questionNum") != null) {
    String questionNum = (String) context.getExternalContext().getRequestParameterMap().get("questionNum");
    int selectedQuestionNum = Integer.valueOf(questionNum);                    
    SurveyQuestionOptionDTO surveyQuestionOptionDTO = new SurveyQuestionOptionDTO();
    surveyQuestionList.get(selectedQuestionNum).getSurveyQuestionOptionList().add(surveyQuestionOptionDTO);
    return "createSurvey";
    }

    Bind the h:datatable in the jsp to UIDataTable component in your java code. Then when the action method is invoked, use DataTable.getWrappedObject() to get the model. Cast the model to whatever your type is (List, Array...) and then iterate through the model to process individual rows.

  • Problems in JSF t:dataTable /t:dataTable

    hi
    i am using <t:dataTable> to create jsf table.In the datatable each column has one <h:commandLink>.i had action methods to each and every column.At the same Jsf page,i am having some textfields using <h:inputText>.
    My problem is when i click the datatable colume link,it goes to the same jsf page,but there is no textfields at the same page.i am not expected to same jsf page.i wants to navigate to some other jsf pages.i had one solution i.e,i used binding method for each and every Link.The problem was solved temporarly.eventhough i am having solution using binding method.it is not applicable for huge data as i have large data.so what should i do to have exact solution .At the same time,i don't need binding methods.
    Advance thanks
    rgds
    OasisDeserts

    Hi.
    J solve the problem partly and here is the problem and solution:
    Problem - JDeveloper 10.1.3 have problem in showing table when code look like this:
    <h:dataTable width="350" value="#{infoBean.popular}" var="popular_">
    <h:column>
    <f:facet name="header">
    <h:panelGroup>
    <h:commandLink action="POPULAR">
    <h:outputText value="Najpopularnije"/>
    </h:commandLink>
    </h:panelGroup>
    </f:facet>
    <h:commandLink>
    <h:outputText value="#{popular_}" converter="ProductTitle"/>
    </h:commandLink>
    </h:column>
    </h:dataTable>
    Solution - When J change code to this 'Design' tab shows the table but not the text in 'outputText'(here #{popular_}):
    <h:outputText value="#{popular_}">
    <f:converter converterId="ProductTitle"/>
    </h:outputText>
    Please try this!

  • 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?

  • Editable Datatable within Datatable

    Hi,
    I am trying to implement a master detail edit screen, all on one page.
    What that means, is that I have an datatable (dt1) with 4 columns, 3 of which are text fields, the fourth is a dataTable (dt2).
    Both the dataFields are linked to ArrayLists.
    dataTable dt2 has two text fields.
    When I populate the page, everything works fine, and the data stored is displayed, the master as well as the detail rows are displayed. But when I try to make any changes to the text field in dt2, they are not saved back.
    Does the JSF framework prohibit an editable dataTable being within another datatable (in the of the columns of the outter dataTable)?
    Thanks for any help on this!
    Haroon

    Nope, no limitations. Make sure the subcomponents
    in dt2 (OutputTextN) are bound properly.
    Check the value property on each.
    If all looks good and still have problems, you can
    check the jsp source to see if the value binding
    expressions are correct.
    John
    JSC QA

  • Error trying to run a sample master-detail JSF form in Jdev 10.1.3

    I've tried JDeveloper 10.1.3 folowing a tutorial , master-detail one , involving Adf Faces which I found it here http://www.oracle.com/technology/products/jdev/101/tutorials/e2ebcfaces/buildmaster-detailpagewithjdevandadfbc.htm.
    1. I dowloaded JDeveloper 10.1.3
    2. I made -in Jdeveloper- a connection to OE8 schema
    2. I created an application with web application template ; in my new workspace i had 2 projects Model and ViewController
    3. In model i choose Business Tier - ADF Bussiness Components - Business Components from Tables and I followed instructions in tutorial
    4. In ViewController I created Web Tier - JSF - JSF JSP , with the JSF-JSP wizard a jsp page browseCustomerOrders.jsp. For building a master detail form i folowed instructions in tutorial
    However ...
    5. When I tried to run i received ....
    " [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    **** Unable to obtain password from principals.xml. Using default.
    D:\jdevstudio1013\jdev\system\oracle.j2ee.10.1.3.34.12\embedded-oc4j\config>
    D:\jdevstudio1013\jdk\bin\javaw.exe -ojvm -classpath D:\jdevstudio1013\j2ee\home\oc4j.jar;D:\jdevstudio1013\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config D:\jdevstudio1013\jdev\system\oracle.j2ee.10.1.3.34.12\embedded-oc4j\config\server.xml
    [waiting for the server to complete its initialization...]
    05/11/30 12:04:16 Exception in thread "OC4J Launcher" oracle.classloader.util.AnnotatedNoClassDefFoundError:
         Missing class: oracle.core.ojdl.logging.LoggingConfiguration
         Dependent class: com.evermind.server.XMLApplicationServerConfig
         Loader: oc4j:10.1.3
         Code-Source: /D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar
    The missing class is not available from any code-source or loader in the server.
    05/11/30 12:04:16      at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2073) [D:/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@7]
         at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1681) [D:/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@7]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1633) [D:/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@7]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1618) [D:/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@7]
         at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap]
         at com.evermind.server.XMLApplicationServerConfig.initJ2eeLogging (XMLApplicationServerConfig.java:243) [D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.XMLApplicationServerConfig.postInit (XMLApplicationServerConfig.java:255) [D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.xml.XMLConfig.init (XMLConfig.java:200) [D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.xml.XMLConfig.init (XMLConfig.java:117) [D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.ApplicationServerLauncher.run (ApplicationServerLauncher.java:74) [D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre.bootstrap]
    05/11/30 12:04:16 Fatal error: server exiting
    Process exited with exit code 1. "
    Where do you think i am wrong?
    Many thanks

    Hi,
    the problem seems not to be within your application but in missing files on your embedded OC4J. Just try and unzip the JDeveloper 10.1.3 install again.
    Frank

  • FM 10.0.2 Patch - CMYK fix details

    Kapil Verma, FM's product manager, has a blog detailing some of the fixes in the new patch.
    See: http://blogs.adobe.com/techcomm/2011/11/framemaker-10-0-2-patch-released-several-cmyk-issu es-fixed.html

    Error7103 wrote:
    Check out the "Overprint" fixes.
    It looks like the Frame graphics transparency shown in the manual for years now actually works.
    Not visible in edit mode, alas, but then EPS transparency never has been either.
    It's also somewhat amusing that the colors in the left (edit) and right (PDF) screenshot panes, both before and after fixes, are painfully mismatched.
    I've just tried printing off a page with a transparent eps and it doesn't seem to work.
    I've messed with the Overprint and Tint, but nothing seems to be happening.

  • Synchronization between two master detail jsf page

    hi guys,
    i have two jsf page, how can i synchronize the row selected (af:table) on the first page of one master detail ( the detail table) with the second page.
    In my case in the second page i can make modifications in a dialog Popup, but the row selected (the detail table) in the first page is shown in the popup
    i want the selected record of the detail table in the second page will be shown in the popup
    thanks for your help
    Edited by: fakhri_tn on Nov 13, 2012 11:47 PM

    Hi,
    in this case you need to pass the SelectedRowKeySet of the detail table in page one. So what you can do is
    1. create a managed bean in page flow scope
    2. when navigating to page 2, access the table component (make sure you don't create a managed bean component reference in the page flow bean and instead use a backing bean for component instance lookup) and read its selected row key set
    3. On page 2, reference the page flow managed bean saved rowKeySet from the selected row keys property of the table
    Frank

  • Does the SP4 of the WebLogic 8.1 Fix the JSF Deployment Problem?

    I ran my first JSP (a simple, little example) successfully on the Tomcat 5.0.28. I then tried to put the "war" file under the WebLogic 8.1 deployment directory and got the Internal Server Error: java.lang.NullPointerException at javax.faces.webapp.FacesServlet.init(FacesServlet:java:144).
    I read some threads posted on the web. People are saying that the SP4 of the WebLogic 8.1 has that problem fixed. It is true?
    I work in a Company where the WebLogic 8.1 has been installed in my PC. Do I ask the Company to get the SP4 from the BEA? Or, I can download the SP4? Is there a web link (URL) for downloading the SP4 (I do not need the entire WebLogic 8.1)?
    Thank you very much in advance.

    I have gone to the BEA web site to download the Service Pack 4. I kept getting this message: "Your session has expired. Please log in again." no matter how fast I filled out and submitted their form. I also e-mailed the BEA support to report the problem. But, I have not yet received any reply. It has been almost 24 hours since the problem was reported.
    What should I do?

  • Datatable wackiness - JSF trying to read a non-existant field from a bean

    I am having a very strange problem in JSF. I currently have one links page with four commandLinks in it, and one JSF page witha datatable in it, and an IBM <hx:pagerDeluxe> in it to page through the data. Each command link fires off a different action, as shown below:
         <h:commandLink action="UM02">
              <h:outputText value="UM02" />
         </h:commandLink>
         <h:commandLink action="UM03">
              <h:outputText value="UM03" />
         </h:commandLink>          ..........etc ........
    My Navigation rules all point to one JSP file, but with a different param appended to the URL:
              <from-view-id>/index.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>UM02</from-outcome>
                   <to-view-id>/jsp/mappings/listViewUM02.jsp?tbl=UPD_MAP_UM02</to-view-id>
              </navigation-case>
              <navigation-case>
                   <from-outcome>UM03</from-outcome>
                   <to-view-id>/jsp/mappings/listViewUM02.jsp?tbl=UPD_MAP_UM03</to-view-id>
              </navigation-case>     So as you can see, I have one JSF file to display a list from any given table name. I also dynamically populate the dataTable through my code, by reading through a list of columns for each table, and creating a "UIColumn":
              while( itr.hasNext() ){
                   String fieldName = (String) itr.next();                                                  
                   ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{var." + fieldName + "}");
                   HtmlOutputText header = new HtmlOutputText();               
                   header.setValue(fieldName);               
                   UIColumn col = new UIColumn();
                   UIOutput out = new UIOutput();
                   out.setValueBinding("value", vb);
                   col.setHeader( header );
                   col.getChildren().add(out);               
                   dataTable.getChildren().add(col);               
              }          And that dataTable is shown in the JSF page. So i can go back to the main links page, click on another table name, and it will populate the datatable with the correct columns, data, etc. The problem happens when I go to one table, say UM02, and hit ">" on the pager, to go to the next page, which works, THEN i go back to the links page, and hit "UM03" and the first page displays fine. When I try to go to the next page, I get an error saying that the backing bean UM03Bean does not have field "subProductCd". Basically, values from the old dataTable objects are being used for smoe reason when I page. Not sure why this is happening.
    My datatable is defined like this:
         <h:form id="dataTableForm"><h:dataTable id="dataTable1" border="0" cellpadding="2"
              cellspacing="0" columnClasses="columnClass1"
              headerClass="headerClass" footerClass="footerClass"
              rowClasses="rowClass1, rowClass2, rowClass3"
              styleClass="dataTableEx" width="70%" rows="10"
              value="#{TestAction.list}" var="var"
              binding="#{TestAction.listDataTableUI}">
              <f:facet name="footer">
                   <hx:panelBox styleClass="panelBox" id="pagerbox">
                        <hx:pagerDeluxe styleClass="pagerDeluxe" id="deluxe1" for="dataTable1"/>                              
                        <h:commandLink action="home">
                             <h:outputText value="Back Home"></h:outputText>
                        </h:commandLink>
                   </hx:panelBox>     
              </f:facet>
         </h:dataTable>
         </h:form>

    BalusC wrote:
    It is comparing the selected value against the List<SelectItem> returned by getSetoresOrigem() as it is during the apply request values phase of the form submit request.Ok. That's what I supposed JSF was doing.
    BalusC wrote:
    If the selected value isn't in there, then you will get this error.I can understand this, but is this right? As I said, the old value isn't really there because I changed the list values to new ones. But the new value (the value of fSetorOrigem ) corresponds to a value that exist in the new list items, so a valid value. So JSF is not considering that I also changed the list, not just the value. It is comparing the new value with the old list, not the new one. Acting like this JSF is making the page looks like a static HTML page, not a dynamic one. If I can't change the list and the value, what's the point of that? In my point of view I'm not doing anything wrong, I'm not violating any JSF rules.
    Marcos

  • JDeveloper Toplink + JSF Editable datatable

    Hi to all,
    is it possible to make and aditable datatable (from database) using Toplink + JSF JSP pages?
    is there a valid tutorial tha explain it?
    Thanks to all
    Emanuele

    what part are you "not getting" exactly? How to react to a button press? How to save something in the database?

  • JSF datatable pagination - showing page wise total.

    Hi All,
    i am ok with normal pagiation. but i have a requirement to show total count of a column page wise in the footer and also total count of th column at the datatable bottom.i can able to get total count but how can we show page wise total count in the footer of datatable. please help me in this
    Regards,
    A.

    So you want something likedouble subTotalPrice = 0.0d;
    for (int i = dataTable.getFirst(); i < dataTable.getFirst() + dataTable.getRows() && i < dataList.size(); i++) {
        DataItem dataItem = dataList.get(i);
        double dataItemPrice = dataItem.getPrice();
        subTotalPrice += dataItemPrice;
    return subTotalPrice;?

  • Values from columns of datatable...

    Hi guys,
    i'm working with my jsf application to create a datatable.
    It works well,but now i've added a commandlink button to dynamically adding a new column(i use this datatable for input data,each row is an experiment).
    It works fine,column is correctly added.
    At the end of each row of my datatable i've a submit button to send values of the row into db.
    My question is:
    My datatable has 5 fixed fields and other dinamic fields that user can add with button. My 5 fixed values have to go into a table(and it works) and i want that dynamic values(that use has added) go into another table,each one as a different row.
    Example
    usa italy french england japan rome tokyo
    i want usa italy french englan japan go into a table(as a row) and rome tokio goes into another table
    rome
    tokio(different rows).
    How can i do it?
    My problem is i'm not able to binding the dynamic input fields to bean....can you help me?
    Here is my class
    public class BiosamplesTable {
         private List biosamples= new ArrayList();
         private HtmlDataTable biosampleDataTable;
    private int autokey2;
         private Biosample biosampleItem;
         private int nrows;
         private DataModel mColumns;
         private int load=0;
         private String columnLabel;
         public HtmlDataTable getBiosampleDataTable()  {
              return biosampleDataTable;
         public void setBiosampleDataTable(HtmlDataTable biosampleDataTable) {
              this.biosampleDataTable = biosampleDataTable;
         public Biosample getBiosampleItem() {
              return biosampleItem;
         public void setBiosampleItem(Biosample biosampleItem) {
              this.biosampleItem = biosampleItem;
         public List getBiosamples() throws Exception {
              loadBiosamples();
              // Reload after every request.
              return biosamples;
         public void setBiosamples(List biosamples) {
              this.biosamples = biosamples;
         public void loadBiosamples() throws Exception {
              if (load==0){
              for (int i = 0; i < nrows; i++) {
                   Biosample biosample = new Biosample();
                   biosamples.add(biosample);
                   setBiosamples(biosamples);
                   load=1;
              else
                   setBiosamples(biosamples);
         public int getNrows() {
              return nrows;
         public void setNrows(int nrows) {
              this.nrows = nrows;
         public DataModel getColumnDataModel()
             if (mColumns == null)
               String[] result = new String[]{};//sono le colonne di partenza,in questo caso 1!!!
               mColumns = new ListDataModel(new ArrayList(Arrays.asList(result)));
             return mColumns;
         public void addColumn(ActionEvent e)
             if(columnLabel!=null);//metter l'if
               List columns = (List) getColumnDataModel().getWrappedData();
               columns.add(columnLabel);
         public String getColumnLabel(){
              return columnLabel;
         public void setColumnLabel(String columnLabel){
              this.columnLabel=columnLabel;
    }and this is my jsp page
    <t:dataTable
        value="#{biosamplesTable.biosamples}"
        var="biosampleItem"
         binding="#{biosamplesTable.biosampleDataTable}" border="3" bgcolor="pink" >
        <h:column >
            <f:facet name="header">
                <h:outputText value="Organism"/>
            </f:facet>
           <h:selectOneMenu value="#{biosampleItem.organism}">
                <f:selectItems value="#{biosample.selectOrganism}"/>
           </h:selectOneMenu>
        </h:column>
        <h:column>
            <f:facet name="header">
                <h:outputText value="Treatment Protocol" />
            </f:facet>
            <h:inputText value="#{biosampleItem.treatmentProtocol}" />
        </h:column>
        <h:column >
            <f:facet name="header">
                <h:outputText value="Extraction Method" />
            </f:facet>
            <h:inputText value="#{biosampleItem.extractionMethod}" />
        </h:column>
        <h:column >
            <f:facet name="header">
                <h:outputText value="Label"/>
                </f:facet>
            <h:inputText value="#{biosampleItem.label}" />
        </h:column>
        <h:column>
            <f:facet name="header">
                <h:outputText value="Hybridation" /></f:facet>
            <h:inputText value="#{biosampleItem.hybridation}" />
        </h:column>
        <h:column>
            <f:facet name="header">
                <h:outputText value="Amplification" /></f:facet>
            <h:inputText value="#{biosampleItem.amplification}" />
        </h:column>
        <t:columns value="#{biosamplesTable.columnDataModel}" var="column"  >
         <f:facet name="header">
        <h:panelGroup>
        <h:outputText value="#{column}" />
        <h:commandLink actionListener="#{biosamplesTable.removeColumn}">
        <h:outputText value="Elimina"/>
        </h:commandLink>
        </h:panelGroup>
        </f:facet>
             <h:inputText value="#{biosampleProperties.value}" />
        </t:columns>
        <h:column>
            <f:facet name="header">
                <h:outputText value="Actions" />
            </f:facet>
            <h:commandLink
            value="Invia dati biosample" actionListener="#{biosamplesTable.editBiosample}" id="editBiosample">
            </h:commandLink>
        </h:column>
        </t:dataTable>     i want the values of each added column goes as different row into a biosampleProperties table....
    Thanks..

    u can't achieve this with DataTable u need tu use JSTL ...exactly the
    C-Tag
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

  • URGENT - how to get the checkbox selected data from datatable.

    Hi
    I have some dynamic data. which will be displayed as checkbox. User can select the checkboxes in jsp. after selection when I submit the page I wanted to get the list of checkbox data the user selected.
    Here is the following code. when I submit the form the method which is mapped in bean (dostuff() method) is not calling. it is simply displaying the same page. Could you please tell me where I am doing wrong.
    please give me suggestion what I should to get the checkbox data in bean.
    My Code JSP:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
    <h:form>
    <h:dataTable id="xxx" var="person" value="#{checkboxBean.beans}" >
    <h:column><h:selectBooleanCheckbox value="#{person.checked}"/></h:column>
    <h:column><h:outputText value="#{person.id}"/></h:column>
    </h:dataTable>
    <h:commandButton id="details" action="#{checkboxBean.doStuff}" value="do Stuff"></h:commandButton>
    </h:form>
    </f:view>
    public class CheckboxBean {
    private static final Logger logger = Logger.getLogger(CheckboxBean.class);
    private List beans = null;
    public CheckboxBean() {
    logger.debug("CheckboxBean()");
    public String doStuff() {
    logger.debug("doStuff()");
    logger.debug("Some Bean selected data :" );
    return "test";
    public List getBeans() {
    beans = new ArrayList();
    SomeBean[] someBeans = new SomeBean[3];
    someBeans[0] = new SomeBean("first Person", false);
    someBeans[1] = new SomeBean("2nd Person", true);
    someBeans[2] = new SomeBean("third person", false);
    beans.add(someBeans[0]);
    beans.add(someBeans[1]);
    beans.add(someBeans[2]);
    logger.debug("Inside getBeans()");
    return this.beans;
    <managed-bean>
    <description>Checkbox bean.</description>
    <managed-bean-name>checkboxBean</managed-bean-name>
    <managed-bean-class>com.view.bean.CheckboxBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    * Created on Mar 17, 2006
    * TODO To change the template for this generated file go to
    * Window - Preferences - Java - Code Style - Code Templates
    package com.view.bean;
    public class SomeBean {
    private boolean checked = false;
    private String id ;
    public SomeBean() {
    public SomeBean(String anId, boolean bool) {
    super();
    this.id = anId;
    this.checked = bool;
    public String getId() {
    return this.id;
    public void setId(String id) {
    this.id = id;
    public boolean isChecked() {
    return this.checked;
    public boolean getChecked() {
    return this.checked;
    public void setChecked(boolean checked) {
    this.checked = checked;
    public String toString() {
    return "Id: " + id + ", checked :" + checked;
    }

    Hello,
    If you post in ASP.NET forums, you'll get more help.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • How to connect my imac to tv

    I have an 2010 iMac, OS X Mountain Lion (10.8.2), and I would like to hook it up to my 50" Plasma TV . What cables do I used? And do I hook it up to a splitter or a switch? Beside the HDMI, I also have two other connections on my TV,   RS-232C INPUT 

  • Problem with the StreamingURLResource's clipStartTime

    I need to play a subclip, so i use StreamingURLResource to do this: var resource:StreamingURLResource = new StreamingURLResource(src, streamType, clipStartTime, clipEndTime); but with some of the steam, if the clipStartTime is higher than zero, the p

  • Exporting Workbook as Oracle Report in Disco 4i ?

    Hi everybody, I saw a note telling that one of the differences between Discover 4i Plus and Discover 4.1 Desktop Edition was that 4i Plus cannot export his workbooks on Oracle*Report, as the 4.1 does. Is it right or wrong ?? Thanks a lot for the answ

  • Permissions / Uninstall Snafu on MacOS 10.9

    Preferences won't save claiming a permissions error.  Disk Utility found no problem.  Uninstall claimed need for Application Manager.  Application Manager installation failed, directed to download Application Support Advisor.  Application Support Adv

  • Stripping weblogic.jar???

    Hi all.           During our development/testing cycle of our application, we sticked with both wlclient.jar and wljmsclient.jar and sometimes we found strange behavior in terms of Exception handling (through ExceptionListener), reconnection (not aut