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.
Re: Sub columns in datatable
You can do it by using datatable inside a datatable. So basically inside second column there will be datatable and you have to change value to the datatable accordingly. [EMAIL PROTECTED] wrote: 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. Best Regards, Pallavi 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
RE: Re: Sub columns in datatable
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: users@myfaces.apache.org 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
RE: Re: Sub columns in datatable
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); } 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 otherwise you will not have a reference to the current row... On 2/27/07, [EMAIL PROTECTED] <[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. 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: users@myfaces.apache.org 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
Re: Re: Sub columns in datatable
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); } 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 otherwise you will not have a reference to the current row... On 2/27/07, [EMAIL PROTECTED] <[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. > > > >var="subBean" rows="2" rowClasses="row,row_alt" width="100%" > cellspacing="0" styleClass="dataTable" headerClass="headerClass"> > > > > > > > > > > > > > var="demoBean" rows="2" rowClasses="row,row_alt" > cellspacing="0" styleClass="dataTable" headerClass="headerClass"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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]> 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: users@myfaces.apache.org > > 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 > > address
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); > > } > > > > > > > var="demoBean" rows="2" cellspacing="0" styleClass="dataTable" > columnClasses="firstColumn,secondColumn,thirdColumn"> > > > > > > > > > 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 > >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]> 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. > > > > > > > > > var="subBean" rows="2" rowClasses="row,row_alt" width="100%" > > cellspacing="0" styleClass="dataTable" > > headerClass="headerClass"> > > > > > > > > > > > > > > > > > > > > > > > > > >>var="demoBean" rows="2" rowClasses="row,row_alt" > > cellspacing="0" styleClass="dataTable" > > headerClass="headerClass"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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]> wrote: > > > > > > > > > H
RE: Re: Sub columns in datatable
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 . 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: 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); } 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 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 anot
Re: [Solved] Re: Sub columns in datatable
Hi Martin/Mike, I got my mistake. Now i am able to retrieve the values correctly from the bean. would avoid using consecutive capital letters in attribute name. But could you help me achieve column spans in header columns. I have this code in my jsp if you notice the col2 header sub headers(first Name,Middle Name,Last Name) it does not recognize it at all. But as you can see in the uploaded image i am getting this: Jsp code is for col2 for header "Names": Best Regards, Pallavi Martin Marinschek wrote: > > 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); >> > >> > } >> > >> > >> > >> > >> > >> > >> > > > var="demoBean" rows="2" cellspacing="0" styleClass="dataTable" >> > columnClasses="firstColumn,secondColumn,thirdColumn"> >> > >> > >> > >> > >> > >> > >> > >> > >> > 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 >> > >> >> >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]> 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. >> > > >> > > >> > > >> > > &