t:inputText inside of t:dataTable

Greetings,
Here is the code that works and creates columns after <MyProfile> Menu selection via backing bean.
<t:panelGrid columns="2" width="100%" rowClasses="vertTop">
<t:dataTable var="item" binding="#{myprofile.dataTable}" value="#{myprofile.dataList}">
<t:column>
<t:inputText value="#{item.firstname}"/>
</t:column>
</t:dataTable>
</t:panelGrid>
What I want to do is this; I don't want to create columns, datatable for displaying these fields. However,
I want to use dataList that has row, in it , without using <t:column> and I want to display these
fields as Form;
<t:panelGrid columns="2" width="100%" rowClasses="vertTop">
<t:dataTable var="item" binding="#{myprofile.dataTable}" value="#{myprofile.dataList}">
<t:outputLabe value="First Name"/><t:inputText value="#{item.firstname}"/>
<t:outputLabe value="Last Name"/><t:inputText value="#{item.lastname}"/>
</t:dataTable>
</t:panelGrid>
Thanks,

Hi Faissal,
My DataTable that I call via my JSP page has already what I need. I would like to use
<t:dataTable content , and display them on my page. But, I don't want to display them
as DataTable, rather, I would like to organize how I can place them and show it.
As you know that when I use <t:column it will show up like this (I see proper data showing);
firstname lastname status accesslevel
xxx yyy 1 Admin
What I want to display is this;
first name xxxxx
last name yyyyyy
status 1
accesslevel Admin
<t:commandButton value="Update" action=..../>
Thanks,
Edited by: KenVega on Jul 25, 2009 7:52 AM

Similar Messages

  • Right Click on inputText inside a table column - 11g

    Hi,
    I am using jdev 11.1.2.4.
    I need to open a menu using right click on an inputText inside a table column.
    I saw some examples, but there also the explorer menu opens instead of the defined contextMenu.
    We are using internet explorer 8.
    Does anyone knows how to do it?
    Thank you,
    Nina

    Hi,
    you forgot to mention what you've seen in regards to examples. So suppress the IE native context menu, try
    http://tompeez.wordpress.com/2011/09/12/surpress-contextmenu-on-adf-components/
    Note though that using af:showPopupBehavior for context should also suppress the native IE menu
    Frank

  • h:inputText inside t:datatable not set

    hi all
    could any one answer this question for me?
    thanks in advance
    http://stackoverflow.com/questions/3184665/hinputtext-inside-tdatatable-not-set
    Edited by: arash.norouzzadeh on Jul 6, 2010 2:32 AM

    Try t:selectOneMenu with t:selectItems instead.

  • Why are inputText values within a dataTable tag lost when validation fails?

    Hi, As a test, I have three fields outside of a dataTable tag and three fields inside a dataTable tag.
    I enter data into field1, field3 and all of the fields within the dataTable. Field2 is left empty and is required. I press the 'go' button which gets to the validation phase and immediately redraws the web page and says 'value is required' which is what it should do.
    What shocks me at this point is that the field values inside the datatable are lost. They are back to their original blank values.
    It like even though validation fails(the model is not updated), the datatable is redrawn using the model data which is still blank. The renderer forgets that those fields within the datatable had data typed into them.
    Is this a bug? and how do I get around it? I don't want to lose what was typed in.
    here is my example:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <html>
    <body>
    <f:view>
    <h:form>
    <h:panelGrid columns="2">
    <h:outputText value="field1"/><h:inputText value="#{example.field1}"/>
    <h:outputText value="field2 required"/><h:inputText required="true" value="#{example.field2}"/>
    <h:outputText value="field3"/><h:inputText value="#{example.field3}"/>
    </h:panelGrid>
    <h:panelGrid columns="1">
    <h:outputText value="dataTable"/>
    <h:outputText value="---------"/>
    <h:dataTable value="#{example.lines}" var="line">
    <h:column>
    <h:inputText value="#{line.text}"/>
    <f:facet name="header">
    <h:outputText value="column1"/>
    </f:facet>
    </h:column>
    </h:dataTable>
    <h:commandButton value="go"/>
    <h:outputText value="errors"/>
    <h:outputText value="---------"/>
    <h:messages showDetail="true"/>
    </h:panelGrid>
    </h:form>
    </f:view>
    </body>
    </html>
    package test;
    import java.util.ArrayList;
    public class Example {
         private String field1;
         private String field2;
         private String field3;
         private ArrayList lines = new ArrayList();
         public Example() {
              lines.add(new Line());
              lines.add(new Line());
              lines.add(new Line());
         public String getField1() {
              return field1;
         public void setField1(String field1) {
              this.field1 = field1;
         public String getField2() {
              return field2;
         public void setField2(String field2) {
              this.field2 = field2;
         public String getField3() {
              return field3;
         public void setField3(String field3) {
              this.field3 = field3;
         public ArrayList getLines() {
              return lines;
         public void setLines(ArrayList lines) {
              this.lines = lines;
    package test;
    public class Line {
         private String text;
         public String getText() {
              return text;
         public void setText(String text) {
              this.text = text;
    <managed-bean>
    <managed-bean-name>example</managed-bean-name>
    <managed-bean-class>test.Example</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>

    I posted about this bug a month ago and then again twice more (as recently as last week) and got zero responses. I piddled away so much time thinking I was crazy to believe this framework could have such a gaping hole in the fuselage that it was crazy. The more unsettling part too was the fact that the logging in the jsf code is so pathetic that you have no clue even with it on full that it's throwing your data away, they have unit tests in their code, including in-container tests, and they didn't have a test that turned this up? Hello? A project that has been going for this long should not have torture traps like this in it. Sorry for my negative post. To end on a positive note, I am looking forward to finding out about oracle's stuff. And Sun wonders why no one uses their stuff.
    Does the Oracle JSF implementation require OAS?

  • How do you reset inputText values in a dataTable?

    I'm having what must be a simple and common problem,
    but nothing I've tried has solved it. I want to be
    able to refresh (reset) the inputText field values in a dataTable.
    I have a dataTable that holds required inputText components.
    I want to have a "cancel" button which would abandon any edits
    on these components and refresh (reset) them with their backing values,
    as well as removing the last row from the table (used to enter a
    new record). Because the inputText components are required,
    I made the cancel button immediate. I don't know what code I can
    put in the button's actionListener. Right now, the displayed values
    survive the round trip to the server and back to the browser, but
    I want them to be reset to their backing values.
    Here is the page, and the backing bean of a test example:
    <%@ include file="../include/taglibs.jsp" %>
    <h:dataTable id="table" value="#{pc_Test.list}" var="x">
        <h:column>
            <h:panelGroup>
                <h:inputText id="label_value" required="true" value="#{x.value}" />
                <h:message for="label_value"/>
            </h:panelGroup>
        </h:column>
        <f:facet name="footer">
            <h:panelGroup>
                <h:commandButton id = "btnn" value="new row" actionListener="#{pc_Test.newRow}" /> 
                <f:verbatim>  </f:verbatim>
                <h:commandButton id = "btnu" value="update" actionListener="#{pc_Test.update}" />  
                <f:verbatim>  </f:verbatim>
                <h:commandButton id = "btnr" value="cancel" immediate="true" actionListener="#{pc_Test.cancel}"/>
            </h:panelGroup>
        </f:facet>
    </h:dataTable>
    <f:verbatim>Summary=</f:verbatim>
    <h:outputText value="#{pc_Test.listString}" />
    package pagecode;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.event.ActionEvent;
    public class TestPage {
        public static class Example {
            public Example(String value){this.value = value;}
            public String getValue() {return value;}
            public void setValue(String value) {this.value = value;}
            public String toString(){return getValue();}
            private String value;
        public TestPage(){
            list.add(new Example("a"));
            list.add(new Example("b"));
            list.add(new Example("c"));
        public List getList() {return list;}
        public String getListString() {return list.toString();}
        public void update(ActionEvent event){}
        public void cancel(ActionEvent event){
            if (list.size()>3)
                list.remove(list.size()-1);
        public void newRow(ActionEvent event){
            list.add(new Example(""));
        private boolean readOnly;
        private List list = new ArrayList();
    }If it makes a difference, my implementation of JSF is MyFaces. Thanks!

    bump
    I'm not happy with having javascript reseting fields in a table before submitting:
    there's a noticable screen flash, and I'd like a server-side solution anyway.
    Question: UIInput has methods getSubmittedValue and setSubmittedValue,
    so I can use these to ignore or clear submitted values when I press an
    immediate command button. This takes care of subclasses like HtmlInputText
    but not for data tables. Is there a way to manipulate all the submitted values
    of a data table?

  • How to iterator inputtext inside table

    hi i have situation where i have table inside a table i have inputtext which got emailaddress how can i iterator in order to return that email
    this is my table
    <af:table value="#{bindings.DeltMember1.collectionModel}"
                              var="row" rows="#{bindings.DeltMember1.rangeSize}"
                              emptyText="#{bindings.DeltMember1.viewable ? 'No data to display.' : 'Access Denied.'}"
                              fetchSize="#{bindings.DeltMember1.rangeSize}"
                              rowBandingInterval="0"
                              selectedRowKeys="#{bindings.DeltMember1.collectionModel.selectedRow}"
                              selectionListener="#{bindings.DeltMember1.collectionModel.makeCurrent}"
                              rowSelection="single" id="t5" width="1155"
                              partialTriggers="cb9" columnStretching="last"
                              inlineStyle="height:134px;">
                      <af:column sortProperty="Username" sortable="false"
                                 headerText="#{bindings.DeltMember1.hints.Username.label}"
                                 id="c15">
                        <af:inputText value="#{row.bindings.Username.inputValue}"
                                      label="#{bindings.DeltMember1.hints.Username.label}"
                                      required="#{bindings.DeltMember1.hints.Username.mandatory}"
                                      columns="#{bindings.DeltMember1.hints.Username.displayWidth}"
                                      maximumLength="#{bindings.DeltMember1.hints.Username.precision}"
                                      shortDesc="#{bindings.DeltMember1.hints.Username.tooltip}"
                                      id="it6">
                          <f:validator binding="#{row.bindings.Username.validator}"/>
                        </af:inputText>
                      </af:column>
                      <af:column sortProperty="Firstname" sortable="false"
                                 headerText="#{bindings.DeltMember1.hints.Firstname.label}"
                                 id="c14">
                        <af:inputText value="#{row.bindings.Firstname.inputValue}"
                                      label="#{bindings.DeltMember1.hints.Firstname.label}"
                                      required="#{bindings.DeltMember1.hints.Firstname.mandatory}"
                                      columns="#{bindings.DeltMember1.hints.Firstname.displayWidth}"
                                      maximumLength="#{bindings.DeltMember1.hints.Firstname.precision}"
                                      shortDesc="#{bindings.DeltMember1.hints.Firstname.tooltip}"
                                      id="it11">
                          <f:validator binding="#{row.bindings.Firstname.validator}"/>
                        </af:inputText>
                      </af:column>
                      <af:column sortProperty="Surname" sortable="false"
                                 headerText="#{bindings.DeltMember1.hints.Surname.label}"
                                 id="c13">
                        <af:inputText value="#{row.bindings.Surname.inputValue}"
                                      label="#{bindings.DeltMember1.hints.Surname.label}"
                                      required="#{bindings.DeltMember1.hints.Surname.mandatory}"
                                      columns="#{bindings.DeltMember1.hints.Surname.displayWidth}"
                                      maximumLength="#{bindings.DeltMember1.hints.Surname.precision}"
                                      shortDesc="#{bindings.DeltMember1.hints.Surname.tooltip}"
                                      id="it7">
                          <f:validator binding="#{row.bindings.Surname.validator}"/>
                        </af:inputText>
                      </af:column>
                      <af:column headerText="#{bindings.DeltMember1.hints.Emailaddress.label}"
                                 id="c18">
                        <af:outputText value="#{row.Emailaddress}" id="ot6"/>
                      </af:column>
                      <af:column id="c17">
                        <af:panelGroupLayout id="pgl6">
                          <af:panelFormLayout id="pfl8" rows="1" maxColumns="2">
                            <af:commandButton actionListener="#{bindings.Delete1.execute}"
                                              text="Remove" id="cb9">
                              <af:setActionListener from="{true}"
                                                    to="#{pageFlowScope.addMember.deleteAction}"/>
                            </af:commandButton>
                          </af:panelFormLayout>
                        </af:panelGroupLayout>
                      </af:column>
                    </af:table>
    something like this
        public String getCountry(){
            DCIteratorBinding it = ADFUtil.findIterator("IntUsr1Iterator");
           RowSetIterator rsi = it.getRowSetIterator();
             Row rw =   rsi.first();
             testusername = (String)rw.getAttribute("Countrycode");
            return testusername;      
    but my problem is the details are inside table not inputtextEdited by: adf009 on 2013/05/28 3:35 PM

    but the value is inside table column,
    what must i iterator
    DCIteratorBinding it = ADFUtil.findIterator("IntUsr1Iterator");
    <af:column headerText="#{bindings.DeltMember1.hints.Emailaddress.label}"
                                 id="c18">
                        <af:outputText value="#{row.Emailaddress}" id="ot6"/>
                      </af:column>
    pagedef of table
    <tree IterBinding="DeltMember1Iterator" id="DeltMember1">
          <nodeDefinition DefName="uam.model.UpdOrgDetails.DeltMember"
                          Name="DeltMember10">
            <AttrNames>
              <Item Value="Username"/>
              <Item Value="Firstname"/>
              <Item Value="Surname"/>
              <Item Value="Emailaddress"/>
            </AttrNames>
          </nodeDefinition>
        </tree>Edited by: adf009 on 2013/05/28 5:00 PM
    Edited by: adf009 on 2013/05/28 5:01 PM

  • H:message inside a JSF Datatable

    Is it possible to put an < h:message> inside of a column of a JSF Datatable? I want to validate that the user is actually entering data into the text box residing in the column of the Datatable.

    Yes, you could, please download jsf1.1 RI and install the jsf-components smaple and then refer this page:
    http://localhost:8080/jsf-components/repeater.faces

  • How to remember the value in h:commandLink inside a h:datatable

    I have a h:dataTable storing header information, there is a column "refno" which is a h:commandlink (or h:outputlink) so user can select that column and jump to the detail page.
    My problem is how to remember the refno so I can use it in the detail page?
    a simplified code is as follows:
    <html>
        <body>
              <f:view>
                  <h:form id="select">
                  <h:dataTable value="#{dataTableBean.arr}" var="loc">
                      <h:column>
                          <f:facet name="header" >
                              <h:outputText value="Frameworks"/>
                          </f:facet>   
                          <h:outputLink value="openedTenderDetail.jsf"> // or h:commandLink
                                  <h:outputText value="#{loc.refNo}" />
                          </h:outputLink>                            
                     </h:column>
                 </h:dataTable>
              </f:view>
        </body>
    </html>

    hello
    u can use <f:param to remeber value and go to next page accordingly
    in detail
    use commandlink and in action get value of <f:param and then navigate to the desired page according to the param value
    regards
    Shakeel Abbas

  • Unable to vertically align a amx:inputText inside amx:cellFormat

    Hi,
    Below is my amx code:
    I've 2 cell formats ,valign="top" is set for both. but the result is only outputText(2nd cell format) is vertically aligned correctly but not <amx:inputText (1st cellformat)
    Any idea?
    <amx:panelLabelAndMessage label="B\P" showRequired="true"
                                                                      inlineStyle="vertical-align:top;">
    <amx:tableLayout inlineStyle="height:25px; vertical-align:top;" width="100%">
                                                    <amx:rowLayout>
                                                       <amx:cellFormat valign="top" inlineStyle="vertical-align:top;"
                                                                        halign="end">
                                                            <amx:inputText value="#{bindings.branchPlant.inputValue}"
                                                                           maximumLength="12" id="it2218" simple="true"
                                                                          />
                                                    </amx:cellFormat>
                                                        <amx:cellFormat valign="top" >
                                                            <amx:outputText value="EMC" id="ot519"
                                                                            rendered="true"
                                                                            inlineStyle="color:Silver; font-size:small;"/>
                                                        </amx:cellFormat>
                                                    </amx:rowLayout>
    </amx:tableLayout>
    </amx:panelLabelAndMessage>

    Hi,
    this is a known behavior handled in bug 9830307 and 9768470. It is the intended behavior for table rows that are selectable. FF and Chrome may behave differently, which is considered to be the wrong behavior and is subject to fixing
    Frank

  • JSF Datatable inside a datatable problems

    Hi,
    i am having a datatable with 3 rows mapping to a column in the database table..now i have another datatable inside the previous datatable mapping to another column in the database.... i am able to fetch the values from the database and populate in the 2 datatables.my first datatable has one column and it is a component label.my second datatable has 4 columns..a select many checkboxes,a component label,and 2 text fields.
    Now the problem comes when i need to save the values that are being entered in the datatable..how do i get the values of the checkbox and the textfields and update in the database.and remember i need to get the values of all the components in both the datatables and update in the database...my JSP code and the backing bean codes are as follows.......pls help me with this problem
    JSP Code:
    <h:dataTable binding="#{AttributeSelection.uiTable2}" id="dataTable2" rowClasses="form"
    value="#{AttributeSelection.arrayDataModel}" var="currentRow1">
    <h:column binding="#{AttributeSelection.column5}" id="column5">
    <h:outputText binding="#{AttributeSelection.outputText1}" id="outputText1" value=""/>
    <f:facet name="header"/>
    <h:dataTable binding="#{AttributeSelection.uiTable1}" border="1" headerClass="form_bold"
    id="dataTable1" rowClasses="form" value="#{currentRow1['attributes']}" var="currentRow">
    <h:column binding="#{AttributeSelection.column1}" id="column1">
    <h:selectBooleanCheckbox binding="#{AttributeSelection.checkbox1}" id="checkbox1" value="#{currentRow.checkbox1}"/>
    <f:facet name="header"/>
    </h:column>
    <h:column binding="#{AttributeSelection.column2}" id="column2">
    <h:outputText binding="#{AttributeSelection.outputText3}" id="outputText3" value="#{currentRow['name']}"/>
    <f:facet name="header">
    <h:outputText binding="#{AttributeSelection.outputText4}" id="outputText4"
    style="height: 23px; width: 50%" styleClass="form_bold" value="#{currentRow1['category']}"/>
    </f:facet>
    </h:column>
    <h:column binding="#{AttributeSelection.column3}" id="column3">
    <h:inputText binding="#{AttributeSelection.textField1}" id="textField1"
    style="height: 24px; width: 65%" styleClass="input" value="#{currentRow['defaultMin']}"/>
    <f:facet name="header">
    <h:outputText binding="#{AttributeSelection.outputText8}" id="outputText8" value="Min"/>
    </f:facet>
    </h:column>
    <h:column binding="#{AttributeSelection.column4}" id="column4">
    <h:inputText binding="#{AttributeSelection.textField2}" id="textField2"
    style="height: 24px; width: 65%" styleClass="input" value="#{currentRow['defaultMax']}"/>
    <f:facet name="header">
    <h:outputText binding="#{AttributeSelection.outputText9}" id="outputText9" style="" value="Max"/>
    </f:facet>
    </h:column>
    </h:dataTable>
    </h:column>
    </h:dataTable>
    Backing Bean Code:
    * AttributeSelection1.java
    * Created on January 23, 2006, 10:46 AM
    * Copyright Sidharth_Mohan
    package tpalt;
    import com.equifax.ems.tpalt.order.dao.OrderDataDAO;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import com.sun.jsfcl.data.*;
    import java.util.ArrayList;
    import javax.faces.component.*;
    import javax.faces.model.ArrayDataModel;
    import com.equifax.ems.tpalt.order.model.OrderAttribute;
    import com.equifax.ems.tpalt.order.model.OrderCategory;
    import com.sun.faces.el.MethodBindingImpl;
    import java.util.Iterator;
    import java.util.Map;
    import javax.faces.application.Application;
    import javax.faces.context.FacesContext;
    import javax.faces.el.MethodBinding;
    public class AttributeSelection extends AbstractPageBean {
    * Bean initialization.
    // </editor-fold>
    public AttributeSelection() {
    // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
    try {
    } catch (Exception e) {
    log("AttributeSelection Initialization Failure", e);
    throw e instanceof javax.faces.FacesException ? (FacesException) e : new FacesException(e);
    // </editor-fold>
    // Additional user provided initialization code
    protected tpalt.ApplicationBean1 getApplicationBean1() {
    return (tpalt.ApplicationBean1)getBean("ApplicationBean1");
    protected tpalt.SessionBean1 getSessionBean1() {
    return (tpalt.SessionBean1)getBean("SessionBean1");
    // </editor-fold>
    * Bean cleanup.
    protected void afterRenderResponse() {
    }private int __placeholder;
    private HtmlForm form1 = new HtmlForm();
    public HtmlForm getForm1() {
    return form1;
    public void setForm1(HtmlForm hf) {
    this.form1 = hf;
    public UIData uiTable1 = new UIData();
    * Getter for property uiTable.
    * @return Value of property uiTable.
    public UIData getUiTable1() {
    return uiTable1;
    * Setter for property uiTable.
    * @param uiTable New value of property uiTable.
    public void setUiTable1(UIData uiTable1) {
    this.uiTable1 = uiTable1;
    private UIColumn column1 = new UIColumn();
    public UIColumn getColumn1() {
    return column1;
    public void setColumn1(UIColumn uic) {
    this.column1 = uic;
    private UIColumn column5 = new UIColumn();
    public UIColumn getColumn5() {
    return column5;
    public void setColumn5(UIColumn uic) {
    this.column5 = uic;
    private HtmlOutputText outputText1 = new HtmlOutputText();
    public HtmlOutputText getOutputText1() {
    return outputText1;
    public void setOutputText1(HtmlOutputText hot) {
    this.outputText1 = hot;
    public UIData uiTable2 = new UIData();
    * Getter for property uiTable.
    * @return Value of property uiTable.
    public UIData getUiTable2() {
    return uiTable2;
    * Setter for property uiTable.
    * @param uiTable New value of property uiTable.
    public void setUiTable2(UIData uiTable2) {
    this.uiTable2 = uiTable2;
    private ArrayDataModel arrayDataModel = new ArrayDataModel();
    public ArrayDataModel getArrayDataModel() {
    ArrayList orderList =new ArrayList();
    OrderDataDAO orderData =new OrderDataDAO();
    ArrayList orderCategories = new ArrayList();
    try
    orderList = (ArrayList) orderData.getAllAttributes();
    for (int i =0;i<orderList.size();i++)
    OrderAttribute or =(OrderAttribute)orderList.get(i);
    //or.setCheckbox1(true);
    String category = (String)or.getCategory();
    OrderCategory orderCategory = new OrderCategory();
    ArrayList attributesforCategory = new ArrayList();
    for (int j = i;j<orderList.size();j++){
    OrderAttribute ora =(OrderAttribute)orderList.get(j);
    if (category.equals(ora.getCategory())){
    attributesforCategory.add(ora);
    orderList.remove(j);
    j = i;
    orderCategory.setCategory(category);
    orderCategory.setAttributes(attributesforCategory);
    orderCategories.add(orderCategory);
    //dataTable2Model.setWrappedData(orderCategories);
    arrayDataModel = new ArrayDataModel(orderCategories.toArray());
    catch (Exception ex) {
    return arrayDataModel;
    public void setArrayDataModel(ArrayDataModel dtdm) {
    this.arrayDataModel = dtdm;
    private UIColumn column2 = new UIColumn();
    public UIColumn getColumn2() {
    return column2;
    public void setColumn2(UIColumn uic) {
    this.column2 = uic;
    private HtmlOutputText outputText3 = new HtmlOutputText();
    public HtmlOutputText getOutputText3() {
    return outputText3;
    public void setOutputText3(HtmlOutputText hot) {
    this.outputText3 = hot;
    private UIColumn column3 = new UIColumn();
    public UIColumn getColumn3() {
    return column3;
    public void setColumn3(UIColumn uic) {
    this.column3 = uic;
    private HtmlOutputText outputText4 = new HtmlOutputText();
    public HtmlOutputText getOutputText4() {
    return outputText4;
    public void setOutputText4(HtmlOutputText hot) {
    this.outputText4 = hot;
    private UIColumn column4 = new UIColumn();
    public UIColumn getColumn4() {
    return column4;
    public void setColumn4(UIColumn uic) {
    this.column4 = uic;
    private HtmlOutputText outputText8 = new HtmlOutputText();
    public HtmlOutputText getOutputText8() {
    return outputText8;
    public void setOutputText8(HtmlOutputText hot) {
    this.outputText8 = hot;
    private HtmlOutputText outputText9 = new HtmlOutputText();
    public HtmlOutputText getOutputText9() {
    return outputText9;
    public void setOutputText9(HtmlOutputText hot) {
    this.outputText9 = hot;
    public UIInput textField1 = new UIInput();
    public UIInput getTextField1() {
    return textField1;
    public void setTextField1(UIInput hit) {
    this.textField1 = hit;
    public UIInput textField2 = new UIInput();
    public UIInput getTextField2() {
    return textField2;
    public void setTextField2(UIInput hit) {
    this.textField2 = hit;
    public UISelectBoolean checkbox1 = new UISelectBoolean();
    public UISelectBoolean getCheckbox1() {
    return checkbox1;
    public void setCheckbox1(UISelectBoolean hsbc) {
    this.checkbox1 = hsbc;
    public String save_action() {
    try{
    java.lang.System.out.println("<<<<<<<<<<<<<<<Button Came<<<<<<<<<<<<<<<<<<>>>>>>>");
    java.lang.System.out.println("====================Welcome to the Button action======================");
    int firstIndex = uiTable2.getFirst();
    int rows = uiTable2.getRowCount();
    java.lang.System.out.println("----------------------FIRST INDEX-----------------------"+firstIndex);
    java.lang.System.out.println("----------------------ROWS-----------------------"+rows);
    ArrayList orderAttribs = orderCat.getAttributes();
    Iterator it = orderAttribs.iterator();
    while(it.hasNext())
    OrderAttribute currentAttribute = (OrderAttribute) it.next();
    java.lang.System.out.println("==================String Value===================" + currentAttribute.getCheckbox1());
    java.lang.System.out.println("==================String Value===================" + currentAttribute.getName());
    java.lang.System.out.println("==================String Value===================" + currentAttribute.getDefaultMin());
    java.lang.System.out.println("==================String Value===================" + currentAttribute.getDefaultMax());
    catch (Exception e) {
    e.printStackTrace();
    return "Test";
    private HtmlCommandButton save = new HtmlCommandButton();
    public HtmlCommandButton getSave() {
    return save;
    public void setSave(HtmlCommandButton hcb) {
    this.save = hcb;
    Please Reply me with this solution soon.............
    Thanx,
    Sidharth
    }

    you may get some help in the following...
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/inserts_updates_deletes.html
    -Regards,
    Aniruddha

  • Component binding inside h:dataTable fails

    Hi,
    I'd like to create a component binding for each commandLink to a distinct child bean inside an h:dataTable like so:
    <h:dataTable value="#{parent.children}" var="child">
        <h:column>
            <h:commandLink binding="#{child.command1}" value="do it to it for #{child}" action="#{child.action}"/>
        </h:column>
    </h:dataTable>But whenever I try to render this page I get an exception stating that "child is null" and binding cannot be performed. If I remove 'binding="#{child.command1}"', however, everything works fine. I guess this is happening because 'var="child"' in h:dataTable gets evaluated after bindings are created. How can I get around that - I really need to be able to refer distinctly refer to UIComponents in each row.
    Confused...
    thanks
    -nikita

    I created a seperate class to handle the requests ActivationRequestBuilder and put the code in there .
    if you want to refer to each row in the backing bean .
    create a variable of type HtmlDataTable .
    private HtmlDataTable tenantDataTable;
    set up accessor and mutator methods for this variable.
    In your jsp in the DataTable
    <h:dataTable binding="#{activationRequestBuilder.tenantDataTable}"
    <h:commandLink title="Delete Tenant section"
    immediate="true" action="#{activationRequestBuilder.deleteTenantLocationSection}">
    public String deleteTenantLocationSection(){
    (TenantLocationRecordBean) this.getTenantDataTable().getRowData();
    This is just snippets of code but you should get the idea of what I have done here .I had multiple sections in a page so each row was a TenantLocationRecordBean .

  • JSF Command Link inside DataTable has to be clicked twice in order to work

    I currently have a command link inside of a dataTable. However, when I go to the page and click the link nothing happens. It appears that the page is refreshed but looking at the logs nothing is done. However, if you click the same link again everything is updated properly. How do I get the command link to work properly? And, I have everything operating in the session scope.

    sdgorham wrote:
    No I do not have h:messages on the page. Just add it for debugging purposes. There might have been a validation or conversion error occurred which wasn't 'catched' by any h:message.
    Unfortunately, upgrading to another version isn't an option at the moment. OK, I checked the MyFaces page and 1.1.5 is indeed the latest JSF 1.1 implementation.
    Is there any other possible solutions that are more like a hyperlink than the command button. What exactly is causing the problem that I described?Have you tried if it works with a button or not? Only then we can be more sure about the cause of the problem.

  • Nested Datatables and checkbox trouble

    Hi,
    i am having a datatable with 3 rows mapping to a column in the database table..now i have another datatable inside the previous datatable mapping to another column in the database.... i am able to fetch the values from the database and populate in the 2 datatables.my first datatable has one column and it is a component label.my second datatable has 4 columns..a select many checkboxes,a component label,and 2 text fields.
    Now the problem comes when i need to save the values that are being entered in the datatable..how do i get the values of the checkbox and the textfields and update in the database.and remember i need to get the values of all the components in both the datatables and update in the database...my JSP code and the backing bean codes are as follows.......pls help me with this problem
    JSP Code:
    <h:dataTable binding="#{AttributeSelection.uiTable2}" id="dataTable2" rowClasses="form"
    value="#{AttributeSelection.arrayDataModel}" var="currentRow1">
    <h:column binding="#{AttributeSelection.column5}" id="column5">
    <h:outputText binding="#{AttributeSelection.outputText1}" id="outputText1" value=""/>
    <f:facet name="header"/>
    <h:dataTable binding="#{AttributeSelection.uiTable1}" border="1" headerClass="form_bold"
    id="dataTable1" rowClasses="form" value="#{currentRow1['attributes']}" var="currentRow">
    <h:column binding="#{AttributeSelection.column1}" id="column1">
    <h:selectBooleanCheckbox binding="#{AttributeSelection.checkbox1}" id="checkbox1" value="#{currentRow.checkbox1}"/>
    <f:facet name="header"/>
    </h:column>
    <h:column binding="#{AttributeSelection.column2}" id="column2">
    <h:outputText binding="#{AttributeSelection.outputText3}" id="outputText3" value="#{currentRow['name']}"/>
    <f:facet name="header">
    <h:outputText binding="#{AttributeSelection.outputText4}" id="outputText4"
    style="height: 23px; width: 50%" styleClass="form_bold" value="#{currentRow1['category']}"/>
    </f:facet>
    </h:column>
    <h:column binding="#{AttributeSelection.column3}" id="column3">
    <h:inputText binding="#{AttributeSelection.textField1}" id="textField1"
    style="height: 24px; width: 65%" styleClass="input" value="#{currentRow['defaultMin']}"/>
    <f:facet name="header">
    <h:outputText binding="#{AttributeSelection.outputText8}" id="outputText8" value="Min"/>
    </f:facet>
    </h:column>
    <h:column binding="#{AttributeSelection.column4}" id="column4">
    <h:inputText binding="#{AttributeSelection.textField2}" id="textField2"
    style="height: 24px; width: 65%" styleClass="input" value="#{currentRow['defaultMax']}"/>
    <f:facet name="header">
    <h:outputText binding="#{AttributeSelection.outputText9}" id="outputText9" style="" value="Max"/>
    </f:facet>
    </h:column>
    </h:dataTable>
    </h:column>
    </h:dataTable>
    Backing Bean Code:
    * AttributeSelection1.java
    * Created on January 23, 2006, 10:46 AM
    * Copyright Sidharth_Mohan
    package tpalt;
    import com.equifax.ems.tpalt.order.dao.OrderDataDAO;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import com.sun.jsfcl.data.*;
    import java.util.ArrayList;
    import javax.faces.component.*;
    import javax.faces.model.ArrayDataModel;
    import com.equifax.ems.tpalt.order.model.OrderAttribute;
    import com.equifax.ems.tpalt.order.model.OrderCategory;
    import com.sun.faces.el.MethodBindingImpl;
    import java.util.Iterator;
    import java.util.Map;
    import javax.faces.application.Application;
    import javax.faces.context.FacesContext;
    import javax.faces.el.MethodBinding;
    public class AttributeSelection extends AbstractPageBean {
    * Bean initialization.
    // </editor-fold>
    public AttributeSelection() {
    // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
    try {
    } catch (Exception e) {
    log("AttributeSelection Initialization Failure", e);
    throw e instanceof javax.faces.FacesException ? (FacesException) e : new FacesException(e);
    // </editor-fold>
    // Additional user provided initialization code
    protected tpalt.ApplicationBean1 getApplicationBean1() {
    return (tpalt.ApplicationBean1)getBean("ApplicationBean1");
    protected tpalt.SessionBean1 getSessionBean1() {
    return (tpalt.SessionBean1)getBean("SessionBean1");
    // </editor-fold>
    * Bean cleanup.
    protected void afterRenderResponse() {
    }private int __placeholder;
    private HtmlForm form1 = new HtmlForm();
    public HtmlForm getForm1() {
    return form1;
    public void setForm1(HtmlForm hf) {
    this.form1 = hf;
    public UIData uiTable1 = new UIData();
    * Getter for property uiTable.
    * @return Value of property uiTable.
    public UIData getUiTable1() {
    return uiTable1;
    * Setter for property uiTable.
    * @param uiTable New value of property uiTable.
    public void setUiTable1(UIData uiTable1) {
    this.uiTable1 = uiTable1;
    private UIColumn column1 = new UIColumn();
    public UIColumn getColumn1() {
    return column1;
    public void setColumn1(UIColumn uic) {
    this.column1 = uic;
    private UIColumn column5 = new UIColumn();
    public UIColumn getColumn5() {
    return column5;
    public void setColumn5(UIColumn uic) {
    this.column5 = uic;
    private HtmlOutputText outputText1 = new HtmlOutputText();
    public HtmlOutputText getOutputText1() {
    return outputText1;
    public void setOutputText1(HtmlOutputText hot) {
    this.outputText1 = hot;
    public UIData uiTable2 = new UIData();
    * Getter for property uiTable.
    * @return Value of property uiTable.
    public UIData getUiTable2() {
    return uiTable2;
    * Setter for property uiTable.
    * @param uiTable New value of property uiTable.
    public void setUiTable2(UIData uiTable2) {
    this.uiTable2 = uiTable2;
    private ArrayDataModel arrayDataModel = new ArrayDataModel();
    public ArrayDataModel getArrayDataModel() {
    ArrayList orderList =new ArrayList();
    OrderDataDAO orderData =new OrderDataDAO();
    ArrayList orderCategories = new ArrayList();
    try
    orderList = (ArrayList) orderData.getAllAttributes();
    for (int i =0;i<orderList.size();i++)
    OrderAttribute or =(OrderAttribute)orderList.get(i);
    //or.setCheckbox1(true);
    String category = (String)or.getCategory();
    OrderCategory orderCategory = new OrderCategory();
    ArrayList attributesforCategory = new ArrayList();
    for (int j = i;j<orderList.size();j++){
    OrderAttribute ora =(OrderAttribute)orderList.get(j);
    if (category.equals(ora.getCategory())){
    attributesforCategory.add(ora);
    orderList.remove(j);
    j = i;
    orderCategory.setCategory(category);
    orderCategory.setAttributes(attributesforCategory);
    orderCategories.add(orderCategory);
    //dataTable2Model.setWrappedData(orderCategories);
    arrayDataModel = new ArrayDataModel(orderCategories.toArray());
    catch (Exception ex) {
    return arrayDataModel;
    public void setArrayDataModel(ArrayDataModel dtdm) {
    this.arrayDataModel = dtdm;
    private UIColumn column2 = new UIColumn();
    public UIColumn getColumn2() {
    return column2;
    public void setColumn2(UIColumn uic) {
    this.column2 = uic;
    private HtmlOutputText outputText3 = new HtmlOutputText();
    public HtmlOutputText getOutputText3() {
    return outputText3;
    public void setOutputText3(HtmlOutputText hot) {
    this.outputText3 = hot;
    private UIColumn column3 = new UIColumn();
    public UIColumn getColumn3() {
    return column3;
    public void setColumn3(UIColumn uic) {
    this.column3 = uic;
    private HtmlOutputText outputText4 = new HtmlOutputText();
    public HtmlOutputText getOutputText4() {
    return outputText4;
    public void setOutputText4(HtmlOutputText hot) {
    this.outputText4 = hot;
    private UIColumn column4 = new UIColumn();
    public UIColumn getColumn4() {
    return column4;
    public void setColumn4(UIColumn uic) {
    this.column4 = uic;
    private HtmlOutputText outputText8 = new HtmlOutputText();
    public HtmlOutputText getOutputText8() {
    return outputText8;
    public void setOutputText8(HtmlOutputText hot) {
    this.outputText8 = hot;
    private HtmlOutputText outputText9 = new HtmlOutputText();
    public HtmlOutputText getOutputText9() {
    return outputText9;
    public void setOutputText9(HtmlOutputText hot) {
    this.outputText9 = hot;
    public UIInput textField1 = new UIInput();
    public UIInput getTextField1() {
    return textField1;
    public void setTextField1(UIInput hit) {
    this.textField1 = hit;
    public UIInput textField2 = new UIInput();
    public UIInput getTextField2() {
    return textField2;
    public void setTextField2(UIInput hit) {
    this.textField2 = hit;
    public UISelectBoolean checkbox1 = new UISelectBoolean();
    public UISelectBoolean getCheckbox1() {
    return checkbox1;
    public void setCheckbox1(UISelectBoolean hsbc) {
    this.checkbox1 = hsbc;
    public String save_action() {
    try{
    java.lang.System.out.println("><<<<<<<<<<<<<<<Button Came><<<<<<<<<<<<<<<<<<>>>>>>>");
    java.lang.System.out.println("====================Welcome to the Button action======================");
    int firstIndex = uiTable2.getFirst();
    int rows = uiTable2.getRowCount();
    java.lang.System.out.println("----------------------FIRST INDEX-----------------------"+firstIndex);
    java.lang.System.out.println("----------------------ROWS-----------------------"+rows);
    ArrayList orderAttribs = orderCat.getAttributes();
    Iterator it = orderAttribs.iterator();
    while(it.hasNext())
    OrderAttribute currentAttribute = (OrderAttribute) it.next();
    java.lang.System.out.println("==================String Value===================" + currentAttribute.getCheckbox1());
    java.lang.System.out.println("==================String Value===================" + currentAttribute.getName());
    java.lang.System.out.println("==================String Value===================" + currentAttribute.getDefaultMin());
    java.lang.System.out.println("==================String Value===================" + currentAttribute.getDefaultMax());
    catch (Exception e) {
    e.printStackTrace();
    return "Test";
    private HtmlCommandButton save = new HtmlCommandButton();
    public HtmlCommandButton getSave() {
    return save;
    public void setSave(HtmlCommandButton hcb) {
    this.save = hcb;
    Please Reply me with this solution soon.............
    Thanx
    }

    Hi Tabitha,
    You have mentioned extraction of data from two database tables. Can those two tables be joined to put the data in one single table component?
    Cheers
    Giri

  • Problem with commandButton in a custom DataTable

    I am trying to write a cutom DataTable and am having some trouble. I don't think that the DataTable that gets shipped has the flexibility that we need for our pages. That's why I'm trying to write my own.
    What I have is a commandButton in one of the column headers for the table. It is bound to a method in a backing bean. The page seems to render correctly. But when I click on the button, it seems to make a trip to the server, but the method doesn't get invoked.
    I figure that I'm missing something in my custom component, but I just can't figure it out. Does anyone have any ideas?
    If you would like for me to post some/all of the code just let me know. I didn't what might be helpful.
    Thanks,
    Ray

    Thank you for your response.
    I already had a messages tag on my page and no messages come out. I've looked in the log and don't see anything in their either. I put in a phaseListener and all of the phases are being processed.
    Here is my output. It is the same whether I press the button that is inside my custom dataTable or press a button that is outside my custom dataTable.
    beforePhase RESTORE_VIEW 1
    afterPhase RESTORE_VIEW 1
    beforePhase APPLY_REQUEST_VALUES 2
    afterPhase APPLY_REQUEST_VALUES 2
    beforePhase PROCESS_VALIDATIONS 3
    afterPhase PROCESS_VALIDATIONS 3
    beforePhase UPDATE_MODEL_VALUES 4
    afterPhase UPDATE_MODEL_VALUES 4
    beforePhase INVOKE_APPLICATION 5
    afterPhase INVOKE_APPLICATION 5
    beforePhase RENDER_RESPONSE 6
    afterPhase RENDER_RESPONSE 6
    The problem is, when I press the button that is inside my custom dataTable the method for the button doesn't get invoked. So I believe that I have something wrong in my custom dataTable that isn't building the component tree correctly. Does anyone have any ideas for this?
    Here is the class that renders my col tag. That tag puts out the <th> that the button is in.
    * Created on Dec 19, 2004
    package com.monsanto.ag_it.fieldops.aim.tblmaint.renderer;
    import java.io.IOException;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;
    import javax.faces.render.Renderer;
    import com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableCol;
    import com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableColHdr;
    * @author rcclark
    * Renderer for the RptTableTag
    public class RptTableColRenderer extends Renderer {
         private String tagType = null;
         public void encodeBegin(FacesContext context, UIComponent rptTableCol)
                   throws IOException {
              // First determine if this is a th or td cell
              Object rptTblSection = rptTableCol.getParent().getParent();
              tagType = "td";
              if (rptTblSection instanceof UIRptTableColHdr) {
                   tagType = "th";
              ResponseWriter writer = context.getResponseWriter();
              UIRptTableCol rptTblCol = (UIRptTableCol) rptTableCol;
              writer.write("\t\t\t");
              writer.startElement(tagType, rptTableCol);
    //System.out.println("col id=" + (String) rptTableCol.getAttributes().get("id"));
    //          if (!rptTblCol.getId().substring(0, 3).equals("_id")) {
                   writer.writeAttribute("id", rptTblCol.getClientId(context), null);
              String colClass = (String) rptTableCol.getAttributes().get("colClass");
              if (colClass != null) {
                   writer.writeAttribute("class", colClass, null);
              String colSpan = (String) rptTableCol.getAttributes().get("colSpan");
              if (colSpan != null) {
                   writer.writeAttribute("colSpan", colSpan, null);
              String rowSpan = (String) rptTableCol.getAttributes().get("rowSpan");
              if (rowSpan != null) {
                   writer.writeAttribute("rowSpan", rowSpan, null);
         public void encodeEnd(FacesContext context, UIComponent rptTableCol)
                   throws IOException {
              ResponseWriter writer = context.getResponseWriter();
              writer.endElement(tagType);
              writer.write("\r\n");
         public boolean getRendersChildren() {
              return true;
    }Thanks,
    Ray

  • Unable to get h:datatable working

    I am trying to use datatable tag. I am iterating over an array of objects.
    <h:dataTable value='#{someBean.items}' var='item'/>
    <h:column>
         <h:inputText size="20" id="label" styleClass="data" value='#{item.label}' required="true">
         </h:inputText>
    </h:column>
    </h:dataTable>
    Now in the debug statements I find that it has created my managed bean (someBean) successfully. someBean returns an array of someBeans.
    public class AutoBaselineItem{
    public someBean[] getItems(){
    //return an array of someBeans
    public String getLabel(){
    return "label";
    But the problem is this error [com.sun.faces.application.ApplicationImpl, http80-Processor3] DEBUG -Couldn't find a factory for item
    Does anybody know what is wrong in the way I am using the datatable. Why is it not able to find a factory for the item?

    Well, this has nothing to do with data tables and factories. You have to resolve the relationship between the objects "AutoBaselineItem" and "someBean".
    Assuming in your faces-config file you're using "auto" as <managed-bean-name> and "AutoBaselineItem" is the <managed-bean-class> then the value definition of the h:datatable tag should be:
    value='#{auto.items}'
    Your solution would only work if "someBean" would be the <managed-bean-name> for the AutoBaselineItem instance.
    Hope that helps.

Maybe you are looking for

  • Expdp failed job disappear

    Hi all, I am testing the expdp on attach job in 10.2R3 1. expdp job and ^C to stop it C:\TEMP>expdp system/oracle directory=testdir dumpfile=test5.dmp logfile=test5.log full=y job_name=expjob . . exported "SCOTT"."DEPT" 5.656 KB 4 rows . . exported "

  • How Do I Include Frame Lines In Exported PDF?

    I've created a layout template using rectangle frames. I want to use File > Adobe PDF Presets > [Press Quality] to export a pdf version of the layout. However, when I do that, I am not seeing the frame lines. I have checked, Include.. "Non-printing O

  • Windows to Linux

    Bought this netbook (S10e), but it has XP on it which I don't like (Don't use any Windows OS on my Laptop or Desktop.   I wish to convert to any form of Linux (PCLoS preferably), but I do wish to keep the quick launch facility.   3 Questions... 1.  

  • Changing listening port for JBoss

    Can anyone point out where to look for in order to change the listening port for JBoss. By defualt it takes 8080, I want to change that to some other number. I have been looking into the folders but it seems a lot of them and hard to find the exact f

  • Chart problems, upside down test

    I'm using Keynote 3.0 and I'm having some trouble with 3D charts. First, once I enter the data the text for the labels of the fields appear upside down once I view them. Second, I can't see 3D charts unless I'm in slideshow or Light Table view. Any a