Hi,

from usability point of view i would suggest to delete an item
directly via clicking on a commandLink as the "o"; the requirement of
selecting only one entry can be also met with this approach.

You are achieving the same result as with the radio structure, the
radio way seems little bit circular to me.

The only way which comes to my mind to simulate the commandLink-radio
is doing a submit on every onchange event. But updateActionListener
will not work in this case, it`s only for components with an action
attribute (ActionSource comps).

cheers,

Gerald

On 11/26/06, JS <[EMAIL PROTECTED]> wrote:

Thanks Gerald.
What I want exactly is,

datatable rows :
select column1 column2
o         row1      row1
o         row2      row2

Generate     Delete

Above shown 'o' represents radio(or checkbox or commandlink) Generate and
Delete are command buttons. So when I select a row and press a command
button I only need to get the value of the unique id. So when I user press
the link or radio or check box , he can select only one row , not multiple
rows. When he press another row the earlier slected one needs to be
deselected. I think as you said command link works for that. But can I use
radio inside command link ?

Thanks,
JS.



Gerald Müllan wrote:
>
> Hi,
>
> well, in this case it would be best to use t:updateActionListener. You
> can specify a value and push it to somewhere in the model. There is no
> special need of a radio button or checkbox, you only have to give it a
> commandLink and embed the updateActionListener in it.
>
> Have a look:
>
> <h:commandLink value="delete entry" action="#{bean.goDeleteItem}">
>          <t:updateActionListener property="#{entry.id}"
> value="#{bean.entryId}"/>
> </h:commandLink>
>
> Hope this helps,
>
> cheers,
>
> Gerald
>
> On 11/26/06, JS <[EMAIL PROTECTED]> wrote:
>>
>>
>>  Thank you. Sorry for my vague question. I know we can select a row using
>> checkbox. But I don't want multiple row selection. I want to select only
>> one
>> row since I want to get a unique id from that. So can I use selectBoolean
>> checkbox for that ? Thanks for the time for me.
>>
>> JS.
>>
>>
>> Cagatay Civici wrote:
>> >
>> > Builds are here;
>> > http://people.apache.org/builds/myfaces/nightly/
>> >
>> > There are several ways to select a row, selectOneRow is just one of
>> them
>> > that uses a radio button.
>> >
>> > Regards,
>> >
>> > Cagatay
>> >
>> > On 11/26/06, JS <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Thanks for your reply Cagatay. Can you please tell me from where can I
>> >> download jar for sandbox ?
>> >> Is there anyway in jsf or myfaces for selecting a row ?
>> >>
>> >> Thanks,
>> >> JS.
>> >>
>> >>
>> >> Cagatay Civici wrote:
>> >> >
>> >> > Hi,
>> >> >
>> >> > There is a special datatable enhancement in sandbox for that called
>> >> > selectOneRow;
>> >> >
>> >> > http://example.irian.at/example-sandbox-20061126/selectOneRow.jsf
>> >> >
>> >> > Cagatay
>> >> >
>> >> > On 11/26/06, JS <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >>
>> >> >> Hi paul,
>> >> >>
>> >> >> Thanks for the reply. Could you please tell me how can I select a
>> row
>> >> >> from
>> >> >> the datatable ? I need to take a unique id from the datatable and
>> with
>> >> >> that
>> >> >> id I need to do different actions. Please give me a solution . Can
>> I
>> >> use
>> >> >> selectBooleanCheckBox for that purpose ? Can I get that unique
>> value ?
>> >> >>
>> >> >> Thanks for the help,
>> >> >> JS.
>> >> >>
>> >> >>
>> >> >>
>> >> >> Paul Spencer-3 wrote:
>> >> >> >
>> >> >> > JS,
>> >> >> > I am not sure what you are asking for. A radio button is not a
>> link,
>> >> >> > this it can not be used to select a row.  See the MasterDetail
>> >> >> > example[1] for an example of linking from an detail row.
>> >> >> >
>> >> >> > Paul Spencer
>> >> >> >
>> >> >> >
>> [1]http://example.irian.at/example-simple-20061125/masterDetail.jsf
>> >> >> >
>> >> >> >
>> >> >> > JS wrote:
>> >> >> >> Hi,
>> >> >> >>
>> >> >> >> Please anyone tell me how can I select a row from t:datatable
>> using
>> >> >> >> t:selectoneradioButton ?
>> >> >> >>
>> >> >> >> Please help me.
>> >> >> >>
>> >> >> >> Thanks,
>> >> >> >> JS.
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >> http://www.nabble.com/select-a-row-tf2705195.html#a7546933
>> >> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/select-a-row-tf2705195.html#a7547087
>> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/select-a-row-tf2705195.html#a7547126
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>

--
View this message in context: 
http://www.nabble.com/select-a-row-tf2705195.html#a7548643
Sent from the MyFaces - Users mailing list archive at Nabble.com.




--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Reply via email to