Hi Martin/Mike,
 
I think i could not upload the image file.
This is how my table should look like:
How can i acheive it.
I have tried nesting tables but all my attempts are in vain.
In which build of tomahawk can i see "headercolspan" in <t:column>.
Do we have anything in tomahawk for colspan and rowspan as in HTML
tables.
Would appreciate any help.
 
 
--------------+----------------------------------------+----------------
----
|   SSN   |               Names                |  Profession  |
              +++++++++++++++++++++
|             |   FN       |    MN     |     LN  |                     |
--------------+-------------+-------------+---------+-------------------
--
|    10      |   A        |     B       |     C    |     Engg         |
--------------+------------+-------------+----------+-------------------
-
|    20      |   E        |     F        |    G    |     Doc           |
------------------------------------------------------------------------
------
 
The below code down not help me acheive this:
 
<t:column id="col2">
  <f:facet name="header">
     <h:outputText value="Names" />
  </f:facet>
      <t:column id="d1">
        <f:facet name="header">
            <h:outputText value="First Name"/>
         </f:facet>
         <h:outputText value="#{subBean.firstData}" />
    </t:column>
 
    <t:column id="d2">
      <f:facet name="header">
            <h:outputText value="Middle Name"/>
         </f:facet>
      <h:outputText value="#{subBean.middleData}" />
     </t:column>
 
     <t:column id="d3">
      <f:facet name="header">
            <h:outputText value="Last Name"/>
          </f:facet>
     <h:outputText value="#{subBean.lastData}" />
     </t:column>
     
</t:column>
   
 
Best Regards,
Pallavi 

________________________________

From: Martin Marinschek [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 28, 2007 8:58 PM
To: MyFaces Discussion
Subject: Re: Re: Sub columns in datatable


myBean.setFName() and myBean.getFName() in the source

would mean:

#{myBean.FName}

in the JSP

regards,

Martin


On 2/28/07, Mike Kienenberger <[EMAIL PROTECTED]> wrote: 

        Two possibilities that I know of:
        
        1 - you didn't provide the correct getter accessor. (public,
correct type, etc)
        2 - you didn't name the getter correctly.   This is probably the
issue since your code below has "FName" but your error message has
"fName".   I'd recommend avoiding names starting with consecutive
capital letters unless you have a good understanding of bean property
naming conventions. 
        
        
        
        On 2/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


                Hi All,
                 
                I am getting this exception when i try nesting my
dataTable:
                I am unable to read Names from the bean.
                Could you let me know why i am getting this exception.
                How can i include sub headers in my nested datatable.
                 
                
                javax.faces.el.PropertyNotFoundException
                : Error getting property 'fName' from bean of type
rich.poor.NamesVO
                This is my data  model:

                public class SubDataBean {

                int ssn;
                String profession;
                List myNames;

                }

                public class NamesVO {
                 
                 String fName;
                 String mName;
                 String lName;
                 }
                

                In my manage bean i am populationg the datalist in the
following manner:
                public void populateData(){
                   
                   SubDataBean b1 = new SubDataBean();
                   NamesVO t1 = new NamesVO();
                   List x1 = new ArrayList();
                   b1.setSsn(10);
                   t1.setFName("Pabitra");
                   t1.setMName("Kumar");
                   t1.setLName("Roy");
                   x1.add(t1);
                   b1.setMyNames(x1);
                   b1.setProfession("Mechanical Engineer");
                   
                   dataList.add(b1);
                

                

                }

                

                

                <t:column id="col2">
                <f:facet name="header">
                <h:outputText value="Names" />
                </f:facet>

                <t:dataTable id="insideCol" value="#{subBean.myNames}"
                var="demoBean" rows="2" cellspacing="0"
styleClass="dataTable"
                columnClasses="firstColumn,secondColumn,thirdColumn">

                
                <t:column id="c1">
                <h:outputText value="#{demoBean.fName}" />
                </t:column>
                

                ........ 

                
                Best Regards,

                Pallavi 

________________________________

                From: Werner Punz [mailto:[EMAIL PROTECTED] 
                Sent: Tuesday, February 27, 2007 5:48 PM
                To: Pallavi Roy(WT01 - HLS)
                Subject: Re: Re: Sub columns in datatable
                
                
                   <t:dataTable id="insideCol" value="#{subBean
.dataList}" 
                       var="demoBean" rows="2" rowClasses="row,row_alt" 
                      cellspacing="0" styleClass="dataTable"
headerClass="headerClass">
                
                otherwise you will not have a reference to the current
row...
                
                
                On 2/27/07, [EMAIL PROTECTED] <
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: 

                        Hi Werner,
                         
                        I have implemented in the follwoing way but my
page is not getting rendered.
                        I have nested another dataTable in the second
column. 
                         
                        Could you let me know my mistake.
                         
                        <f:view>
                         <h:form id="mySub">
                         <t:dataTable id="subColumn"
value="#{my_SubManageBean.dataList}" 
                             var="subBean" rows="2"
rowClasses="row,row_alt" width="100%"
                              cellspacing="0" styleClass="dataTable"
headerClass="headerClass">
                          
                          <t:column id="col1">
                            <f:facet name="header">
                               <h:outputText value="SSN" />
                            </f:facet>
                               <h:outputText value="#{subBean.ssn}" />
                           </t:column>
                            
                           <t:column id="col2">
                            <f:facet name="header">
                               <h:outputText value="Names" />
                            </f:facet>
                              <t:dataTable id="insideCol"
value="#{my_SubManageBean.dataList}" 
                               var="demoBean" rows="2"
rowClasses="row,row_alt" 
                              cellspacing="0" styleClass="dataTable"
headerClass="headerClass">
                                   
                              <t:column id="c1">
                              <f:facet name="header">
                               <h:outputText value="First Name" />
                              </f:facet>
                               <h:outputText value="#{demoBean.fName}"
/>
                              </t:column>
                              
                              <t:column id="c2">
                              <f:facet name="header">
                               <h:outputText value="Middle Name" />
                              </f:facet>
                               <h:outputText value="#{demoBean.mName}"
/>
                              </t:column>
                              
                              <t:column id="c3">
                              <f:facet name="header">
                               <h:outputText value="Last Name" />
                              </f:facet>
                               <h:outputText value="#{demoBean.lName}"
/>
                              </t:column>
                              </t:dataTable>      
                               
                           </t:column>
                           
                           <t:column id="col3">
                            <f:facet name="header">
                               <h:outputText value="Profession" />
                            </f:facet>
                               <h:outputText
value="#{subBean.profession}" />
                           </t:column>
                             
                          </t:dataTable>
                         </h:form>
                        </f:view>
                        
                         
                        Best Regards,
                        Pallavi 

________________________________

                        From: Werner Punz [mailto:[EMAIL PROTECTED]

                        Sent: Tuesday, February 27, 2007 4:06 PM
                        To: Pallavi Roy(WT01 - HLS)
                        Subject: Re: Re: Sub columns in datatable
                        
                        
                        
                        not yet since i am not at home, but here is how
you do it
                        in a datatable you have a var which you use to
display your data in the table columns
                        oc
                        you just have to push this var into a nested
column datalist or datatable 
                        and process it like you would a standalone table

                        
                        
                        
                        
                        On 2/27/07, [EMAIL PROTECTED] <
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: 


                                Hi Werner,
                                
                                Do you have any code snippet as to how
can I add my sub headers using 
                                dataList to t:dataTable.
                                How would the data model be affected....
                                
                                Class SubDataBean{
                                
                                int ssn;
                                String fName;
                                String mName;
                                String lName;
                                String profession;
                                }
                                
                                Best Regards,
                                Pallavi 
                                
                                -----Original Message-----
                                From: news [mailto:[EMAIL PROTECTED]
On Behalf Of Werner Punz
                                Sent: Monday, February 26, 2007 6:04 PM
                                To: [email protected]
                                Subject: Re: Sub columns in datatable
                                
                                [EMAIL PROTECTED] schrieb:
                                > Hi all,
                                >
                                > How to include sub columns in
datatable. 
                                > It has three columns
Ssn,Names,profession.
                                > As illustrated in the fig below for
Names (first names,middle
                                > names,last names).
                                > How to get the sub columns in the
datatable.
                                
                                Try to nest a datalist into the colum of
your table this should be 
                                possible.
                                
                                
                                The information contained in this
electronic message and any attachments to this message are intended for
the exclusive use of the addressee(s) and may contain proprietary,
confidential or privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately and destroy all copies of this
message and any attachments.   WARNING: Computer viruses can be
transmitted via email. The recipient should check this email and any
attachments for the presence of viruses. The company accepts no
liability for any damage caused by any virus transmitted by this email.
www.wipro.com
                                


                        
                        
The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. WARNING:
Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus
transmitted by this email. www.wipro.com 
        

                
                

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com
        





-- 

http://www.irian.at

Your JSF powerhouse - 
JSF Consulting, Development and 
Courses in English and German

Professional Support for Apache MyFaces 



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com

Reply via email to