Hello Stephane,

I think this a small differ approach would be better. I would declare only once Action for example DisplayAction. Within this class define two member variables clients and lists. Access to these beans via select in the *.jsp.

Something like that:
class DisplayAction ...
{
    List<Client> clients;
    List<Products> products;
    //This will be set if you selects one from the list
    Client client;
    Product product;

    public void prepare()
    {
        clients = someMethodsFillingClients();
        products = someMethodFillingProducts();
    }


}

Display.jsp

<s:action="">
<s:select name="client" list=clients" />
<s:select name="product" list="products"/>
</s:action>


Am 27.03.2010 07:50, schrieb Stephane Cosmeur:
Hello
I'm very new on struts 2 and i'm facing a problem i can't resolv. I think it
will be a formality for real users of struts.
I have two actions class, ProductAction and CliendAction. And i want to have
in a jsp two s:select to print the list of my clients and the list of my
products.
To display this jsp i call an action whose associed class is ClientAction.
So my first s:select work well, but i can't see how provide the
ProductAction to my second s:select.
I tried to make an interceptor to "load" the ProductAction but it didn't
work. I tried to use s:bean but it didn t work either. I know my problem can
looks stupid but i really need help ! i'm facing this problem since two
days.

thank you and sorry for my english :)



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to