You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Arunagiri Kaliappan <ar...@viterra.ca> on 2012/01/03 15:01:59 UTC
Clarification needed for Tomahawk datatable tag
Hi,
In our project (Portal application with JSF 1.1) , we are in need of showing the
columns vertically and also the number of columns is dynamic in nature.
We are using Apache MyFaces Tomahawk library for the above mentioned
requirement.
We have used <t:datatable> and <t:columns> tags. We have used the same datamodel
(list datamodel which is made up of ArrayList which in turn contains objects)
for both datatable and columns tags value attribute. But, the columns are
displayed correctly only when the number of columns is 3 and above. For the
columns below 3, the display is not proper.
Can you please suggest as how to proceed further?
Please do the needful.
Thanks & Regards,
Arunagiri K
Arunagiri Kaliappan
Chennai
Mailto:arunagiri.kaliappan@viterra.ca
www.viterra.ca
This e-mail and any attachment(s) are confidential and may be privileged.
If you are not the intended recipient please notify me immediately by return
e-mail, delete this e-mail and do not copy, use or disclose it.
Re: Clarification needed for Tomahawk datatable tag
Posted by Mike Kienenberger <mk...@gmail.com>.
I think we're going to have to see your actual page code to help any
further.
On Wed, Jan 4, 2012 at 1:01 PM, Aramudhan Divakaran <
aramudhan.divakaran@viterra.ca> wrote:
> Hi Mike,
>
> The output format is same for less than 3 and greater than 4.
>
> When we add test1, test2 and test3 values the data are not in the proper
> format. After adding test4 the formatting looks fine.
>
> Output will looks like below, the added values should display vertically.
>
> Label 1 Test1 Test2 Test3 Test4 ............
> Label 2 OutputvalueLab2 OutputvalueLab2 OutputvalueLab2 OutputvalueLab2
> ...........
> Label 3 OutputvalueLab3 OutputvalueLab3 OutputvalueLab3 OutputvalueLab3
> ...........
> Label 4 OutputvalueLab4 OutputvalueLab4 OutputvalueLab4 OutputvalueLab4
> ...........
> Label 5 OutputvalueLab5 OutputvalueLab5 OutputvalueLab5 OutputvalueLab5
> ...........
>
>
>
> Thanks & Regards,
> Aramudhan.D
>
>
> Aramudhan Divakaran
>
> Chennai
>
> Mailto:aramudhan.divakaran@viterra.ca
>
> www.viterra.ca
>
>
> This e-mail and any attachment(s) are confidential and may be privileged.
> If you are not the intended recipient please notify me immediately by
> return
> e-mail, delete this e-mail and do not copy, use or disclose it.
>
> [image: Inactive hide details for Mike Kienenberger <mk...@gmail.com>]Mike
> Kienenberger <mk...@gmail.com>
>
>
>
> *Mike Kienenberger <mk...@gmail.com>*
>
> 01/04/2012 11:07 PM
> Please respond to
> MyFaces Discussion <us...@myfaces.apache.org>
>
>
>
> To
>
> MyFaces Discussion <us...@myfaces.apache.org>
> cc
>
> Arunagiri Kaliappan <ar...@viterra.ca>
> Subject
>
> Re: Clarification needed for Tomahawk datatable tag
> Can you describe how the output is different when the number is greater
> than 3 and when the number is less than 4?
>
> On Tue, Jan 3, 2012 at 9:01 AM, Arunagiri Kaliappan <
> arunagiri.kaliappan@viterra.ca> wrote:
>
> > Hi,
> >
> > In our project (Portal application with JSF 1.1) , we are in need of
> > showing the columns vertically and also the number of columns is dynamic
> in
> > nature.
> > We are using *Apache MyFaces Tomahawk* library for the above mentioned
> > requirement.
> >
> > We have used *<t:datatable>* and *<t:columns>* tags. We have used the
>
> > same datamodel (list datamodel which is made up of ArrayList which in
> turn
> > contains objects) for both datatable and columns tags value attribute.
> But,
> > the columns are displayed correctly only when the *number of columns is 3
> > and above*. For the columns below 3, the display is not proper.
>
> >
> > Can you please suggest as how to proceed further?
> >
> > Please do the needful.
> >
> > Thanks & Regards,
> > Arunagiri K
> >
> >
> >
> > Arunagiri Kaliappan
> >
> > Chennai
> >
> >
> Mailto:arunagiri.kaliappan@viterra.ca
> > www.viterra.ca
> >
> >
>
> > This e-mail and any attachment(s) are confidential and may be privileged.
> > If you are not the intended recipient please notify me immediately by
> > return
> > e-mail, delete this e-mail and do not copy, use or disclose it.
> >
> >
>
>
Re: Clarification needed for Tomahawk datatable tag
Posted by Mike Kienenberger <mk...@gmail.com>.
You're welcome.
Using the panelGrid columns="1" suggestion would probably do the same thing.
On Fri, Jan 6, 2012 at 4:21 AM, Arunagiri Kaliappan <
arunagiri.kaliappan@viterra.ca> wrote:
> Hi Mike,
>
> Thanks for your suggestion.
> The problem got resolved by butting <f:verbatim><br></f:verbatim> between
> every display of components inside <t:columns>
>
> For example:
>
> <t:columns value="#{pc_TestNewView.orderListData}" var=*"column"*>
> <h:inputText value="#{row.orderNo}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> <f:verbatim><br></f:verbatim>
>
> <h:inputText value="#{row.productName}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> <f:verbatim><br></f:verbatim>
>
> <h:inputText value="#{row.price}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> <f:verbatim><br></f:verbatim>
>
> <h:inputText value="#{row.qty}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> </t:columns>
>
> Thanks & Regards,
> Arunagiri K
>
>
>
>
> Arunagiri Kaliappan
>
> Chennai
>
> Mailto:arunagiri.kaliappan@viterra.ca
> www.viterra.ca
>
>
> This e-mail and any attachment(s) are confidential and may be privileged.
> If you are not the intended recipient please notify me immediately by
> return
> e-mail, delete this e-mail and do not copy, use or disclose it.
>
> [image: Inactive hide details for Mike Kienenberger <mk...@gmail.com>]Mike
> Kienenberger <mk...@gmail.com>
>
>
>
> *Mike Kienenberger <mk...@gmail.com>*
>
> 01/05/2012 11:35 AM
>
>
> To
>
> Arunagiri Kaliappan <ar...@viterra.ca>
> cc
>
> MyFaces Discussion <us...@myfaces.apache.org>
> Subject
>
> Re: Clarification needed for Tomahawk datatable tag
> I'm not an expert, but I suspect this may just be due to newspaperColumns
> or standard html wrapping. You might try looking at the raw html for the
> generated table source for the 1,2, 3 item cases and see if there's some
> pattern in there.
>
> A couple of other things to try:
>
> See what happens if you get rid of newspaperColumns (or use a constant
> value).
>
> See what happens if you put your t:column data inside of an h:panelGrid
> columns="1" component.
>
>
> On Thu, Jan 5, 2012 at 7:37 AM, Arunagiri Kaliappan <*
> arunagiri.kaliappan@viterra.ca* <ar...@viterra.ca>> wrote:
>
> Hi,
>
> Further to the below mail related to our application(JSF Portlet
> application), following are the required details:
> *
> JSP file:*
> <t:dataTable id=*"data"* styleClass=*"standardTable"*
> headerClass=*"standardTable_Header"*
> footerClass=*"standardTable_Header"*
> rowClasses=*"standardTable_Row1,standardTable_Row2"*
> columnClasses=*"standardTable_Column"* var=*"row"*
> value="#{pc_TestNewView.orderListData}" preserveDataModel=*"false"*
> newspaperColumns="#{pc_TestNewView.orderListSize}">
>
> <t:columns value="#{pc_TestNewView.orderListData}" var=*"column"*>
> <h:inputText value="#{row.orderNo}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> <h:inputText value="#{row.productName}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> <h:inputText value="#{row.price}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> <h:inputText value="#{row.qty}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> </t:columns>
> </t:dataTable>
>
> In the above JSP file, we are iterating the list of objects of type
> "Order" in our example.
>
> *
> Java file (Backing bean):*
> *
> private* DataModel orderDataModel;*
> private* *static* *final* ArrayList<Order> *orderList* = *new*ArrayList<Order>(Arrays.
> *asList*(
> *
> new* Order("A001", "Intel CPU", *new* BigDecimal("700.00"), *new*BigDecimal(1)),
> *
> new* Order("A002", "Harddisk 10TB", *new* BigDecimal("500.00"), *new*BigDecimal(2)),
> *
> new* Order("A003", "Dell Laptop", *new* BigDecimal("11600.00"), *new*BigDecimal(8)),
> *
> new* Order("A004", "Samsung LCD", *new* BigDecimal("5200.00"), *new*BigDecimal(3)),
> *
> new* Order("A005", "A4Tech Mouse", *new* BigDecimal("100.00"), *new*BigDecimal(10))));
> *
> public* DataModel getOrderListData() {*
> if*(*null* == orderDataModel) {
> orderDataModel = *new* ListDataModel(getOrders());
> }*
> return* orderDataModel;
> }
> *
> private* List<Order> getOrders() {*
> return* *orderList*;
> }
> *
> public* *int* getOrderListSize() {*
> return* *orderList*.size();
> }
> *
> Details:*
> In the above backing bean .java file, we have populated the
> listdatamodel with the help of the arraylist(orderlist) as hardcoded above.
> Please note that we have used 5 items in a list.
>
> Also, we have tested with one, two and three items in a list. We have
> attached the respective screenshots for your reference.
>
>
>
> Please do the needful.
>
> Thanks & Regards,
> Arunagiri K
>
>
> *(See attached file: Data table with 1 list item.gif)(See attached
> file: Data table with 2 list items.gif)(See attached file: Data table with
> 3 list items.gif)(See attached file: Data table with 5 list items.gif)*
>
>
>
>
> Arunagiri Kaliappan
>
> Chennai
> *
> **Mailto:arunagiri.kaliappan@viterra.ca*<Ma...@viterra.ca>
> *
> **www.viterra.ca* <http://www.viterra.ca/>
>
>
> This e-mail and any attachment(s) are confidential and may be
> privileged.
> If you are not the intended recipient please notify me immediately by
> return
> e-mail, delete this e-mail and do not copy, use or disclose it.
>
> Mike Kienenberger <*mkienenb@gmail.com* <mk...@gmail.com>>
>
>
>
>
> *Mike Kienenberger <**mkienenb@gmail.com* <mk...@gmail.com>*>*
>
> 01/04/2012 11:37 AM
>
> To
>
> MyFaces Discussion <*users@myfaces.apache.org* <us...@myfaces.apache.org>>
> cc
>
> Arunagiri Kaliappan <*a...@viterra.ca>
> >
> Subject
>
> Re: Clarification needed for Tomahawk datatable tag
>
> Can you describe how the output is different when the number is
> greater than 3 and when the number is less than 4?
>
> On Tue, Jan 3, 2012 at 9:01 AM, Arunagiri Kaliappan <*
> arunagiri.kaliappan@viterra.ca* <ar...@viterra.ca>>
> wrote:
> Hi,
>
> In our project (Portal application with JSF 1.1) , we are in
> need of showing the columns vertically and also the number of columns is
> dynamic in nature.
> We are using *Apache MyFaces Tomahawk* library for the above
> mentioned requirement.
>
> We have used *<t:datatable>* and *<t:columns>* tags. We have
> used the same datamodel (list datamodel which is made up of ArrayList which
> in turn contains objects) for both datatable and columns tags value
> attribute. But, the columns are displayed correctly only when the
> *number of columns is 3 and above*. For the columns below 3, the
> display is not proper.
>
> Can you please suggest as how to proceed further?
>
> Please do the needful.
>
> Thanks & Regards,
> Arunagiri K
>
>
>
> Arunagiri Kaliappan
>
> Chennai*
> **
> **Mailto:arunagiri.kaliappan@viterra.ca*<Ma...@viterra.ca>
> *
> **www.viterra.ca* <http://www.viterra.ca/>
>
>
> This e-mail and any attachment(s) are confidential and may be
> privileged.
> If you are not the intended recipient please notify me
> immediately by return
> e-mail, delete this e-mail and do not copy, use or disclose it.
>
>
>
Re: Clarification needed for Tomahawk datatable tag
Posted by Arunagiri Kaliappan <ar...@viterra.ca>.
Hi Mike,
Thanks for your suggestion.
The problem got resolved by butting <f:verbatim><br></f:verbatim> between every
display of components inside <t:columns>
For example:
<t:columns value="#{pc_TestNewView.orderListData}" var="column">
<h:inputText value="#{row.orderNo}" rendered="#{row.orderNo eq
column.orderNo}"/>
<f:verbatim><br></f:verbatim>
<h:inputText value="#{row.productName}" rendered="#{row.orderNo eq
column.orderNo}"/>
<f:verbatim><br></f:verbatim>
<h:inputText value="#{row.price}" rendered="#{row.orderNo eq column.orderNo}"
/>
<f:verbatim><br></f:verbatim>
<h:inputText value="#{row.qty}" rendered="#{row.orderNo eq column.orderNo}"/>
</t:columns>
Thanks & Regards,
Arunagiri K
Arunagiri Kaliappan
Chennai
Mailto:arunagiri.kaliappan@viterra.ca
www.viterra.ca
This e-mail and any attachment(s) are confidential and may be privileged.
If you are not the intended recipient please notify me immediately by return
e-mail, delete this e-mail and do not copy, use or disclose it.
Mike Kienenberger
<mkienenb@gmail.com
> To
Arunagiri Kaliappan
01/05/2012 11:35 AM <ar...@viterra.ca>
cc
MyFaces Discussion
<us...@myfaces.apache.org>
Subject
Re: Clarification needed for Tomahawk
datatable tag
I'm not an expert, but I suspect this may just be due to newspaperColumns or
standard html wrapping. You might try looking at the raw html for the
generated table source for the 1,2, 3 item cases and see if there's some pattern
in there.
A couple of other things to try:
See what happens if you get rid of newspaperColumns (or use a constant value).
See what happens if you put your t:column data inside of an h:panelGrid
columns="1" component.
On Thu, Jan 5, 2012 at 7:37 AM, Arunagiri Kaliappan <
arunagiri.kaliappan@viterra.ca> wrote:
Hi,
Further to the below mail related to our application(JSF Portlet application),
following are the required details:
JSP file:
<t:dataTable id="data" styleClass="standardTable"
headerClass="standardTable_Header"
footerClass="standardTable_Header"
rowClasses="standardTable_Row1,standardTable_Row2"
columnClasses="standardTable_Column" var="row"
value="#{pc_TestNewView.orderListData}" preserveDataModel="false"
newspaperColumns="#{pc_TestNewView.orderListSize}">
<t:columns value="#{pc_TestNewView.orderListData}" var="column">
<h:inputText value="#{row.orderNo}" rendered="#{row.orderNo eq
column.orderNo}"/>
<h:inputText value="#{row.productName}" rendered="#{row.orderNo eq
column.orderNo}"/>
<h:inputText value="#{row.price}" rendered="#{row.orderNo eq column.orderNo}"
/>
<h:inputText value="#{row.qty}" rendered="#{row.orderNo eq column.orderNo}"/>
</t:columns>
</t:dataTable>
In the above JSP file, we are iterating the list of objects of type "Order" in
our example.
Java file (Backing bean):
private DataModel orderDataModel;
private static final ArrayList<Order> orderList = new ArrayList<Order>(Arrays.
asList(
new Order("A001", "Intel CPU", new BigDecimal("700.00"), new BigDecimal(1)),
new Order("A002", "Harddisk 10TB", new BigDecimal("500.00"), new BigDecimal
(2)),
new Order("A003", "Dell Laptop", new BigDecimal("11600.00"), new BigDecimal
(8)),
new Order("A004", "Samsung LCD", new BigDecimal("5200.00"), new BigDecimal
(3)),
new Order("A005", "A4Tech Mouse", new BigDecimal("100.00"), new BigDecimal
(10))));
public DataModel getOrderListData() {
if(null == orderDataModel) {
orderDataModel = new ListDataModel(getOrders());
}
return orderDataModel;
}
private List<Order> getOrders() {
return orderList;
}
public int getOrderListSize() {
return orderList.size();
}
Details:
In the above backing bean .java file, we have populated the listdatamodel with
the help of the arraylist(orderlist) as hardcoded above. Please note that we
have used 5 items in a list.
Also, we have tested with one, two and three items in a list. We have attached
the respective screenshots for your reference.
Please do the needful.
Thanks & Regards,
Arunagiri K
(See attached file: Data table with 1 list item.gif)(See attached file: Data
table with 2 list items.gif)(See attached file: Data table with 3 list
items.gif)(See attached file: Data table with 5 list items.gif)
Arunagiri Kaliappan
Chennai
Mailto:arunagiri.kaliappan@viterra.ca
www.viterra.ca
This e-mail and any attachment(s) are confidential and may be privileged.
If you are not the intended recipient please notify me immediately by return
e-mail, delete this e-mail and do not copy, use or disclose it.
Inactive hide details for Mike Kienenberger <mk...@gmail.com>Mike
Kienenberger <mk...@gmail.com>
Mike Kienenberger <
mkienenb@gmail.com>
01/04/2012 11:37 AM To
MyFaces Discussion <
users@myfaces.apache.org>
cc
Arunagiri Kaliappan <
arunagiri.kaliappan@viterr
a.ca>
Subject
Re: Clarification needed
for Tomahawk datatable tag
Can you describe how the output is different when the number is greater than 3
and when the number is less than 4?
On Tue, Jan 3, 2012 at 9:01 AM, Arunagiri Kaliappan <
arunagiri.kaliappan@viterra.ca> wrote:
Hi,
In our project (Portal application with JSF 1.1) , we are in need of
showing the columns vertically and also the number of columns is dynamic
in nature.
We are using Apache MyFaces Tomahawk library for the above mentioned
requirement.
We have used <t:datatable> and <t:columns> tags. We have used the same
datamodel (list datamodel which is made up of ArrayList which in turn
contains objects) for both datatable and columns tags value attribute.
But, the columns are displayed correctly only when the number of columns
is 3 and above. For the columns below 3, the display is not proper.
Can you please suggest as how to proceed further?
Please do the needful.
Thanks & Regards,
Arunagiri K
Arunagiri Kaliappan
Chennai
Mailto:arunagiri.kaliappan@viterra.ca
www.viterra.ca
This e-mail and any attachment(s) are confidential and may be
privileged.
If you are not the intended recipient please notify me immediately by
return
e-mail, delete this e-mail and do not copy, use or disclose it.
Re: Clarification needed for Tomahawk datatable tag
Posted by Mike Kienenberger <mk...@gmail.com>.
I'm not an expert, but I suspect this may just be due to newspaperColumns
or standard html wrapping. You might try looking at the raw html for the
generated table source for the 1,2, 3 item cases and see if there's some
pattern in there.
A couple of other things to try:
See what happens if you get rid of newspaperColumns (or use a constant
value).
See what happens if you put your t:column data inside of an h:panelGrid
columns="1" component.
On Thu, Jan 5, 2012 at 7:37 AM, Arunagiri Kaliappan <
arunagiri.kaliappan@viterra.ca> wrote:
> Hi,
>
> Further to the below mail related to our application(JSF Portlet
> application), following are the required details:
>
> *JSP file:*
> <t:dataTable id=*"data"* styleClass=*"standardTable"*
> headerClass=*"standardTable_Header"*
> footerClass=*"standardTable_Header"*
> rowClasses=*"standardTable_Row1,standardTable_Row2"*
> columnClasses=*"standardTable_Column"* var=*"row"*
> value="#{pc_TestNewView.orderListData}" preserveDataModel=*"false"*
> newspaperColumns="#{pc_TestNewView.orderListSize}">
>
> <t:columns value="#{pc_TestNewView.orderListData}" var=*"column"*>
> <h:inputText value="#{row.orderNo}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> <h:inputText value="#{row.productName}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> <h:inputText value="#{row.price}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> <h:inputText value="#{row.qty}" rendered="#{row.orderNo eq
> column.orderNo}"/>
> </t:columns>
> </t:dataTable>
>
> In the above JSP file, we are iterating the list of objects of type
> "Order" in our example.
>
>
> *Java file (Backing bean):*
>
> *private* DataModel orderDataModel;
> *private* *static* *final* ArrayList<Order> *orderList* = *new*ArrayList<Order>(Arrays.
> *asList*(
>
> *new* Order("A001", "Intel CPU", *new* BigDecimal("700.00"), *new*BigDecimal(1)),
> *new* Order("A002", "Harddisk 10TB", *new* BigDecimal("500.00"), *new*BigDecimal(2)),
> *new* Order("A003", "Dell Laptop", *new* BigDecimal("11600.00"), *new*BigDecimal(8)),
> *new* Order("A004", "Samsung LCD", *new* BigDecimal("5200.00"), *new*BigDecimal(3)),
> *new* Order("A005", "A4Tech Mouse", *new* BigDecimal("100.00"), *new*BigDecimal(10))));
>
> *public* DataModel getOrderListData() {
> *if*(*null* == orderDataModel) {
> orderDataModel = *new* ListDataModel(getOrders());
> }
> *return* orderDataModel;
> }
>
> *private* List<Order> getOrders() {
> *return* *orderList*;
> }
>
> *public* *int* getOrderListSize() {
> *return* *orderList*.size();
> }
>
> *Details:*
> In the above backing bean .java file, we have populated the listdatamodel
> with the help of the arraylist(orderlist) as hardcoded above. Please note
> that we have used 5 items in a list.
>
> Also, we have tested with one, two and three items in a list. We have
> attached the respective screenshots for your reference.
>
>
> Please do the needful.
>
> Thanks & Regards,
> Arunagiri K
>
>
> *(See attached file: Data table with 1 list item.gif)**(See attached
> file: Data table with 2 list items.gif)**(See attached file: Data table
> with 3 list items.gif)**(See attached file: Data table with 5 list
> items.gif)*
>
>
>
>
> Arunagiri Kaliappan
>
> Chennai
>
> Mailto:arunagiri.kaliappan@viterra.ca
> www.viterra.ca
>
>
> This e-mail and any attachment(s) are confidential and may be privileged.
> If you are not the intended recipient please notify me immediately by
> return
> e-mail, delete this e-mail and do not copy, use or disclose it.
>
> [image: Inactive hide details for Mike Kienenberger <mk...@gmail.com>]Mike
> Kienenberger <mk...@gmail.com>
>
>
>
> *Mike Kienenberger <mk...@gmail.com>*
>
> 01/04/2012 11:37 AM
>
>
> To
>
> MyFaces Discussion <us...@myfaces.apache.org>
> cc
>
> Arunagiri Kaliappan <ar...@viterra.ca>
> Subject
>
> Re: Clarification needed for Tomahawk datatable tag
> Can you describe how the output is different when the number is greater
> than 3 and when the number is less than 4?
>
> On Tue, Jan 3, 2012 at 9:01 AM, Arunagiri Kaliappan <*
> arunagiri.kaliappan@viterra.ca* <ar...@viterra.ca>> wrote:
>
> Hi,
>
> In our project (Portal application with JSF 1.1) , we are in need of
> showing the columns vertically and also the number of columns is dynamic in
> nature.
> We are using *Apache MyFaces Tomahawk* library for the above mentioned
> requirement.
>
> We have used *<t:datatable>* and *<t:columns>* tags. We have used the
> same datamodel (list datamodel which is made up of ArrayList which in turn
> contains objects) for both datatable and columns tags value attribute. But,
> the columns are displayed correctly only when the *number of columns
> is 3 and above*. For the columns below 3, the display is not proper.
>
> Can you please suggest as how to proceed further?
>
> Please do the needful.
>
> Thanks & Regards,
> Arunagiri K
>
>
>
> Arunagiri Kaliappan
>
> Chennai
> *
> **Mailto:arunagiri.kaliappan@viterra.ca*<Ma...@viterra.ca>
> *
> **www.viterra.ca* <http://www.viterra.ca/>
>
>
> This e-mail and any attachment(s) are confidential and may be
> privileged.
> If you are not the intended recipient please notify me immediately by
> return
> e-mail, delete this e-mail and do not copy, use or disclose it.
>
>
>
Re: Clarification needed for Tomahawk datatable tag
Posted by Aramudhan Divakaran <ar...@viterra.ca>.
Hi Mike,
The output format is same for less than 3 and greater than 4.
When we add test1, test2 and test3 values the data are not in the proper
format. After adding test4 the formatting looks fine.
Output will looks like below, the added values should display vertically.
Label 1 Test1 Test2 Test3
Test4 ............
Label 2 OutputvalueLab2 OutputvalueLab2 OutputvalueLab2
OutputvalueLab2 ...........
Label 3 OutputvalueLab3 OutputvalueLab3 OutputvalueLab3
OutputvalueLab3 ...........
Label 4 OutputvalueLab4 OutputvalueLab4 OutputvalueLab4
OutputvalueLab4 ...........
Label 5 OutputvalueLab5 OutputvalueLab5 OutputvalueLab5
OutputvalueLab5 ...........
Thanks & Regards,
Aramudhan.D
Aramudhan Divakaran
Chennai
Mailto:aramudhan.divakaran@viterra.ca
www.viterra.ca
This e-mail and any attachment(s) are confidential and may be privileged.
If you are not the intended recipient please notify me immediately by return
e-mail, delete this e-mail and do not copy, use or disclose it.
Mike Kienenberger
<mkienenb@gmail.com
> To
MyFaces Discussion
01/04/2012 11:07 PM <us...@myfaces.apache.org>
cc
Arunagiri Kaliappan
Please respond to <ar...@viterra.ca>
MyFaces Discussion Subject
<users@myfaces.apac Re: Clarification needed for Tomahawk
he.org> datatable tag
Can you describe how the output is different when the number is greater
than 3 and when the number is less than 4?
On Tue, Jan 3, 2012 at 9:01 AM, Arunagiri Kaliappan <
arunagiri.kaliappan@viterra.ca> wrote:
> Hi,
>
> In our project (Portal application with JSF 1.1) , we are in need of
> showing the columns vertically and also the number of columns is dynamic in
> nature.
> We are using *Apache MyFaces Tomahawk* library for the above mentioned
> requirement.
>
> We have used *<t:datatable>* and *<t:columns>* tags. We have used the
> same datamodel (list datamodel which is made up of ArrayList which in turn
> contains objects) for both datatable and columns tags value attribute. But,
> the columns are displayed correctly only when the *number of columns is 3
> and above*. For the columns below 3, the display is not proper.
>
> Can you please suggest as how to proceed further?
>
> Please do the needful.
>
> Thanks & Regards,
> Arunagiri K
>
>
>
> Arunagiri Kaliappan
>
> Chennai
>
> Mailto:arunagiri.kaliappan@viterra.ca
> www.viterra.ca
>
>
> This e-mail and any attachment(s) are confidential and may be privileged.
> If you are not the intended recipient please notify me immediately by
> return
> e-mail, delete this e-mail and do not copy, use or disclose it.
>
>
Re: Clarification needed for Tomahawk datatable tag
Posted by Arunagiri Kaliappan <ar...@viterra.ca>.
Hi,
Further to the below mail related to our application(JSF Portlet application),
following are the required details:
JSP file:
<t:dataTable id="data" styleClass="standardTable"
headerClass="standardTable_Header"
footerClass="standardTable_Header"
rowClasses="standardTable_Row1,standardTable_Row2"
columnClasses="standardTable_Column" var="row"
value="#{pc_TestNewView.orderListData}" preserveDataModel="false"
newspaperColumns="#{pc_TestNewView.orderListSize}">
<t:columns value="#{pc_TestNewView.orderListData}" var="column">
<h:inputText value="#{row.orderNo}" rendered="#{row.orderNo eq
column.orderNo}"/>
<h:inputText value="#{row.productName}" rendered
="#{row.orderNo eq column.orderNo}"/>
<h:inputText value="#{row.price}" rendered="#{row.orderNo eq
column.orderNo}"/>
<h:inputText value="#{row.qty}" rendered="#{row.orderNo eq
column.orderNo}"/>
</t:columns>
</t:dataTable>
In the above JSP file, we are iterating the list of objects of type "Order" in
our example.
Java file (Backing bean):
private DataModel orderDataModel;
private static final ArrayList<Order> orderList = new ArrayList<Order>(Arrays.
asList(
new Order("A001", "Intel CPU", new BigDecimal(
"700.00"), new BigDecimal(1)),
new Order("A002", "Harddisk 10TB", new BigDecimal(
"500.00"), new BigDecimal(2)),
new Order("A003", "Dell Laptop", new BigDecimal(
"11600.00"), new BigDecimal(8)),
new Order("A004", "Samsung LCD", new BigDecimal(
"5200.00"), new BigDecimal(3)),
new Order("A005", "A4Tech Mouse", new BigDecimal(
"100.00"), new BigDecimal(10))));
public DataModel getOrderListData() {
if(null == orderDataModel) {
orderDataModel = new ListDataModel(getOrders());
}
return orderDataModel;
}
private List<Order> getOrders() {
return orderList;
}
public int getOrderListSize() {
return orderList.size();
}
Details:
In the above backing bean .java file, we have populated the listdatamodel with
the help of the arraylist(orderlist) as hardcoded above. Please note that we
have used 5 items in a list.
Also, we have tested with one, two and three items in a list. We have attached
the respective screenshots for your reference.
Please do the needful.
Thanks & Regards,
Arunagiri K
(See attached file: Data table with 1 list item.gif)(See attached file: Data
table with 2 list items.gif)(See attached file: Data table with 3 list
items.gif)(See attached file: Data table with 5 list items.gif)
Arunagiri Kaliappan
Chennai
Mailto:arunagiri.kaliappan@viterra.ca
www.viterra.ca
This e-mail and any attachment(s) are confidential and may be privileged.
If you are not the intended recipient please notify me immediately by return
e-mail, delete this e-mail and do not copy, use or disclose it.
Mike Kienenberger
<mkienenb@gmail.com
> To
MyFaces Discussion
01/04/2012 11:37 AM <us...@myfaces.apache.org>
cc
Arunagiri Kaliappan
<ar...@viterra.ca>
Subject
Re: Clarification needed for Tomahawk
datatable tag
Can you describe how the output is different when the number is greater than 3
and when the number is less than 4?
On Tue, Jan 3, 2012 at 9:01 AM, Arunagiri Kaliappan <
arunagiri.kaliappan@viterra.ca> wrote:
Hi,
In our project (Portal application with JSF 1.1) , we are in need of showing
the columns vertically and also the number of columns is dynamic in nature.
We are using Apache MyFaces Tomahawk library for the above mentioned
requirement.
We have used <t:datatable> and <t:columns> tags. We have used the same
datamodel (list datamodel which is made up of ArrayList which in turn contains
objects) for both datatable and columns tags value attribute. But, the columns
are displayed correctly only when the number of columns is 3 and above. For
the columns below 3, the display is not proper.
Can you please suggest as how to proceed further?
Please do the needful.
Thanks & Regards,
Arunagiri K
Arunagiri Kaliappan
Chennai
Mailto:arunagiri.kaliappan@viterra.ca
www.viterra.ca
This e-mail and any attachment(s) are confidential and may be privileged.
If you are not the intended recipient please notify me immediately by return
e-mail, delete this e-mail and do not copy, use or disclose it.
Re: Clarification needed for Tomahawk datatable tag
Posted by Mike Kienenberger <mk...@gmail.com>.
Can you describe how the output is different when the number is greater
than 3 and when the number is less than 4?
On Tue, Jan 3, 2012 at 9:01 AM, Arunagiri Kaliappan <
arunagiri.kaliappan@viterra.ca> wrote:
> Hi,
>
> In our project (Portal application with JSF 1.1) , we are in need of
> showing the columns vertically and also the number of columns is dynamic in
> nature.
> We are using *Apache MyFaces Tomahawk* library for the above mentioned
> requirement.
>
> We have used *<t:datatable>* and *<t:columns>* tags. We have used the
> same datamodel (list datamodel which is made up of ArrayList which in turn
> contains objects) for both datatable and columns tags value attribute. But,
> the columns are displayed correctly only when the *number of columns is 3
> and above*. For the columns below 3, the display is not proper.
>
> Can you please suggest as how to proceed further?
>
> Please do the needful.
>
> Thanks & Regards,
> Arunagiri K
>
>
>
> Arunagiri Kaliappan
>
> Chennai
>
> Mailto:arunagiri.kaliappan@viterra.ca
> www.viterra.ca
>
>
> This e-mail and any attachment(s) are confidential and may be privileged.
> If you are not the intended recipient please notify me immediately by
> return
> e-mail, delete this e-mail and do not copy, use or disclose it.
>
>