edney imme wrote:



Hi,

I have a problem, and I would appreciate a suggestion of what would be the better solution to solve it. I didn't work before with tomahawk-sandbox taglibs, just my-faces, jstl and others...

My Problem is:
I need to populate a result list, and the first collumn must be a radio, that receives the value of my id. And after, when I will click at one of the radios ids, it will be edit details on the same windonw, where I can alter or delete them.

I nedd to populate a radio field in a DataTable with they correspondent ids. I'm searching, and I found some answers. By one of them, I try to use h:selectOneRadio, like that:

<h:selectOneRadio value="#{ bean.idSelected}" onclick="submit()"> <f:selectItems value="#{bean.idList}"/> </h:selectOneRadio>

But, them I have this result:

* 1 * 2 * 3 * 4  |  Item 1  |  Test 1
* 1 * 2 * 3 * 4  |  Item 2  |  Test 2
* 1 * 2 * 3 * 4  |  Item 3  |  Test 3
* 1 * 2 * 3 * 4  |  Item 4  |  Test 4

(* = radio)

But so it repet in each line all the ids, radios. And it must be like that:

*  1  |  Item 1  |  Test 1
*  2  |  Item 2  |  Test 2
*  3  |  Item 3  |  Test 3
*  4  |  Item 4  |  Test 4

Show one id for each line, with they correspondent others values.

Otherwise, I found others solutions where I need to use JavaScript, and too one with using "s:selectOneRow", in that link:
http://www.irian.at/myfaces-sandbox/selectOneRow.jsp.source

So, I would know how to use them, or if it is the better solution for my problem.


You might like to investigate t:selectOneRadio with layout="spread" (which is invisible) together with t:radio tags (which link to the selectOneRadio and are placed however you want).

 http://myfaces.apache.org/tomahawk/tlddoc/index.html

Regards,

Simon

Reply via email to