struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandru <icid...@yahoo.com>
Subject Re: struts tags: How to use a list inside another list
Date Tue, 14 Jun 2011 11:13:52 GMT
No , i don't have key attribute in this form, that's true. I use it somewhere else.
But I think i found a suitable fix now.. i reverted to struts standard theme and changed the
textarea to a html-type one. Looks like this

    <s:form action="do-translate-document" cssClass="formtable"
        method="POST">
        <s:iterator value="contentList">
            <tr><td>
            <p>
                <s:property value="expression" />
            </p>
            <textarea > </textarea>
            <s:iterator value="translations">
                <p><s:property value="translation" /></p>
            </s:iterator>
            </td></tr>
        </s:iterator>
        <s:submit />
    </s:form>

Thanks for your input, guys!

--- On Tue, 6/14/11, Dave Newton <davelnewton@gmail.com> wrote:

From: Dave Newton <davelnewton@gmail.com>
Subject: Re: struts tags: How to use a list inside another list
To: "Struts Users Mailing List" <user@struts.apache.org>
Cc: mcucchiara@apache.org
Date: Tuesday, June 14, 2011, 7:05 AM

I don't see a "key" attribute anywhere, maybe that's why it doesn't work.

In any case: to remove the default theme's (xhtml) formatting, you use
the "simple" theme. You lose a lot of what Struts provides you,
however.

You may wish to explore a custom theme.

Dave

On Tue, Jun 14, 2011 at 7:01 AM, Alexandru <icidrop@yahoo.com> wrote:
> Yes, that worked. But now the "key" attribute doesn't work. I can't get my element labels
from my .properties file. Is there another way?
>
> --- On Tue, 6/14/11, Maurizio Cucchiara <mcucchiara@apache.org> wrote:
>
> From: Maurizio Cucchiara <mcucchiara@apache.org>
> Subject: Re: struts tags: How to use a list inside another list
> To: "Alexandru" <icidrop@yahoo.com>
> Cc: "Struts Users Mailing List" <user@struts.apache.org>
> Date: Tuesday, June 14, 2011, 6:39 AM
>
> I'm not sure it will help, but switching to simple theme, surely will be
> helpful.
> So, try to add this line in your struts.xml file:
>
> <constant name="struts.ui.theme" value="simple"/>
>
>
> On 14 June 2011 12:15, Alexandru <icidrop@yahoo.com> wrote:
>
>> thank you, it does work. But i have a problem with arranging the items in
>> the form.
>> This is my form
>> <s:form action="do-translate-document" cssClass="formtable"
>>         method="POST">
>>         <s:iterator value="contentList">
>>             <p>
>>                 <s:property value="expression" />
>>             </p>
>>             <s:textarea />
>>             <s:iterator value="translations">
>>                 <p><s:property value="translation" /></p>
>>             </s:iterator>
>>         </s:iterator>
>>         <s:submit />
>>     </s:form>
>>
>> As seen from form i'm trying to achieve this structure:
>> <expression>
>> <texarea_for_new_translation_input>
>> <submited_translation0>
>> <submited_translation1>
>> <etc>
>>
>> but what i get is different. (check the attachment)
>> --- On *Mon, 6/13/11, Maurizio Cucchiara <mcucchiara@apache.org>* wrote:
>>
>>
>> From: Maurizio Cucchiara <mcucchiara@apache.org>
>> Subject: Re: struts tags: How to use a list inside another list
>> To: "Struts Users Mailing List" <user@struts.apache.org>
>> Date: Monday, June 13, 2011, 6:33 PM
>>
>> Try this, AFAICR it should be work
>> <s: itarator list="x">
>>         <s: itarator list="y">
>>         </s:iterator>
>> </s:iterator>
>>
>> On 14 June 2011 00:21, Alexandru <icidrop@yahoo.com> wrote:
>> > I want to do somethink like this
>> > <s: itarator list="x">
>> >         <s: itarator list="x.y">
>> >         </s:iterator>
>> > </s:iterator>
>> > is it possible? Or should i use two separate lists?
>> >
>>
>>
>>
>> --
>> Maurizio Cucchiara
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> --
> Maurizio Cucchiara
>

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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message