Rowspan and h:datatable

Hi,
I've a little problem with datatable,
I want to make table like this
A |________
|________
|________
___|________
B |________
|________
|________
___|________
How to do this table using h:datatable.
I think, that I must use h:datatable within h:datatable, but it's difficult.
Is there any simple way, or better to wait for JSF2.0?
Thanks

I've tried to get correct working nested datatable
with commandbutton in innertable.
To view nested table are good, but events in don't
work correctly.UICommand elements in datatables are tricky. Keep in mind that the data should be available all the time, during all JSF phases, so that JSF knows which row was involved in the ActionEvent. A simple prove: if the managed bean which takes care of the data is set in request scope, change it to session scope. Big chance that it should work.
Does anybody know, how to get simple walkaround in
this problem, or it's better to use 1 table, delete
unnecessary data or/and try to make rowspan?
Thanks for help:)Deleting unnecessary data so that you get empty cells in the right rows is easy to implement. Just compare with the former row in a loop. If you want to create rowspans, then go for another datatable component, like I mentioned earlier. Tomahawk or RISB.

Similar Messages

  • Rowspan and Colspan with h:datTable

    Hi,
    How to apply Rowspan in h:dataTable so that I can merge some of the columns in one row.
    I couldn't find any implementation of rowspan and colspan with h:dataTable.
    KP

    Why would you want to do that? the data table repeating every row, so if you combine 2 columns on 1 row, then it'll combine them all for all row. I think what you want is for gridpanel. This is not possible right now I think, but you can use plan old html for this. Mixing Html and JSF to get what you want.

  • HTML rowspans and colspans...good or bad?

    Okay, so I gathered pretty early on that the layout mode in
    Dreamweaver was messy...however I never really understood why.
    My HTML theory was learned through Dreamweaver not old school
    hard coding.
    Then I found a nice little posting on the use of Spans:
    http://apptools.com/rants/spans.php
    I believe this is the major flaw in the use of the Layout
    mode, am I correct in this summation?
    The poster suggests using nested Tables to securely lock down
    the width and height of your tables/cells.
    My question is, which poses the greater problems: having Rows
    explode or Columns? I always thought HTML likes to "grow"
    horizontally if it needs to, and that height could be "locked" down
    fairly easily.
    Secondly, should the merge/split cell feature in standard
    mode be avoided as well? I gather this introduces the same issues
    with Rowspan and Colspan.
    So finally, is it ever wise to use Rowspan and Colspan? One
    can overdue it with nested tables as well I imagine?

    > I believe this is the major flaw in the use of the
    Layout mode, am I
    > correct
    > in this summation?
    Yes.
    > My question is, which poses the greater problems: having
    Rows explode or
    > Columns? I always thought HTML likes to "grow"
    horizontally if it needs
    > to, and
    > that height could be "locked" down fairly easily.
    That's incorrect. Table height is invalid HTML - always has
    been.
    > Secondly, should the merge/split cell feature in
    standard mode be avoided
    > as
    > well?
    Yes, unless it's used very sparingly to accomplish a specific
    task.
    > So finally, is it ever wise to use Rowspan and Colspan?
    I could say no, but there are times were merging adjacent
    cells can be
    useful. However, I generally say this -
    Instead of merging cells horizontally, terminate your table
    and start a new
    one. Instead of splitting cells horizontally/vertically, nest
    a new table
    with the desired structure.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "stickers11" <[email protected]> wrote in
    message
    news:[email protected]...
    > Okay, so I gathered pretty early on that the layout mode
    in Dreamweaver
    > was
    > messy...however I never really understood why.
    > My HTML theory was learned through Dreamweaver not old
    school hard coding.
    > Then I found a nice little posting on the use of Spans:
    >
    http://apptools.com/rants/spans.php
    > I believe this is the major flaw in the use of the
    Layout mode, am I
    > correct
    > in this summation?
    > The poster suggests using nested Tables to securely lock
    down the width
    > and
    > height of your tables/cells.
    > My question is, which poses the greater problems: having
    Rows explode or
    > Columns? I always thought HTML likes to "grow"
    horizontally if it needs
    > to, and
    > that height could be "locked" down fairly easily.
    > Secondly, should the merge/split cell feature in
    standard mode be avoided
    > as
    > well? I gather this introduces the same issues with
    Rowspan and Colspan.
    > So finally, is it ever wise to use Rowspan and Colspan?
    One can overdue it
    > with nested tables as well I imagine?
    >
    >

  • Column header customization using rowspan and colspan

    Hi,
    I want to implement customized column header using rowspan and colspan.
    This can be done in html easily but not sure how I can implement in HTML DB.
    Anybody has idea?
    Thanks in advance,
    <table border="1">
    <!-- begin header -->
    <tr>
    <td rowspan="2">COL1</td>
    <td rowspan="2">COL2</td>
    <td rowspan="2">COL3</td>
    <td colspan="3">COL4</td>
    <td colspan="3">COL5</td>
    </tr>
    <tr>
    <td>COL4-1</td>
    <td>COL4-2</td>
    <td>COL4-3</td>
    <td>COL5-1</td>
    <td>COL5-2</td>
    <td>COL5-3</td>
    </tr>
    <!-- begin data -->
    <tr>
    <td>VALUE1</td>
    <td>VALUE2</td>
    <td>VALUE3</td>
    <td>VALUE4-1</td>
    <td>VALUE4-2</td>
    <td>VALUE4-3</td>
    <td>VALUE5-1</td>
    <td>VALUE5-2</td>
    <td>VALUE5-3</td>
    </tr>
    </table>

    Thanks Raj,
    you'd want to do this kind of formatting from your report template. we have a technote out on report templates at...
    http://www.oracle.com/technology/pub/notes/technote_htmldb_format.html
    ...and, so you know, you'd want to enter your custom col header html into the "Before Rows" field of your template definition screen (kinda like step 8 that's above Figure 5 in the technote).
    hope this helps,
    raj

  • H:panelGrid and h:dataTable remove boundary

    Hi!
    By default h:panelGrid will have boundary and similarly in h:dataTable after every column there is boundary.
    I don't want the boundaries in both the cases, do I need to create custom renderers or is there any attribute that I can set.
    Thanks,

    Add a CSS class to your stylesheet and apply it to your grid panel, modifying the styleClass attribute. For example
    stylesheet.css
    table.border0
        border: 0px;
    }Page1.jsp
    <h:panelGrid styleClass="border0">
    </h:panelGrid>If this does not suffice (because of conflicting css properties, nested elements etc.) you can post the html output of your page or the affected region.

  • How do link form input and a datatable that are on the same page?

    I am real new to JSF, so I'm having the following issue...
    I created a demo app that will pull records from from a database and display them in a datatable. I hava a backingbean for this process that works great with hardcoded data.
    Now, I want to add a form to this page and use the form input to drive the results in the datatable. I have created my form and used a separate backingbean that is essentially a JavaBean for all the form input.
    My question is how do I integrate the submit button from this new form to feed the call that is used for the datatable?
    Here's is a snippet of the pertinent code from the JSP:
    <TABLE border="0">
                   <TBODY>
                        <TR>
                             <TD>
                             <P>Correlation ID:</P>
                             </TD>
                             <TD><h:inputText styleClass="inputText" id="correlationId"
                                  value="#{LogMessageBean.correlationId}"></h:inputText></TD>
                             <TD width="121"></TD>
                             <TD width="153">
                             <P>Workflow ID:</P>
                             </TD>
                             <TD width="158"><h:inputText styleClass="inputText" id="workItemId"
                                  value="#{LogMessageBean.workItemId}"></h:inputText></TD>
                        </TR>
                   </TBODY>
              </TABLE>
              <BR>
              <div align="center">
              <h:commandButton value="Search" actionListener="#{LogValueListHandler.search}" action="#{LogValueListHandler.result}"/>
              <h:commandButton value="Reset" onclick="reset()"/></div>
              <H5>Application Logging Results</H5>
              <t:dataTable value="#{LogValueListHandler.logList}" var="feed"
                   rowClasses="oddrow, evenrow" headerClass="table">
                   <t:column>
                        <f:facet name="header">
                             <h:outputText value="ClassName" />
                        </f:facet>
                        <h:outputText value="#{feed.className}" />
                   </t:column>
                   <t:column>
                        <f:facet name="header">
                             <h:outputText value="MethodName" />
                        </f:facet>
                        <h:outputText value="#{feed.methodName}" />
                   </t:column>
    ...Thanks!

    Locutus_1,
    I'm working on the same sort of app - A data table where the record selected is displayed in a form below the datatable and may be edited and saved.
    I've included a checkbox in the datatable so that the user can indicate which record is to be displayed and edited. The have everything working, except that I cannot get the checkbox click event passed to the backing bean correctly (critical to the entire operation). When I have this working, I'll post the code.
    This solution does not have a direct link between the datatable model and the data handled by the form. The backing bean code does this. If there was a solution where the two could be linked directly via JSF, I'd be very interested in it.
    Werner

  • Specifying rowspan and colspan in XML

    Hi All,
    My aim is to transform a XML file which contains description about input( text, button, checkbox etc) tags, rowspan, colspan, maxfield size etc into HTML tags.
    How should I specify all these attributes rowspan, colspan, maxfield size in XML to transform it into HTML.
    Which parser is going to do all these things?
    Thanks and Regards
    Vinay

    I would suggest using XSLT to transform XML into HTML.

  • Question about jdbc and jsf datatable

    hello
    I was wondering whether it was a correct way :
    -retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.
    or
    Is there any better way I can speed up retrieving data from databse ?
    regards

    orkun wrote:
    I was wondering whether it was a correct way :
    -retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.Your question/problem statement is unclear, but just lookup the DAO pattern.
    Is there any better way I can speed up retrieving data from databse ?Performance is a matter of good code and datamodel and decent hardware.

  • How To Install Invoke-SQLcmd2, Write-DataTable and Out-DataTable

    I found Chad Miller's SQL Server PowerShell scripts Write-DataTable, Out-DataTable and Invoke-SQLcmd2. I can't find any information regarding how to install them though - everywhere I look they're referred to as a script and not a module so add-module wouldn't
    work unless I'm missing something. Is there a module pack containing all three cmdlets available?
    Thanks in advance
    Adam

    $profile
    Will show you the loction
    test-path $profile
    Will give you a true or false if you actually have a file in there
    new-item $profile -itemtype file -force
    if false use the above to create one, from there you can open it up in notepad and edit it to include what you need.
    THIS IS FOR ANYONE IN THE FUTURE WHO COMES A CROSS THIS THREAD AND DOESN'T KNOW HOW TO DO PROFILES
    If this is helpful please mark it so. Also if this solved your problem mark as answer.

  • Po Creation Date and Orader Datate are holding the same values or diffrent?

    Hi All,
    Please clarify on weather the PO Creation_Date at header level and Po Order Date at the Summary level both are having the same data or different.
    Thanks,
    Sathya.

    Sorry, but it's difficult to describe ... I'm not sure if I can recreate this on ApEx-Site, but I take a try.
    Without pagination report is much slower than before.
    The diffrence between the two output version is that the column
    NVL(AVG(preisnext),AVG(preiscurrent)) - NVL(AVG(preiscurrent),AVG(preisnext)) Entwicklung
    is computed as 0 in the using-items-version (wich is not correct).
    I found out that when I replace the NULL-columns in the subquery (NULL preiscurrent // NULL preisnext) with static values (e.g. 0) it works again, but with average function the result is not correct.
    Hoped that someone got this problem, too.
    Just as I thought, I don't get the problem with a simple example version (http://apex.oracle.com/pls/otn/f?p=51163) :-|
    And the strange thing is that it works when I started application for the first time this morning, but after changing Input Values it went wrong. (Meanwhile I logged out and in again to be sure that cache is cleared but no effects).
    Edited by: user11884435 on 10.09.2009 01:31
    Meanwhile I suspect that problem got something to do with source of an item: when it's static it's O.K.; when it's based on a query (SELECT TO_DATE(:P1_DATUM_NEU,'dd.mm.yyyy') - 7 FROM dual;) then it goes wrong ... seems that the subselect returns no rows because of this.
    ...to be continued ;-)
    Edited by: user11884435 on 10.09.2009 02:44

  • Using non-h:dataTable and h:dataTable tags

    I have the following.
    A JSF JSP with h:inputText tags. The tags are bound to properties of my bean (named ProductApprovalBean) which accesses the database. This code works ok.
    I want to add a h:dataTable tag to the same JSF JSP but the combinations I have tried cause runtime errors. Is it possible to mix them? If so, how would you recommend I do it?

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

  • Discoverer and multidimentionnel datat access

    hello
    is there a release of oracle Discoverer release let us accede to multidimensional objects (cube and dimensions : not the relational objects)
    thanks

    Hi Laura,
    you have to register a summary table (view) within Discoverer, so Discoverer could use it, istead of aggregating the data again.
    Hope this helps.... The AWM which will come sometime, will help you to create such summary views, which is a lot of manual work without a program.
    Best Regards,
    Heiko
    PS: Got you the Excel Addin to work?

  • Rowspan in datatable: how?

    Hi all,
    I have a problem displaying my data in a datatable. Actually, I have a list of dates, each with a number of events (in a list that is a class variable of "MyDate" class). I wish to display this datastructure into a database so that the date is in the first column and the event details in the next cols. The event column must however span the number or rows equal to the number of events there are on that day.
    So far I have been unable to do this with a standard component. Is this possible with the default JSF components or what library could I use to realise this?
    Many thanks,
    Steven

    hey,
    i have used the richfaces component
    <%@taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich" %>u can set rowspan and colspan in this component like this ..
    <rich:column id="usernameheader" rowspan="2">
                                    <h:outputText value="User Name" />
                                </rich:column>hope that will help
    Edited by: BirenB on Apr 2, 2008 10:02 PM

  • SelectOneMenu inside h:dataTable gives conversion error

    Hi guys,
    I'm enduring quite alot of misery attempting to put selectOneMenu UI components in my h:dataTable. Due to the 30000 character restriction, I can only submit my view and backing bean and DTO and the converter (even though the total characters of my files is only 26,583? [cat * | wc -c]). Perhaps you can figure out a way I can send me all my files and you'll be able to test it much easier.
    The jist of the problem is that I get a conversion error between the selectOneMenu and the backing DTO of the <h:dataTable>. After I define a converter I get a ClassCastException.
    My BIGGEST question is "Why do I even need a converter?", the selectItem(s)/options are hardcoded label/value Strings and so is the the property of the dataTable row's backing DTO!!!
    Here's the files, any assistance will be greatly appreciated.
    P.S. I'm running JDeveloper 10.1.3.3.
    Thanks.
    (All these files are in the same package so you can just put them all in a directory named "example"):
    My DTO BudgetEquipmentListVO.java:
    package example;
    import java.util.Date;
    import java.util.List;
    public class BudgetEquipmentListVO {
        private Integer rowNo = new Integer("0");               //Row number for paging thru dataTables.
        private String equipmentListId = new String("0");                        //From equipment_list table.
        private Integer equipmentCodeId = new Integer("0");         //From equipment_codes table
        private String objectCode = "0730";                     //So far, 0730,0735 are possible.
        private Integer budgetId = new Integer("0");            //fed_budget_id from fed_budget table.
        private String  description = "";
        private String  equipNo = "";                           //Alphanumeric
        private Date    dateAcquired = new Date();  
        private Integer estimatedCost = new Integer("0");       //Used for Stimulus Application
        private Integer actualCost = new Integer("0");          //Used for EOY expenditures.  Disable for stimulus application
        private String  bldgLocation = "";                      //Address where equipment is at.
        private String  approvedInd = "N";                      //Whether item's been approved or not. Y/N
        private Integer amountApproved = new Integer("0");      //Gets set on approval page.
        private StringBuffer comment = new StringBuffer(4000);  //Currently max 4000 chars
        private String  suppInstInd = "I";            //Support or Instruction item, S or I
        private Integer approvedById = new Integer("0");        //User id of approver.
        private Date    approvedDate = null;                    //Date approved
        private List<BudgetEquipmentListVO> innerList;
        public BudgetEquipmentListVO() {
        public void setObjectCode(String objectCode) {
            this.objectCode = objectCode;
        public String getObjectCode() {
            return objectCode;
        public void setBudgetId(Integer budgetId) {
            this.budgetId = budgetId;
        public Integer getBudgetId() {
            return budgetId;
        public void setDescription(String description) {
            this.description = description;
        public String getDescription() {
            return description;
        public void setEquipNo(String equipNo) {
            this.equipNo = equipNo;
        public String getEquipNo() {
            return equipNo;
        public void setDateAcquired(Date dateAcquired) {
            this.dateAcquired = dateAcquired;
        public Date getDateAcquired() {
            return dateAcquired;
        public void setEstimatedCost(Integer estimatedCost) {
            this.estimatedCost = estimatedCost;
        public Integer getEstimatedCost() {
            return estimatedCost;
        public void setActualCost(Integer actualCost) {
            this.actualCost = actualCost;
        public Integer getActualCost() {
            return actualCost;
        public void setBldgLocation(String bldgLocation) {
            this.bldgLocation = bldgLocation;
        public String getBldgLocation() {
            return bldgLocation;
        public void setApprovedInd(String approvedInd) {
            this.approvedInd = approvedInd;
        public String getApprovedInd() {
            return approvedInd;
        public void setAmountApproved(Integer amountApproved) {
            this.amountApproved = amountApproved;
        public Integer getAmountApproved() {
            return amountApproved;
        public void setComment(StringBuffer comment) {
            this.comment = comment;
        public StringBuffer getComment() {
            return comment;
        public void setSuppInstInd(String suppInstInd) {
            this.suppInstInd = suppInstInd;
        public String getSuppInstInd() {
            return suppInstInd;
        public void setApprovedById(Integer approvedBy) {
            this.approvedById = approvedBy;
        public Integer getApprovedById() {
            return approvedById;
        public void setApprovedDate(Date approvedDate) {
            this.approvedDate = approvedDate;
        public Date getApprovedDate() {
            return approvedDate;
        public void setRowNo(Integer rowNo) {
            this.rowNo = rowNo;
        public Integer getRowNo() {
            return rowNo;
        // Helpers ------------------------------------------------------------------------------------
         // Getters ------------------------------------------------------------------------------------
         public String getKey() {
             return equipmentListId;
         public BudgetEquipmentListVO getValue() {
             return this;
        // This must return true for another Foo object with same key/id.
        public boolean equals(Object other) {
            return other instanceof BudgetEquipmentListVO && equipmentListId != null && equipmentListId.equals(((BudgetEquipmentListVO) other).getEquipmentListId());
        // This must return the same hashcode for every Foo object with the same key.
        public int hashCode() {
            return equipmentListId != null ? this.getClass().hashCode() + equipmentListId.hashCode() : super.hashCode();
        // Override Object#toString() so that it returns a human readable String representation.
        // It is not required by the Converter or so, it just pleases the reading in the logs.
        public String toString() {
            return "BudgetEquipmentListVO[" + equipmentListId.toString() + ", " + equipmentCodeId.toString() + ", " + objectCode + ", " + approvedInd + ", " + suppInstInd + "]";
        public void setEquipmentListId(String equipmentListId) {
            this.equipmentListId = equipmentListId;
        public String getEquipmentListId() {
            return equipmentListId;
        public void setEquipmentCodeId(Integer equipmentCodeId) {
            this.equipmentCodeId = equipmentCodeId;
        public Integer getEquipmentCodeId() {
            return equipmentCodeId;
        public void setInnerList(List<BudgetEquipmentListVO> innerList) {
            this.innerList = innerList;
        public List<BudgetEquipmentListVO> getInnerList() {
            return innerList;
    The View, equipmentList.jspx:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces"
              xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
      <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
                  doctype-system="http://www.w3.org/TR/html4/loose.dtd"
                  doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
      <f:loadBundle basename="myBundle" var="myBundle"/>
        <afh:html>
          <afh:head title="ARRA - Equipment List (0730, 0735)">
            <meta http-equiv="Content-Type"
                  content="text/html; charset=windows-1252"/>
            <link rel="stylesheet" type="text/css" href="/css/crud.css" />
            <script type="text/javascript" src="/js/global.js"></script>
          </afh:head>
          <afh:body>
            <h:form id="equipmentForm">
              <afh:tableLayout width="100%">
                <afh:rowLayout width="100%" halign="center">
                  <afh:cellFormat columnSpan="1" width="100%" halign="center"
                                  rowSpan="1">
                    <h:dataTable value="#{backing_equipmentScreen.dataList}"
                                 binding="#{backing_equipmentScreen.dataTable}"
                                 styleClass="dataTable" rowClasses="rowOdd,rowEven"
                                 var="dataItem" id="table" border="2"
                                 bgcolor="#C2DFFF" width="100%"
                                 rows="#{backing_equipmentScreen.numItems}">
                    <f:facet name="header">
                        <af:outputText value="#{myBundle.headerTable}"
                                       inlineStyle="font-size:small;"/>
                      </f:facet>
                        <h:column>
                            <f:facet name="header">
                                <af:outputText value="#{myBundle.headerColumnRowNumber}"
                                         inlineStyle="font-size:small;"/>
                            </f:facet>
                            <af:outputText value="#{backing_equipmentScreen.dataTable.rowIndex + 1}"
                                       inlineStyle="font-size:small;"/>
                      </h:column>
                      <h:column>
                        <f:facet name="header">
                          <h:panelGroup>
                            <afh:rowLayout>
                              <afh:cellFormat inlineStyle="font-size:small;">
                                <h:outputText value="#{myBundle.headerColumnDesc}"/>
                              </afh:cellFormat>
                            </afh:rowLayout>
                          </h:panelGroup>
                        </f:facet>
                        <h:panelGroup>
                          <afh:rowLayout>
                            <afh:cellFormat inlineStyle="font-size:small;">
                              <h:outputText value="#{dataItem.description}"/>
                            </afh:cellFormat>
                          </afh:rowLayout>
                        </h:panelGroup>
                      </h:column>
                      <h:column>
                        <f:facet name="header">
                          <h:panelGroup>
                            <afh:rowLayout>
                              <afh:cellFormat inlineStyle="font-size:small;">
                                <h:outputText value="#{myBundle.headerColumnEquipNo}"/>
                              </afh:cellFormat>
                            </afh:rowLayout>
                          </h:panelGroup>
                        </f:facet>
                        <h:panelGroup>
                          <afh:rowLayout>
                            <afh:cellFormat inlineStyle="font-size:small;">
                              <h:inputText value="#{dataItem.equipNo}"
                                           />
                            </afh:cellFormat>
                          </afh:rowLayout>
                        </h:panelGroup>
                      </h:column>
                      <h:column>
                        <f:facet name="header">
                          <h:panelGroup>
                            <afh:rowLayout>
                              <afh:cellFormat inlineStyle="font-size:small;">
                                <h:outputText value="#{myBundle.headerColumnDateAcquired}"/>
                              </afh:cellFormat>
                            </afh:rowLayout>
                          </h:panelGroup>
                        </f:facet>
                        <h:panelGroup>
                          <afh:rowLayout>
                            <afh:cellFormat inlineStyle="font-size:small;">
                              <af:selectInputDate value="#{dataItem.dateAcquired}"/>
                            </afh:cellFormat>
                          </afh:rowLayout>
                        </h:panelGroup>
                      </h:column>
                      <h:column>
                        <f:facet name="header">
                          <h:panelGroup>
                            <afh:rowLayout>
                              <afh:cellFormat inlineStyle="font-size:small;">
                                <h:outputText value="#{myBundle.headerColumnObjCode}"/>
                              </afh:cellFormat>
                            </afh:rowLayout>
                          </h:panelGroup>
                        </f:facet>
                        <h:panelGroup>
                          <afh:rowLayout>
                            <afh:cellFormat inlineStyle="font-size:small;">
                              <h:selectOneMenu value="#{dataItem.objectCode}" binding="#{backing_equipmentScreen.objCodeMenu}">
                                <f:selectItem id="item1" itemLabel="0730" itemValue="0730"/>
                                <f:selectItem id="item2" itemLabel="0735" itemValue="0735"/>
                                <f:converter converterId="selectOneMenuConverter"/>
                              </h:selectOneMenu>
                            </afh:cellFormat>
                          </afh:rowLayout>
                        </h:panelGroup>
                      </h:column>
                      <h:column>
                        <f:facet name="header">
                          <h:panelGroup>
                            <afh:rowLayout>
                              <afh:cellFormat inlineStyle="font-size:small;">
                                <h:outputText value="#{myBundle.headerColumnInsSuppInd}"/>
                              </afh:cellFormat>
                            </afh:rowLayout>
                          </h:panelGroup>
                        </f:facet>
                        <h:panelGroup>
                          <afh:rowLayout>
                            <afh:cellFormat inlineStyle="font-size:small;">
                              <h:selectOneMenu value="#{dataItem.suppInstInd}" binding="#{backing_equipmentScreen.suppInstMenu}">>
                                <f:selectItem id="supportitem1" itemLabel="Support" itemValue="S"/>
                                <f:selectItem id="supportitem2" itemLabel="Instruction" itemValue="I"/>
                              </h:selectOneMenu>
                            </afh:cellFormat>
                          </afh:rowLayout>
                        </h:panelGroup>
                      </h:column>
                      <h:column>
                        <f:facet name="header">
                          <h:panelGroup>
                            <afh:rowLayout>
                              <afh:cellFormat inlineStyle="font-size:small;">
                                <h:outputText value="#{myBundle.headerColumnEstCost}"/>
                              </afh:cellFormat>
                            </afh:rowLayout>
                          </h:panelGroup>
                        </f:facet>
                        <h:panelGroup>
                          <afh:rowLayout>
                            <afh:cellFormat inlineStyle="font-size:small;">
                              <h:inputText value="#{dataItem.estimatedCost}">
                              <f:convertNumber
                                                currencySymbol="$"
                                                groupingUsed="#{true}"
                                                maxFractionDigits="0"
                                                type="currency"/>
                              </h:inputText>
                            </afh:cellFormat>
                          </afh:rowLayout>
                        </h:panelGroup>
                      </h:column>
                      <h:column>
                        <f:facet name="header">
                          <h:panelGroup>
                            <afh:rowLayout>
                              <afh:cellFormat inlineStyle="font-size:small;">
                                <h:outputText value="#{myBundle.headerColumnActualCost}"/>
                              </afh:cellFormat>
                            </afh:rowLayout>
                          </h:panelGroup>
                        </f:facet>
                        <h:panelGroup>
                          <afh:rowLayout>
                            <afh:cellFormat inlineStyle="font-size:small;">
                              <h:inputText value="#{dataItem.actualCost}">
                              <f:convertNumber
                                                currencySymbol="$"
                                                groupingUsed="#{true}"
                                                maxFractionDigits="0"
                                                type="currency"/>
                              </h:inputText>
                            </afh:cellFormat>
                          </afh:rowLayout>
                        </h:panelGroup>
                      </h:column>
                      <h:column>
                        <f:facet name="header">
                          <h:panelGroup>
                            <afh:rowLayout>
                              <afh:cellFormat inlineStyle="font-size:small;">
                                <h:outputText value="#{myBundle.headerColumnBldgLoc}"/>
                              </afh:cellFormat>
                            </afh:rowLayout>
                          </h:panelGroup>
                        </f:facet>
                        <h:panelGroup>
                          <afh:rowLayout>
                            <afh:cellFormat inlineStyle="font-size:small;">
                              <h:inputTextarea value="#{dataItem.bldgLocation}"/>
                            </afh:cellFormat>
                          </afh:rowLayout>
                        </h:panelGroup>
                      </h:column>
                      <h:column>
                        <f:facet name="header">
                          <h:panelGroup>
                            <afh:rowLayout>
                              <afh:cellFormat inlineStyle="font-size:small;">
                                <h:outputText value="#{myBundle.headerColumnApprovedInd}"/>
                              </afh:cellFormat>
                            </afh:rowLayout>
                          </h:panelGroup>
                        </f:facet>
                        <h:panelGroup>
                          <afh:rowLayout>
                            <afh:cellFormat inlineStyle="font-size:small;">
                              <h:selectOneMenu value="#{dataItem.approvedInd}" binding="#{backing_equipmentScreen.yesNoMenu}">>
                                <f:selectItem id="yesnoitem1" itemLabel="Yes" itemValue="Y"/>
                                <f:selectItem id="yesnoitem2" itemLabel="No" itemValue="N"/>
                              </h:selectOneMenu>
                            </afh:cellFormat>
                          </afh:rowLayout>
                        </h:panelGroup>
                      </h:column>
                      <h:column>
                        <f:facet name="header">
                          <h:panelGroup>
                            <afh:rowLayout>
                              <afh:cellFormat inlineStyle="font-size:small;">
                                <h:outputText value="#{myBundle.headerColumnComments}"/>
                              </afh:cellFormat>
                            </afh:rowLayout>
                          </h:panelGroup>
                        </f:facet>
                        <h:panelGroup>
                          <afh:rowLayout>
                            <afh:cellFormat inlineStyle="font-size:small;">
                              <h:inputTextarea value="#{dataItem.comment}"/>
                            </afh:cellFormat>
                          </afh:rowLayout>
                        </h:panelGroup>
                      </h:column>
                        <f:facet name="footer">
                            <h:panelGrid columns="4">
                                <h:outputLabel for="rows" value="#{myBundle.labelRowsPage}:" />
                                <h:panelGroup>
                                    <h:inputText id="rows" value="#{backing_equipmentScreen.dataTable.rows}" styleClass="input" size="1"><f:validateLongRange minimum="1" maximum="100" /></h:inputText>
                                    <h:commandButton value="#{myBundle.buttonSet}" action="#{backing_equipmentScreen.pageFirst}" styleClass="input" />
                                </h:panelGroup>
                                <h:outputText value="#{myBundle.labelPaging}:" />
                                <h:panelGroup>
                                    <h:commandButton value="#{myBundle.buttonFirst}" action="#{backing_equipmentScreen.pageFirst}" styleClass="input" disabled="#{backing_equipmentScreen.dataTable.first == 0}" />
                                    <h:commandButton value="#{myBundle.buttonPrevious}" action="#{backing_equipmentScreen.pagePrevious}" styleClass="input" disabled="#{backing_equipmentScreen.dataTable.first == 0}" />
                                    <h:commandButton value="#{myBundle.buttonNext}" action="#{backing_equipmentScreen.pageNext}" styleClass="input" disabled="#{backing_equipmentScreen.dataTable.first + backing_equipmentScreen.dataTable.rows >= backing_equipmentScreen.dataTable.rowCount}" />
                                    <h:commandButton value="#{myBundle.buttonLast}" action="#{backing_equipmentScreen.pageLast}" styleClass="input" disabled="#{backing_equipmentScreen.dataTable.first + backing_equipmentScreen.dataTable.rows >= backing_equipmentScreen.dataTable.rowCount}" />
                                    <h:outputText value="#{myBundle.labelPage}: #{backing_equipmentScreen.currentPage} / #{backing_equipmentScreen.totalPages}" />
                                </h:panelGroup>
                                <h:outputLabel for="add" value="#{myBundle.labelAddRows}:" />
                                <h:panelGroup>
                                    <h:inputText id="add" value="#{backing_equipmentScreen.addCount}" styleClass="input" size="1"><f:validateLongRange minimum="1" maximum="100" /></h:inputText>
                            <af:commandButton action="#{backing_equipmentScreen.actionAdd}"
                                              styleClass="input"
                                              text="#{myBundle.buttonAdd}"/>
                          </h:panelGroup>
                                <h:outputText value="#{myBundle.labelActions}:" />
                                <h:panelGroup>
                                    <h:commandButton value="#{myBundle.buttonSelectAll}" action="#{backing_equipmentScreen.actionSelectAll}" rendered="#{!backing_equipmentScreen.editMode and !backing_equipmentScreen.selectAll}" styleClass="input" />
                                    <h:commandButton value="#{myBundle.buttonUnselectAll}" action="#{backing_equipmentScreen.actionSelectAll}" rendered="#{!backing_equipmentScreen.editMode and backing_equipmentScreen.selectAll}" styleClass="input" />
                                    <h:commandButton value="#{myBundle.buttonEdit}" action="#{backing_equipmentScreen.actionEdit}" rendered="#{!backing_equipmentScreen.editMode}" styleClass="input" />
                                    <h:commandButton value="#{myBundle.buttonDelete}" action="#{backing_equipmentScreen.actionDelete}" rendered="#{!backing_equipmentScreen.editMode}" styleClass="input" />
                                    <h:commandButton id="save" value="#{myBundle.buttonSave}" action="#{backing_equipmentScreen.actionSave}" rendered="#{backing_equipmentScreen.editMode}" styleClass="input" />
                                    <h:commandButton value="#{myBundle.buttonRefresh}" action="#{backing_equipmentScreen.actionRefresh}" immediate="true" styleClass="input" />
                                    <h:commandButton value="#{myBundle.buttonReset}" action="#{backing_equipmentScreen.actionReset}" immediate="true" styleClass="input" />
                                </h:panelGroup>
                            </h:panelGrid>
                        </f:facet>
                    </h:dataTable>
                    <h:panelGroup rendered="#{empty backing_equipmentScreen.dataList and !backing_equipmentScreen.message}">
                        <h:panelGroup rendered="#{!backing_equipmentScreen.searchMode}">
                            <h:outputText value="#{myBundle.textNoData}" />
                            <h:commandButton value="#{myBundle.buttonAdd}" action="#{backing_equipmentScreen.actionAdd}" styleClass="input" />
                        </h:panelGroup>
                        <h:outputText value="#{myBundle.textRefineSearch}" rendered="#{backing_equipmentScreen.searchMode}" />
                    </h:panelGroup>
                    <h:panelGroup rendered="#{backing_equipmentScreen.message}">
                        <h:outputText value="#{myBundle.textErrors}" styleClass="error" />
                        <h:messages styleClass="error" />
                    </h:panelGroup>
                  </afh:cellFormat>
                </afh:rowLayout>
              </afh:tableLayout>
            </h:form>
          </afh:body>
        </afh:html>
      </f:view>
    </jsp:root>

    Hi evryone,
    I have following piece of code
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <af:document>
    <af:messages/>
    <af:form>
    <af:selectOneChoice>
    <f:selectItem itemLabel="ABC" itemValue="ABC"/>
    <f:selectItem itemLabel="DEF" itemValue="DEF"/>
    <f:selectItem itemLabel="GHI" itemValue="GHI"/>
    <f:selectItem itemLabel="JKL" itemValue="JKL"/>
    <f:selectItem itemLabel="MNO" itemValue="MNO"/>
    </af:selectOneChoice>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    When I run this program , I get following compiler error:
    Error(12): Unable to convert constant to type javax.el.ValueExpression for attribute "itemLabel" of tag "selectItem".
    Error(12): Unable to convert constant to type javax.el.ValueExpression for attribute "itemValue" of tag "selectItem".
    Error(13): Unable to convert constant to type javax.el.ValueExpression for attribute "itemLabel" of tag "selectItem".
    Error(13): Unable to convert constant to type javax.el.ValueExpression for attribute "itemValue" of tag "selectItem".
    Error(14): Unable to convert constant to type javax.el.ValueExpression for attribute "itemLabel" of tag "selectItem".
    Error(14): Unable to convert constant to type javax.el.ValueExpression for attribute "itemValue" of tag "selectItem".
    Error(15): Unable to convert constant to type javax.el.ValueExpression for attribute "itemLabel" of tag "selectItem".
    Error(15): Unable to convert constant to type javax.el.ValueExpression for attribute "itemValue" of tag "selectItem".
    Error(16): Unable to convert constant to type javax.el.ValueExpression for attribute "itemLabel" of tag "selectItem".
    Error(16): Unable to convert constant to type javax.el.ValueExpression for attribute "itemValue" of tag "selectItem".
    Anyone has any ideas? Where could be problem?

  • Can h:dataTable be used for editable tables?

    I am trying to use a dataTable to manage an editable list of named "parts". I have declared a
    request-scope managed bean called "myForm" in faces-config.xml, and my dataTable declaration looks as follows:
    <h:dataTable value="#{myForm.parts}" var="part">
        <h:column>
          <f:facet name="header">
            <h:outputText value="Name"/>
          </f:facet>
          <h:inputText value="Header"/>
        </h:column>
        <h:column id="actionColumn">
          <f:facet name="header">
            <h:outputText value="Action"/>
          </f:facet>
          <h:commandButton id="delete" immediate="true"
                       action="#{myForm.deletePart}"
                        value="Delete"/>
        </h:column>
      </h:dataTable>
    [!code]
    The problem I am having is that when I click any of the Delete buttons in the table, something fairly early
    on in the JSF lifecycle decides that there is a problem with the submitted content, and simply redisplays
    the page without my "deletePart" method being called. I put some debug statements in my myForm bean,
    and I noticed that a new  myForm instance is constructed, but there is no call to its setParts method, to
    initialize the parts list within the newly-created instance with the content of the inputText boxes.
    I can't decide whether this just doesn't work, or whether I have missed something. Any help would be
    appreciated.

    Thanks for your quick reply, but unfortunately your suggestion did not fix my problem.
    I have been doing some hacking (which, sadly, is often the only way to fix problems in JSF) and what I have discovered is that if I add code to the MyForm constructor to initialize its "parts" member variable to an array of empty "part" objects, then everything works and the deletePart method is called on the MyForm instance as I would have expected.
    For example, I tried this hack:
    public class MyForm { 
      Part[] _parts; 
      public MyForm() {   
        _parts = new Part[1]; // kludge here, because there is only one item in the list for my test case   
        _parts[0] = new Part(); 
      public Part[]getParts() {   
        return _parts;
      public void setParts(Part[] parts) { 
        _parts = parts; 
    }I figure that either the JSF code is not finding the method it is expecting to create the array, or that funtionality is simply missing. I would like to figure out which is the case.
    Note that this hack requires me to figure out how many parts there were in the last list I displayed, which may be tricky.
    The interesting part is that the JSF code updates the empty parts with the content the user provides in the input boxes, but just doesn't seem to want to create the array itself.
    If I can't get top the bottom of this, I may need to switch over to the MyFaces JSF implementation, because at least then I could look at the source and figure out what is going on.
    Any further insights would be appreciated.

Maybe you are looking for