Solved

How to render <hx:dataIterator> before <h:selectBooleanCheckbox>

Posted on 2008-10-02
1
2,207 Views
Last Modified: 2013-11-24
Hi!

As you can see below I'm making use of "selectBooleanCheckbox" whose value is derived from the "dataIterator". But in real time scenario, the component "selectBooleanCheckbox" gets rendered before "dataIterator" because of which a NullPointerException gets thrown. But instead of a "selectBooleanCheckbox", if I use "outputText" inside the "dataIterator" I get the data displayed correctly.  Can anyone please let me know how to render "dataIterator" before rendering the "selectBooleanCheckbox".



One more thing, I don't want to use "dataTable" instead of "dataIterator". My presentation logic doesn't allow me to do that.

Thanks in advance guys,
Kartheek.
<hx:dataIterator value="#{row.subscriptions}" var="dataCol"

								id="subscriptionsTable1" >

								<h:selectBooleanCheckbox id="checkbox1"

									value="#{dataCol.emailSubscribed}">

								</h:selectBooleanCheckbox>

							</hx:dataIterator>

Open in new window

0
Comment
Question by:kkkrao
1 Comment
 

Accepted Solution

by:
kkkrao earned 0 total points
Comment Utility
Ok...... I guess no one has a solution/hack for it.

Well, I made my stuff work by removing "<h:selectBooleanCheckbox>" and replacing it with "<h:outputText>" whose value is HTML code of checkbox"". U can have a look at the code snippet below....

Cheers,
K.


							<hx:dataIterator value="#{row.subscriptions}" var="dataCol"

								rendered="#{row.rowData}" id="subscriptionsTable1" >

								<h:outputText value="<td>" escape="false"></h:outputText>

								<h:outputText escape="false" value="<input type='checkbox' name='option' checked>" rendered="#{dataCol.emailSubscribed}"/>

								<h:outputText escape="false" value="<input type='checkbox' name='option' >" rendered="#{!dataCol.emailSubscribed}"/>

								<h:outputText value="</td>" escape="false"></h:outputText>

							</hx:dataIterator>

Open in new window

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
strDist challenge 35 84
mapAB Challlenge 35 84
java  and programming certification ? 4 63
Java array passed to SQL where clause 23 39
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now