You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by arnaud gonzales <ar...@gmail.com> on 2005/11/10 11:42:57 UTC

Using Struts indexed properties, List, in a form with table-layout

Hello,
I would like to iterate the DTO's List of my ActionForm with
<layout:collection>
like i will do with <logic:iterate> :

  <logic:iterate name="orderForm" property="orders" id="rememberMe">
        <html:text name="rememberMe" property="fieldA" indexed="true"/>
    </logic:iterate>

The result i try to achieve is :

<input type="text" name="rememberMe[ 0 ].fieldA">


My ActionForm : "CreateAccesForm"
the List contained in the form : "Users" contains userDTO object with
"name", "login", "email", "tel"

I want to obtain something like that
<td class="hermes-layout">
<input type="text" name="users[0].name" value="theName">
</td>

Here is my testing code:
Here is my code
<layout:collection name="CreateAccesForm" id="utilisateur"
styleClass="hermes-layout" styleId="listeUsers">
<layout:collectionInput title="portail.gestion.utilisateur.label.login"
formName="utilisateurs" formProperty ="login" formIndex="ctr" />
<layout:collectionInput title="portail.gestion.utilisateur.label.login"
formProperty ="utilisateurs" property="nom"/>
.....

Thanks in advance

--
Cordialement,
Arnaud Gonzales.

Re: Using Struts indexed properties, List, in a form with table-layout

Posted by Michael Jouravlev <jm...@gmail.com>.
Considering current Party policy proclaiming "Struts is not a single
product, but is a community" I would rephrase Laurie's reply as
follows:

layout:collection is part of the Struts Layout project, which is a
separate project from Struts Classic, Struts Core, Struts
Distribution, Struts Shale , Struts Ti or JSF. If you really-really
want to get an answer on your question, you need to ask it on the
Struts Layout mailing list. On the other hand, no one will start
spitting on you or beating you with bamboo sticks for asking these
questions in Struts mailing list. Just don't forget to use proper
subject prefix.

Michael.

On 11/10/05, Laurie Harper <la...@holoweb.net> wrote:
> layout:collection is part of the Struts Layout project, which is a
> seperate project from Struts. You need to ask questions about its use on
> the Struts Layout mailing lists:
>
> http://struts.application-servers.com/mail-lists.html
>
> arnaud gonzales wrote:
> > Here is the tips:
> >
> > <layout:collection name="CreateAccesForm" property="utilisateurs"
> > indexId="indexUser"
> > id="utilisateur" styleClass="hermes-layout" styleId="listeUsers" height="190px"
> > width="100%" onRowMouseOut="this.className='tableauClair'" onRowMouseOver="
> > this.className='tableauSurvol'">
> >
> > <layout:collectionInput title="portail.gestion.utilisateur.label.login"
> > formProperty="utilisateurs[${indexUser}].login" property="login"/>
> >
> >
> > 2005/11/10, arnaud gonzales <ar...@gmail.com>:
> >
> >>Hello,
> >>I would like to iterate the DTO's List of my ActionForm with
> >><layout:collection>
> >>like i will do with <logic:iterate> :
> >>
> >>  <logic:iterate name="orderForm" property="orders" id="rememberMe">
> >>        <html:text name="rememberMe" property="fieldA" indexed
> >>="true"/>
> >>    </logic:iterate>
> >>
> >>The result i try to achieve is :
> >>
> >><input type="text" name="rememberMe[ 0 ].fieldA">
> >>
> >>
> >>My ActionForm : "CreateAccesForm"
> >>the List contained in the form : "Users" contains userDTO object with
> >>"name", "login", "email", "tel"
> >>
> >>I want to obtain something like that
> >><td class="hermes-layout">
> >><input type="text" name="users[0].name" value="theName">
> >></td>
> >>
> >>Here is my testing code:
> >>Here is my code
> >><layout:collection name="CreateAccesForm" id="utilisateur"
> >>styleClass="hermes-layout" styleId="listeUsers">
> >><layout:collectionInput title="portail.gestion.utilisateur.label.login"
> >>formName="utilisateurs" formProperty ="login" formIndex="ctr" />
> >><layout:collectionInput title="portail.gestion.utilisateur.label.login"
> >>formProperty ="utilisateurs" property="nom"/>
> >>--
> >>Cordialement,
> >>Arnaud Gonzales.

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


Re: Using Struts indexed properties, List, in a form with table-layout

Posted by Laurie Harper <la...@holoweb.net>.
layout:collection is part of the Struts Layout project, which is a 
seperate project from Struts. You need to ask questions about its use on 
the Struts Layout mailing lists:

http://struts.application-servers.com/mail-lists.html

arnaud gonzales wrote:
> Here is the tips:
> 
> <layout:collection name="CreateAccesForm" property="utilisateurs"
> indexId="indexUser"
> id="utilisateur" styleClass="hermes-layout" styleId="listeUsers" height="190px"
> width="100%" onRowMouseOut="this.className='tableauClair'" onRowMouseOver="
> this.className='tableauSurvol'">
> 
> <layout:collectionInput title="portail.gestion.utilisateur.label.login"
> formProperty="utilisateurs[${indexUser}].login" property="login"/>
> 
> 
> 2005/11/10, arnaud gonzales <ar...@gmail.com>:
> 
>>Hello,
>>I would like to iterate the DTO's List of my ActionForm with
>><layout:collection>
>>like i will do with <logic:iterate> :
>>
>>  <logic:iterate name="orderForm" property="orders" id="rememberMe">
>>        <html:text name="rememberMe" property="fieldA" indexed
>>="true"/>
>>    </logic:iterate>
>>
>>The result i try to achieve is :
>>
>><input type="text" name="rememberMe[ 0 ].fieldA">
>>
>>
>>My ActionForm : "CreateAccesForm"
>>the List contained in the form : "Users" contains userDTO object with
>>"name", "login", "email", "tel"
>>
>>I want to obtain something like that
>><td class="hermes-layout">
>><input type="text" name="users[0].name" value="theName">
>></td>
>>
>>Here is my testing code:
>>Here is my code
>><layout:collection name="CreateAccesForm" id="utilisateur"
>>styleClass="hermes-layout" styleId="listeUsers">
>><layout:collectionInput title="portail.gestion.utilisateur.label.login"
>>formName="utilisateurs" formProperty ="login" formIndex="ctr" />
>><layout:collectionInput title="portail.gestion.utilisateur.label.login"
>>formProperty ="utilisateurs" property="nom"/>
>>.....
>>
>>Thanks in advance
>>
>>--
>>Cordialement,
>>Arnaud Gonzales.
> 
> 
> 
> 
> 
> --
> Cordialement,
> Arnaud Gonzales.
> 


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


Re: Using Struts indexed properties, List, in a form with table-layout

Posted by arnaud gonzales <ar...@gmail.com>.
Here is the tips:

<layout:collection name="CreateAccesForm" property="utilisateurs"
indexId="indexUser"
id="utilisateur" styleClass="hermes-layout" styleId="listeUsers" height="190px"
width="100%" onRowMouseOut="this.className='tableauClair'" onRowMouseOver="
this.className='tableauSurvol'">

<layout:collectionInput title="portail.gestion.utilisateur.label.login"
formProperty="utilisateurs[${indexUser}].login" property="login"/>


2005/11/10, arnaud gonzales <ar...@gmail.com>:
>
> Hello,
> I would like to iterate the DTO's List of my ActionForm with
> <layout:collection>
> like i will do with <logic:iterate> :
>
>   <logic:iterate name="orderForm" property="orders" id="rememberMe">
>         <html:text name="rememberMe" property="fieldA" indexed
> ="true"/>
>     </logic:iterate>
>
> The result i try to achieve is :
>
> <input type="text" name="rememberMe[ 0 ].fieldA">
>
>
> My ActionForm : "CreateAccesForm"
> the List contained in the form : "Users" contains userDTO object with
> "name", "login", "email", "tel"
>
> I want to obtain something like that
> <td class="hermes-layout">
> <input type="text" name="users[0].name" value="theName">
> </td>
>
> Here is my testing code:
> Here is my code
> <layout:collection name="CreateAccesForm" id="utilisateur"
> styleClass="hermes-layout" styleId="listeUsers">
> <layout:collectionInput title="portail.gestion.utilisateur.label.login"
> formName="utilisateurs" formProperty ="login" formIndex="ctr" />
> <layout:collectionInput title="portail.gestion.utilisateur.label.login"
> formProperty ="utilisateurs" property="nom"/>
> .....
>
> Thanks in advance
>
> --
> Cordialement,
> Arnaud Gonzales.




--
Cordialement,
Arnaud Gonzales.