myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ernst Fastl" <ernst.fa...@gmail.com>
Subject Re: Select One Row with Image
Date Mon, 09 Oct 2006 22:56:22 GMT
Hi Manmeet!

You could either write a new component similar to the SelectOneRow.
It would probably have two additional attributes like "image" and
"selectedImage" which renders an input type image.

or you could just use a normal  image inide a commandLink.
The commandLink would then probably also contain
updateActionListener which sets a Boolean Property in the
iterated Objects (= the one you access with the name
specified in the var attribute of the datatable). The graphic image
could than have a attribute like:
url="#{var.selected ? 'img/selected.jpg' : 'img/not_selected.jpg'}"

hope this helps

regards

Ernst

On 10/9/06, manmeet <manmeet.bhavsar@gmail.com> wrote:
>
> Hi all,
>
> I am using the sandbox component for select one row.
> Works perfectly fine.
>
> But now what I want to do is use an image to select a row from a datatable
> instead of radio buttons created by the selectOneRow component.
> The radio button needs to be replaced by an image which when selected flips
> to a different image which indicating selected row.
>
> PLease let me know how can this be done? I am a newbie to Myfaces so any
> help shall be appreciated.
>
> Thanks to all.
>
> -Manmeet
> --
> View this message in context: http://www.nabble.com/Select-One-Row-with-Image-tf2413162.html#a6726642
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>

Mime
View raw message