Thanks for getting back to me. I was thinking that I would have to do
this, but was hoping that I could find another way. At least I am not
alone with this.
Trent
On 12/01/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
Trent,
What I do is wrap the domain object in a web-tier object. The web-tier
object has two properties: the domain object and a "selected" boolean
property. Then I have a column in my dataTable like so:
<h:column>
<f:facet name="header"><h:outputText value="Selected"/></f:facet>
<t:selectBooleanCheckbox value="#{data.selected}"/>
</h:column>
When I need to do processing, I grab the list of web-tier objects and
check to see which ones are selected.
Regards,
Jeff Bischoff
Kenneth L Kurz & Associates, Inc.
Trent Rosenbaum wrote:
> Hi there,
>
> When interacting with the DataTable component I have to define a
> boolean field on the domain object that represents a row in the table
> to allow multiple checkbox selection. Is this to right way to proceed
> with this development?
>
> I could for example have a domain object called 'Student' that has
> been delivered to me by others in an organisation. I do no control
> the development of this object, but to interact with it through a
> multiple select table I have to define a UI only used field on the
> above object. If on the other hand I settled for single radio button
> selects on the table then I could use the getter methods on the UI
> component to identify which object the user is interacting with.
>
> I am new to JSF but to me this seems like a cross over of layers. To
> me the domain object should not have to define this field. I was
> looking at the example under the trinidad/ADF project and there seems
> to be a table component that would allow me to gain a list of the rows
> that were checked.
>
> Is there anything I have over looked within the core myfaces API
> project and/or tomahawk projects? How do other navigate through this
> issue? Do people end up creating wrappers for the data and then
> display them within the DataTable instance?
>
> Many thanks
> Trent
>
>
>