You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Canos <da...@gmail.com> on 2008/05/18 11:20:32 UTC
[Struts 2] Many-to-many form-interface
I want to build a generic form-interface to cover a simple many-to-many
relation.
Like a Writer and Books relation where a Writer could write some books and a
book could be written by some writers.
I was thinking in a concrete Struts tag but I find nothing.
Could you show me how to solve this issue in a generic way?
Thanks in advance.
David CanĂ³s
Re: [Struts 2] Many-to-many form-interface
Posted by Laurie Harper <la...@holoweb.net>.
A multiple select seems to be the 'simplest thing that could possibly
work' for this, but there are other options. For example, something like
s:optiontransferselect [1] gives a slightly fancier way of providing the
same thing. Another alternative would be to have an Ajax-y 'combo box'
to select the first author/book, and an 'add another' button, or a
select/combo that onchange added the selection to a separate list and
reset, or...
Again, without knowing why you don't like the multi-select solution,
it's all a little vague and hand-wavy.
L.
[1] http://struts.apache.org/2.0.11.1/docs/optiontransferselect.html
David Canos wrote:
> Sorry Laurie.
> I will try to make me clarify
>
> I just want to build a form field that
> * in a Author profile will let me select the books that a author have.
> * in a Book profile will let me select the authors of the book.
>
> It could be possible by a multiple select but I really dont like this
> solution so I asked looking for a better way.
>
> Thank u
>
>
> 2008/5/19 Laurie Harper <la...@holoweb.net>:
>
>> David Canos wrote:
>>
>>> I want to build a generic form-interface to cover a simple many-to-many
>>> relation.
>>> Like a Writer and Books relation where a Writer could write some books and
>>> a
>>> book could be written by some writers.
>>>
>>> I was thinking in a concrete Struts tag but I find nothing.
>>>
>>> Could you show me how to solve this issue in a generic way?
>>>
>> It's a bit difficult to offer advice when the requirements are this
>> vague... What do you want this form to do? Allow you to edit a book's
>> authors? Allow you to edit an authors books? Some combination of both? (how
>> would that work?)
>>
>> L.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Struts 2] Many-to-many form-interface
Posted by David Canos <da...@gmail.com>.
Sorry Laurie.
I will try to make me clarify
I just want to build a form field that
* in a Author profile will let me select the books that a author have.
* in a Book profile will let me select the authors of the book.
It could be possible by a multiple select but I really dont like this
solution so I asked looking for a better way.
Thank u
2008/5/19 Laurie Harper <la...@holoweb.net>:
> David Canos wrote:
>
>> I want to build a generic form-interface to cover a simple many-to-many
>> relation.
>> Like a Writer and Books relation where a Writer could write some books and
>> a
>> book could be written by some writers.
>>
>> I was thinking in a concrete Struts tag but I find nothing.
>>
>> Could you show me how to solve this issue in a generic way?
>>
>
> It's a bit difficult to offer advice when the requirements are this
> vague... What do you want this form to do? Allow you to edit a book's
> authors? Allow you to edit an authors books? Some combination of both? (how
> would that work?)
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: [Struts 2] Many-to-many form-interface
Posted by Laurie Harper <la...@holoweb.net>.
David Canos wrote:
> I want to build a generic form-interface to cover a simple many-to-many
> relation.
> Like a Writer and Books relation where a Writer could write some books and a
> book could be written by some writers.
>
> I was thinking in a concrete Struts tag but I find nothing.
>
> Could you show me how to solve this issue in a generic way?
It's a bit difficult to offer advice when the requirements are this
vague... What do you want this form to do? Allow you to edit a book's
authors? Allow you to edit an authors books? Some combination of both?
(how would that work?)
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org