aspose file tools*
The moose likes JSF and the fly likes How to limit no of rows in colu if rows increases more than 7 using JSF & the new value in new colu? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "How to limit no of rows in colu if rows increases more than 7 using JSF & the new value in new colu?" Watch "How to limit no of rows in colu if rows increases more than 7 using JSF & the new value in new colu?" New topic
Author

How to limit no of rows in colu if rows increases more than 7 using JSF & the new value in new colu?

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
Hi Group,
I am trying to use the check box with some string value but my requirenment is for the column value if it reaches more then 7 rows than it will insert data into the new column ?

How it is possible using JSF which component will help me nay code ?

<h:panelGrid styleClass="panelGrid" id="gridDetailZorgnetwerk4" columns="1" columnClasses="top">

<h:selectManyCheckbox id="ab" layout="pageDirection"
value="#{zorgnetwerkController.nieuwZorgnetwerk.fysiekeProducten}"
disabled="#{zorgnetwerkController.nieuwZorgnetwerk.zorgverlenerCombinaties != null && not empty (zorgnetwerkController.nieuwZorgnetwerk.zorgverlenerCombinaties)}">

<f:selectItems value="#{zorgnetwerkController.fysiekeProductItems}" />
</h:selectManyCheckbox>
</h:panelGrid>

here rows goes more and more so the bottom buttton is not visisble so i want to limit the rows so that after 7 records it will be in the next column and soo on .

thanks in Advance,
Prabhat
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
You´re talking about the h:selectManyCheckbox? Consider using Tomahawk t:selectManyCheckbox, it has an additional attribute 'layoutWidth' which may be of use here.
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
hi BalusC,
Thanks for your qucik reply !

now i am using your concept of myfaces.

1) i downloaded the Zip file for this from website.
2) with file name myfaces-core-1.2.5-bin.zip
3) extracted the zip and got 9 lib files.
namely: i) myfaces-api-1.2.5.jar
ii) myfaces-impl-1.2.5.jar
iii) myfaces-shared-impl-3.0.5.jar
iv) commons-logging-1.1.1.jar
v) commons-discovery-0.4.jar
vi) commons-digester-1.8.jar
vii) commons-collections-3.2.jar
viii) commons-codec-1.3.jar
ix) commons-beanutils-1.7.0.jar

So which jar file i have to add into my project library.

I have used only myfaces-api-1.2.5.jar in lib dir and then used the taglib <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

and used the code :
<t:selectManyCheckbox id="ab" layoutWidth="7" layout="pageDirection" value="#{zorgnetwerkController.nieuwZorgnetwerk.fysiekeProducten}" disabled="#{zorgnetwerkController.nieuwZorgnetwerk.zorgverlenerCombinaties != null && not empty(zorgnetwerkController.nieuwZorgnetwerk.zorgverlenerCombinaties)}">
<f:selectItems value="#{zorgnetwerkController.fysiekeProductItems}" />
</t:selectManyCheckbox>

but stil geeeting error: File "http://myfaces.apache.org/tomahawk" not found

where i am wrong ?

please suggest me ASAP.

Thanks
prabhat
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Uh, no, you just need to install Tomahawk, not MyFaces. You already have a JSF implementation.

Get tomahawk.jar and some commons depencencies (out of head those are commons-el, commons-logging, commons-io and commons-fileupload) and place it in the classpath. That´s all.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to limit no of rows in colu if rows increases more than 7 using JSF & the new value in new colu?