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

Similar Messages

  • h:dataTable and h:panelGrid Troubles

    I have a list of Server Objects that I want to display in a table format with specifically 5 columns and the number of rows can be dynamic based on the number of Servers. I need the Servers to be displayed as buttons with the Server.name on the button and the button color based on the Server.status. I am trying to accomplish this with a <h:dataTable> and a <h:panelGrid>, but with no luck. Can someone please offer up a solution? I am getting what I want, but it is all in 1 column, not in 5 columns. My code is below:
    <h:dataTable value="#{serversBacking.servers}" var="server">
      <h:column>
        <h:panelGrid columns="5">
          <ui:fragment rendered="#{server.status=='up'}">
            <h:commandButton action="processes?faces-redirect=true" value="#{server.name}" style="background-color:green"/>
          </ui:fragment>
          <ui:fragment rendered="#{server.status!='up'}">
            <h:commandButton action="processes?faces-redirect=true" value="#{server.name}" style="background-color:red"/>
          </ui:fragment>
        </h:panelGrid>
      </h:column>
    </h:dataTable>

    Do not use an h:panelGrid, instead make five h:column instances, each containing what goes in one cell of the table.

  • Trouble using MyFaces dataTable and t:columns tag in JSR168 portlet

    Hi, I have a question and need some help.
    I am building a JSF portlet, and trying to use Appache MyFaces custom tags.
    I need to use t:dataTable, and t:columns tags to display a dynamic ListDataModel, since the number and content of columns will vary.
    The problem is, the dataTable will only display the first row of the ListDataModel, although the data is all there. It seems that the page only reads the first row of the ListDataModel. Anybody has similar experience, or have some work around?
    Thank you in advance.

    Thats a way I had not thought of to approach this
    problem.
    I'd like to see what your backing bean looks like in
    this instance.
    How does the binding to #{item.data} map to anything?As usual BackingBean
    TableInfoBean.contentTable is UIData. I use binding just for combobox. You can drop this binding.
    TableInfoBean.content.currentPage is any container supported by dataTable. In my case this is Collection. This Collection contains item objects. Each item can has one property with array, List, Collection etc. In my case this property is data (row.data). Each item of this data collection is some object too. In my case this objects has property data too.
    The hierarchy is
    dataTableList:Collection->itemObjectYAxis:SomeType->data:Collection->itemObjectXAxis:SomeAnotherType->properties for output.
    >
    Thanks
    -Matthew

  • Nested Classes and Static Methods

    I was perusing the Java Tutorials on Nested Classes and I came across this...
    [http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html|http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html]
    I was reading the documentation and I read a slightly confusing statement. I was hoping some further discussion could clarify the matter. The documentation on "Nested Classes" says (I highlighted the two statements, in bold, I am having trouble piecing together.)
    Static Nested Classes
    As with class methods and variables, a static nested class is associated with its outer class. And like static class methods, a static nested class cannot refer directly to instance variables or methods defined in its enclosing class ? it can use them only through an object reference.
    Note: A static nested class interacts with the instance members of its outer class (and other classes) just like any other top-level class. In effect, a static nested class is behaviorally a top-level class that has been nested in another top-level class for packaging convenience.
    So this means a nested static inner class CANNOT refer to its own instanced variables, like a normal static method, but CAN refer to its outer class instanced variables?

    So this means a nested static inner class CANNOT refer to its own instanced variables, like a normal static method, but CAN refer to its outer class instanced variables?No, it means that a static nested class cannot refer to instance variables of its enclosing class. Example:public class Foo {
        int i;
        static class Bar {
            int j = i; // WRONG! Bar class is static context
    }~

  • Command link from nested datatables

    I have nested datatables that work, but I need to be able execute an actionListener from a h:commandLink and reference the item that is being clicked. The example below works except that it always returns the items in the last category. So that if the 2nd item in the first category is clicked, the 2nd item of the last category is returned. I tried binding my dataTables to UIData objects on my managed bean so that I could call getRowData() but I cannot find a way to bind the embedded h:dataTable when I don't know how many to expect.
    Here is the code (stripped down for simplicity):
    <h:dataTable value="#{bean.categories}" var="category">
        <h:column>
            <h:outputText value="#{category.name}" styleClass="txtTitle"/>
            <h:dataTable value="#{category.items}" var="item">
                <h:column>
                    <h:commandLink actionListener="#{bean.activate}">
                        <h:outputText value="#{item.name}"/>
                        <f:param name="activate" value="#{item}"/>
                    </h:commandLink>
                </h:column>
            </h:dataTable>
        </h:column>
    </h:dataTable>
    =====================================================
    public class ManagedBean {
        private List categories;
        private Item activeItem;
        public void activate(ActionEvent e) {
            UICommand command = (UICommand)e.getComponent();
            List children = command.getChildren();
            for (Iterator i = children.iterator(); i.hasNext(); ) {
                UIComponent child = (UIComponent) i.next();
                if (child instanceof UIParameter) {
                    UIParameter param = (UIParameter)child;
                    if (param.getName().equals("activate")) {
                        this.activeItem = (Item)param.getValue();
                        break;
        public List getCategories() {
            return categories;
        public void setCategories(List categories) {
                this.categories = categories;
        public Item getActiveItem() {
            return activeItem;
        public void setActiveItem(item activeItem) {
                this.activeItem = activeItem;
    }

    bump

  • Nested dataTable bug?

    I�m having a problem with nested dataTables. The complete source code is attached.
    My backing bean has properties keys and map. Keys is an array of strings. Map is a map keyed off keys with string array values.
    The faces jsp creates a table with one row per key. The key is displayed in the first column and the second column holds another table displaying the elements of the corresponding map entry.
    Various command links with nested <f:param> elements are in the cells and footers of the nested table. The parameter values reference the var property of either the inner or outer tables. All command links reference the same action listener which prints the value of the parameter to stdout.
    Clicking on outer var always works.
    Clicking on inner var yields the correct result only if you are in the last row of the outer table.
    Clicking once on any of the footer link command links causes the action listener to be invoked once for each row of the outer table.
    Have I found a bug, am I doing something wrong, or is this functionality not supported?
    Any help appreciated.
    Nick
    Backing Bean Source:
    package test;
    import java.util.*;
    import javax.faces.component.UIParameter;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    public class NestedTableBean {
         private Map map;
         private String[] keys;
         public NestedTableBean() {
              keys = new String[]{"1", "2", "3"};
              map = new HashMap();
              map.put(keys[0], new String[]{"1a", "1b", "1c"});
              map.put(keys[1], new String[]{"2a", "2b", "2c"});
              map.put(keys[2], new String[]{"3a", "3b", "3c"});
         public Map getMap() {
              return map;
         public String[] getKeys() {
              return keys;
         public void doIt(ActionEvent actionEvent) {
              String param = null;
             List children = actionEvent.getComponent().getChildren();
             for (int i = 0; i < children.size(); i++) {
               if (children.get(i) instanceof UIParameter) {
                 UIParameter currentParam = (UIParameter) children.get(i);
                 if (currentParam.getName().equals("param") &&
                     currentParam.getValue() != null) {
                   param = currentParam.getValue().toString();
                   break;
             FacesContext context = FacesContext.getCurrentInstance();
             String id = actionEvent.getComponent().getClientId(context);
             System.out.println("In doIt(), component id: "+id+", param: "+param);
    }Faces JSP Source:
    <h:dataTable border="2" value="#{nestedTable.keys}" var="outerVar">
    <h:column>
      <h:outputText value="#{outerVar}"/>
    </h:column>
    <h:column>
      <h:dataTable  border="1" value="#{nestedTable.map[outerVar]}" var="innerVar">
       <h:column>
        <h:panelGrid columns="3">
         <h:outputText value="#{innerVar}"/>
         <h:commandLink actionListener="#{nestedTable.doIt}">
          <h:outputText value="outerVar"/>
          <f:param name="param" value="#{outerVar}"/>
         </h:commandLink>
         <h:commandLink actionListener="#{nestedTable.doIt}">
          <h:outputText value="innerVar"/>
          <f:param name="param" value="#{innerVar}"/>
         </h:commandLink>
        </h:panelGrid>
       </h:column>
       <f:facet name="footer">
        <h:panelGrid columns="2">
         <h:commandLink actionListener="#{nestedTable.doIt}">
          <h:outputText value="footer link"/>
          <f:param name="param" value="#{outerVar}"/>
         </h:commandLink>
        </h:panelGrid>
       </f:facet>
      </h:dataTable>
    </h:column>
    </h:dataTable>

    Hello,
    I have the same problem, when I use an nested dataTable the ActionEvent of the Second dataTable get always the Last Row of the First dataTable.
    The complete code :
    -=-=-=-=-=-=-=-=-=-=-=-=- PAGE.JSP -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    <h:dataTable id="categorias" var="categoria" value="#{UserBean.allCategorias}">
        <h:column>
            <h:dataTable id="items" var="item" value="#{categoria.items}">
               <f:facet name="header">
                   <h:outputText value="#{categoria.nome}" />
               </f:facet>
               <h:column>
                   <f:facet name="header">
                       <h:outputText value="Item" />
                   </f:facet>
                   <h:outputText value="#{item.nome}" />
               </h:column>
               <h:column>
                   <f:facet name="header">
                       <h:outputText value="Qtd Solicitada" />
                   </f:facet>
                    <h:outputText value="#{item.qtdSolicitada}" />
                </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="Qtd Recebida" />
                </f:facet>
                <h:outputText value="#{item.qtdEfetivada}" />
             </h:column>
              <h:column>
                  <h:panelGrid columns="2">
                      <h:inputText id="selected" size="5" />
                      <h:commandButton id="confirmar" immediate="true" image="images/confirmar_1.gif" actionListener="#{UserBean.processAction}">
                          <f:param id="itemId" name="id" value="#{item.nome}" />
                      </h:commandButton>
                  </h:panelGrid>
             </h:column>
         </h:dataTable>
    </h:column>
    </h:dataTable>-=-=-=-=-=-=-=-=-=-=-=-=- UserBean.java -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    public void processAction(ActionEvent event) throws AbortProcessingException {
        /* Find the UIParameter component by expression */
       UIParameter component = (UIParameter) event.getComponent().findComponent("itemId");
       /* param itemId - Wrong (use Debug to see) */
    }

  • Nested Sequence and Maximum Render Quality

    I use quite often nested sequences and sometimes within nested sequences. Do I have to check the flag Maximimum Render Quality in each sequence setting or is it enough to have it marked in the root/top sequence? I guess, I have to. Is this correct?
    regards,
    Claus

    For exports the checkbox in the export settings dialog overrides all others. For preview rendering make sure to check it on the top sequence in which you are rendering previews.

  • Jsf 2 nested datatable rerender issue

    Hi All,
    I'm struggling with a nested datatable rerender issue, which I can't seem to solve.
    Here's the situation: I have this datatable which iterates over serverinstances. For each serverinstance, I then iterate over it's urls. This all works fine.
    Now I want to add a new url for that serverinstance, so under the datatable, there's an input form.
    When submitted, the url is added to the serverinstance and updated (via backing bean).
    The only problem is, that the (nested) datatable is not rerendered. I can see the update working fine, because the url is added in the database.
    If I do the same thing in a one-level, unnested datatable, it works fine. I suppose the nesting is the problem here.
    Here's the (simplified) code:
              <h:form id="appurlform">
    <h:dataTable var="serverinstance" value="#{_AddUrls.app.sortedServerInstance}" >
    <h:column>
    <h:dataTable var="_appurl" value="#{serverinstance.appUrl}">
    <h:column><h:outputText value="#{_appurl.appurl}"/></h:column>
    </h:dataTable>
    </h:column>
    </h:dataTable>
    </h:form>
    <h:form id="newappurlform" prependId="false">
    <h3><h:outputText value="New Monitored Url"/></h3>
    <table>
    <tr>
    <td>Url: </td>
    <td>
    <h:inputText id="newappurl_url" value="#{_AddUrls.newAppUrl.appurl}"/>
    </td>
    </tr>
    </table>
    <h:commandButton id="submitappurl" value="Add Url"
    onclick="jsf.ajax.request(this, event,
    {execute:'newappurl_url',
    render:'appurlform'}); return false;"
    actionListener="#{_AddUrls.addAppUrl}">
    </h:commandButton>
    </h:form>

    Hi All,
    I'm struggling with a nested datatable rerender issue, which I can't seem to solve.
    Here's the situation: I have this datatable which iterates over serverinstances. For each serverinstance, I then iterate over it's urls. This all works fine.
    Now I want to add a new url for that serverinstance, so under the datatable, there's an input form.
    When submitted, the url is added to the serverinstance and updated (via backing bean).
    The only problem is, that the (nested) datatable is not rerendered. I can see the update working fine, because the url is added in the database.
    If I do the same thing in a one-level, unnested datatable, it works fine. I suppose the nesting is the problem here.
    Here's the (simplified) code:
              <h:form id="appurlform">
    <h:dataTable var="serverinstance" value="#{_AddUrls.app.sortedServerInstance}" >
    <h:column>
    <h:dataTable var="_appurl" value="#{serverinstance.appUrl}">
    <h:column><h:outputText value="#{_appurl.appurl}"/></h:column>
    </h:dataTable>
    </h:column>
    </h:dataTable>
    </h:form>
    <h:form id="newappurlform" prependId="false">
    <h3><h:outputText value="New Monitored Url"/></h3>
    <table>
    <tr>
    <td>Url: </td>
    <td>
    <h:inputText id="newappurl_url" value="#{_AddUrls.newAppUrl.appurl}"/>
    </td>
    </tr>
    </table>
    <h:commandButton id="submitappurl" value="Add Url"
    onclick="jsf.ajax.request(this, event,
    {execute:'newappurl_url',
    render:'appurlform'}); return false;"
    actionListener="#{_AddUrls.addAppUrl}">
    </h:commandButton>
    </h:form>

  • JSF Nested Datatable , ValueExpression

    Hi, I'm working on an application which is going to use a nested datatable.
    basically I generate 1 datatable which consist of 7 columns , 5 rowsItems and for each column I generate a datatable to handle the data.
    I make a List from RowItems and bind it to my datatable by wrapping it in a datamodel
    the rowItem class consist of 7 List for each column which will be binded to each nested datatable using ValueExpression
    So now the problem is:
    I couldnt get the name for each display, I'm getting error message could not find property "name" for class String.
    output_name.setValueExpression("value", createValueExpression("#{displaycolVar.name}", String.class));but I can get the working unit displayed correctly
    output_workingunit.setValueExpression("value", createValueExpression("#{RowItemsVar.workingtime}", String.class));can someone help me on this problem?
    Thanks in advance
    my code
    calendar.java
    package demo;
    import java.util.ArrayList;
    import javax.el.ValueExpression;
    import javax.faces.component.UIOutput;
    import javax.faces.component.html.HtmlOutputText;
    import javax.faces.context.FacesContext;
    import javax.faces.model.ListDataModel;
    import org.ajax4jsf.org.w3c.tidy.TagTable;
    import org.richfaces.component.*;
    import org.richfaces.component.html.HtmlDataTable;
    import org.richfaces.component.html.HtmlColumn;
    public class Calendar
         // Table Properties
         private String[] days = {"Working Time","Monday","Tuesday","Wednesday","Thursday","Freiday","Saturday","Sunday"};
         private String[] workingunit = {"8:00-8:45","8:45-9:30","9:30-10:15","10:15-11:00","11:00-11:45"};
         private int column; // number of columns
         private int row; // number of rows
         // Main List to store the values
         private ArrayList<RowItems> RowItemList;
         // Datatable backing bean Component
         private UIDataTable calendarDatatable;
         // Constructor
         public Calendar()
              // Initializing row and column
              column = 7;
              row = 5;
              // Initializing Datatable
              calendarDatatable = new HtmlDataTable();
              calendarDatatable.setVar("RowItemsVar");
              calendarDatatable.setRendered(true);
              // Creating List of RowItems
              RowItemList = new ArrayList<RowItems>();
              // Adding rows to the List
              for(int i = 0;i<row;i++)
                   RowItemList.add(new RowItems(workingunit,column,i));
              // Creating creating 7 columns for each day + name column
              for(int i = 0; i <column+1; i++)
                   UIColumn column = new HtmlColumn();
                   UIOutput header = new HtmlOutputText();
                   // Initializing column and header
                   header.setValue(days[i]);
                   column.setHeader(header);
                   // the first column doesn't need a datatable
                   if(i == 0)
                        // Display data
                        HtmlOutputText output_workingunit = new HtmlOutputText();
                        output_workingunit.setValueExpression("value", createValueExpression("#{RowItemsVar.workingtime}", String.class));
                        column.getChildren().add(output_workingunit);
                        System.out.println("\n"+output_workingunit.getValueExpression("value"));
                   else      
                        // Create datatable for each column
                        UIDataTable datatable_nested = new HtmlDataTable();
                        datatable_nested.setVar("displaycolVar");               
                        datatable_nested.setRendered(true);
                        UIColumn column_for_nestedDT = new HtmlColumn();
                        // Display data
                        HtmlOutputText output_name = new HtmlOutputText();
                        output_name.setValueExpression("value", createValueExpression("#{displaycolVar.name}", String.class)); // <- it wont just find the property
                        // add outputtext for each column in nested datatable
                        column_for_nestedDT.getChildren().add(output_name);
                        // Add a column for each nested datatable
                        datatable_nested.getChildren().add(column_for_nestedDT);
                        * the expression value is correct I checked through println
                        switch(i)
                             case 1: datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col1}", String.class));
                                       break;
                             case 2:     datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col2}", String.class));
                                       break;
                             case 3:     datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col3}", String.class));
                                       break;               
                             case 4:     datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col4}", String.class));
                                       break;
                             case 5:     datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col5}", String.class));
                                       break;
                             case 6: datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col6}", String.class));
                                       break;
                             case 7:     datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col7}", String.class));
                                       break;                    
                        // Add the nested datatable to each column
                        column.getChildren().add(datatable_nested);
                   // Adding each column to highest entity of datatable
                   // 7 column will be added because there is 7 datatable
                   calendarDatatable.getChildren().add(column);
              // Test data
              RowItemList.get(0).getDisplaylist_col1().add(new Display("danny",1,1));
              // Datamodel for the highest entity of datatable
              ListDataModel<RowItems>RowItemsDM = new ListDataModel<RowItems>();
              // Wrapp the data from ArrayList into DataModel object
              RowItemsDM.setWrappedData(RowItemList);
              // Adding datamodel to highest entity of datatable
              calendarDatatable.setValue(RowItemsDM);
         public UIDataTable getCalendarDatatable() {
              return calendarDatatable;
         public void setCalendarDatatable(UIDataTable calendarDatatable) {
              this.calendarDatatable = calendarDatatable;
    // Methode to create a ValueExpression
    private ValueExpression createValueExpression(String valueExpression, Class<?> valueType)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    return facesContext.getApplication().getExpressionFactory().createValueExpression(
    facesContext.getELContext(), valueExpression, valueType);

    RowItems.java
    package demo;
    import java.util.ArrayList;
    * Class to represent each column
    public class RowItems
         private String workingtime;
         private int col;
         private int index;
         // List of list for each column     
         private ArrayList<Display> displaylist_col1 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col2 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col3 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col4 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col5 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col6 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col7 = new ArrayList<Display>();
         // Constructor
         public RowItems (String workingtime, int col, int index)
              this.workingtime = workingtime;
              this.col = col;
              this.index = index;
         // Getter & Setter
         public String getWorkingtime() {
              return workingtime;
         public void setWorkingtime(String workingtime) {
              this.workingtime = workingtime;
         public int getCol() {
              return col;
         public void setCol(int col) {
              this.col = col;
         public void setIndex(int index) {
              this.index = index;
         public int getIndex() {
              return index;
         public ArrayList<Display> getDisplaylist_col1() {
              return displaylist_col1;
         public void setDisplaylist_col1(ArrayList<Display> displaylist_col1) {
              this.displaylist_col1 = displaylist_col1;
         public ArrayList<Display> getDisplaylist_col2() {
              return displaylist_col2;
         public void setDisplaylist_col2(ArrayList<Display> displaylist_col2) {
              this.displaylist_col2 = displaylist_col2;
         public ArrayList<Display> getDisplaylist_col3() {
              return displaylist_col3;
         public void setDisplaylist_col3(ArrayList<Display> displaylist_col3) {
              this.displaylist_col3 = displaylist_col3;
         public ArrayList<Display> getDisplaylist_col4() {
              return displaylist_col4;
         public void setDisplaylist_col4(ArrayList<Display> displaylist_col4) {
              this.displaylist_col4 = displaylist_col4;
         public ArrayList<Display> getDisplaylist_col5() {
              return displaylist_col5;
         public void setDisplaylist_col5(ArrayList<Display> displaylist_col5) {
              this.displaylist_col5 = displaylist_col5;
         public ArrayList<Display> getDisplaylist_col6() {
              return displaylist_col6;
         public void setDisplaylist_col6(ArrayList<Display> displaylist_col6) {
              this.displaylist_col6 = displaylist_col6;
         public ArrayList<Display> getDisplaylist_col7() {
              return displaylist_col7;
         public void setDisplaylist_col7(ArrayList<Display> displaylist_col7) {
              this.displaylist_col7 = displaylist_col7;
    }display.java
    package demo;
    public class Display
         private Person person;
         private String name;
         private int x;
         private int y;
         public Display(String name, int x, int y)
              this.person = new Person(name);
              this.name = name;
              this.x = x;
              this.y = y;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public Person getPerson() {
              return person;
         public void setPerson(Person person) {
              this.person = person;
         public int getX() {
              return x;
         public void setX(int x) {
              this.x = x;
         public int getY() {
              return y;
         public void setY(int y) {
              this.y = y;
    }

  • My new iphone is running extremley slow, internet takes ages to load, apps take ages to install and has trouble connecting to app store. and the apps dont work properly like ebay wont open or refresh items, plz help

    my new iphone is running extremley slow, internet takes ages to load, apps take ages to install and has trouble connecting to app store. and the apps dont work properly like ebay wont open or refresh items, plz help
    my iphone4 is 10 times faster
    i have backed up on itunes and restored but still no luck
    even siri is lagging

    my new iphone is running extremley slow, internet takes ages to load, apps take ages to install and has trouble connecting to app store. and the apps dont work properly like ebay wont open or refresh items, plz help
    my iphone4 is 10 times faster
    i have backed up on itunes and restored but still no luck
    even siri is lagging

  • I have updated my 4s iphone to ios 6.1.3 and have trouble connecting it to wi fi . i tried to back up it on itunes and then restore it but now i have left with a phone that still doesnt connect to wi fi and  lost all my data. anyone knows how to fix it?

    i have updated my 4s iphone to ios 6.1.3 and have trouble connecting it to wi fi . i tried to back up it on itunes and then restore it but now i have left with a phone that still doesnt connect to wi fi and  lost all my data. anyone knows how to fix it?

    If no change after restoring the iPhone with iTunes as a new iPhone or not from the backup, there is a hardware problem.

  • Nested Tables and Advanced Queues- Please Help.

    How do i work with NestedTable type and Advanced Queue.
    I have done the following
    I have Oracle 8.1.7 enterprise edition.
    create type myType as TABLE OF varchar(32);
    create type myObject as OBJECT (
    id int,
    myt myType);
    DECLARE
    BEGIN
    dbms_aqadm.create_queue_table(
    queue_table => 'my_queue_table',
    multiple_consumers => TRUE,
    queue_payload_type => 'myObject',
    compatible => '8.1.3'
    END;
    The Nested Table and Object are created successfully.
    but the queue is not created.
    I get the following message.
    DECLARE
    ERROR at line 1:
    ORA-22913: must specify table name for nested table column or
    attribute
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2012
    ORA-06512: at "SYS.DBMS_AQADM", line 55
    ORA-06512: at line 3
    I know how to specify the nested table storage clause for
    create table statement, but there is no provision for
    it in the create_queue_table procedure.
    Any help will be greately appriciated.
    i have already created and tested aqs with simple data types,
    also i have created simple tables with nested table type
    elements.
    but the combo of Nested tables and AQ is not working.
    thanks in advance.

    Hi Francois. Thank you very much for your reply, but it seems that i still get errors. So let me tell what i have done.
    As you suggested me: i have done a block based on a sub-query for the nested-table:
    'select courses from department where name= :department.name'.
    In the master block(department) i have the when-new-record-instance trigger:
    Declare
    LC$Req varchar2(256);
    Begin
    LC$Req := '(select ns.courses from table
    ( select courses from department where name = ''' || :DEPARTMENT.name || ''' ) ns )';
    Go_block('block11');
    Clear_Block ;
    Set_Block_Property( 'block11', QUERY_DATA_SOURCE_NAME, LC$Req ) ;
    Execute_query ;
    End ;
    Now the errors i receive, this time in the runtime mode are:
    - FRM-41380: Cannot set the blocks query data source
    -FRM-41003: This function cannot be performed here.
    Since it seems that you know how to work with the nested table i would really appreaciate your help. I am new in the nested table and if you could give an ex with my tables it would be great.
    Thank you in advance.

  • Unable to export nested tables and vaarys

    Hai
    How to export nested tables and varrays in oracle 8i (8.1.6) .When exporting nested tables and varrays not exporting .What is the advantage use of nested tables and varrays
    Thanks in advance
    mohan

    Hello,
    I think that with such a new release you should use DataPump (expdp/impdb) to
    export Tables.
    For exporting a complete Schema you may use the following syntax:
    expdp {color:red}+user+{color}/{color:red}+password+{color} PARFILE=pfexport.txt_With pfexport.txt as bellow:_
    SCHEMAS={color:red}+schema_name+{color}
    FLASHBACK_TIME="TO_TIMESTAMP(to_char(SYSDATE,'DD-MM-YYYY HH24:MI:SS'),'DD-MM-YYYY HH24:MI:SS')"
    CONTENT=ALL
    DIRECTORY=EXP_DIR
    DUMPFILE={color:red}+dump_file_name+{color}
    LOGFILE={color:red}+log_file_name+{color}Then, in this example, you'll get the "dump file" and the "log file" into the EXP_DIR Oracle directory (if it exists).
    You can check your Oracle Directories with the following query:
    select * from dba_directories;Then, you can use one of these Directories or create a new one with the following statement
    CREATE OR REPLACE DIRECTORY {color:red}+directory_name+{color} AS '{color:red}+directory_path+{color}';
    GRANT READ,WRITE ON DIRECTORY {color:red}+directory_name+{color} TO {color:red}+user_name+{color};Hope it can help,
    Best regards,
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on Nov 28, 2009 12:08 PM

  • TS3899 "cannot get mail" in iphone5 suddenly. been using iphone to check 2 email accounts for months now, one is gmail and not troubled. the other is thunderbird and i get this error message now. no settings have been changed or anything! ideas?

    hey all, I have been getting the "cannot get mail" error message on my iphone5 suddenly.
    ive been using iphone to check two email accounts for months now, one is gmail and not troubled. the other is mail from thunderbird and i get this error message now saying it is not responding. no settings have been changed or anything, it just suddenly stopped receiving mail on my device as of Tuesday afternoon.
    Does anyone have iny ideas about why? i have yet to update to the new OS7 yet, could that be it?

    'The installer has insufficient privileges to modify this file C:\Program Files (x86)\Common Files\Apple\Apple Application Support\Web kit.resources\inspector\Images\Spinner Inactive Selected.gif.'
    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

  • PS CS6: It'd be helpful to have the option to collapse or expand the nested groups and layers.

    PS CS6: It'd be helpful to have the option to collapse or expand the nested groups and layers all at once.  Autodesk Maya has a similar feature in it's outliner that allows for you to do this.

    And as Jeffrey Tranberry answered there:
    • Open/close all layer groups (folders) at the current level of hierarchy: Cmd-click the arrow next to the group - This is handy when you want to open/close, say, all the top-level groups without disturbing the open/closed state of any groups nested within them.
    • Open/close all layer groups nested within the current one: Opt-click the arrow next to the group - This is nice when you want to open/shut a bunch of nested groups, without affecting any that lie outside the target group.
    • Open/close all layer groups, period: Cmd-Opt-click the arrow next to a group So, to keep things simple: when in doubt, Cmd-Opt-click a group’s arrow and you’ll collapse/expand all groups.
    * On Windows please substitutes Ctrl for Cmd and Alt for Opt. .

Maybe you are looking for