You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Felipe Rodrigues <fe...@yahoo.com.br> on 2007/03/29 21:55:30 UTC

BUG - Struts ui components inside mess the layout.
Hi everyone,

I'm using a <table> to organize the layout of my form. I'd like to get all
components in one line, so, I'm using this code:
<table>
  <tr>
    <td>some text</td>
    <td>other text</td>
    <td><s:textfield name="any" size="30" required="true"/></td>
    <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
    <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
  </tr>
</table>

But when rendering the page, struts put each component under the other. I
checked out the generated code and found some <tr> tags lost in middle of my
<td> tags. These <tr> tags was added by struts.

Is that a real bug? Any idea?

Regards,

Felipe
-- 
View this message in context: http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9741411
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: BUG - Struts ui components inside

mess the layout.Posted by Felipe Rodrigues <fe...@yahoo.com.br>.
Mens,

I said it works putting the submit outside the <s:form>, but it doesn't. The
button is moved to a line separated by a Horizontal Line. At least, it does
execute correctly the action.

thanks,

Felipe


Felipe Rodrigues wrote:
> 
> Hi mans,
> I'm really so sorry to insist in this, but look at this code. How work
> around this?
> 
> <s:form action="user!insertUser" theme="ajax">
> 	<s:textfield name="user.name" label="Username" size="40" theme="simple"
> />
> 	<s:textfield name="user.email" label="E-mail" size="40" theme="simple" />
> 	<s:password name="user.password" label="Password" size="40"
> theme="simple" />
> 	<s:datetimepicker name="user.birthday" label="Birthday"
> displayFormat="dd/MM/yyyy" theme="simple"/>
> 	<s:submit value="Submit" notifyTopics="listUsersTopic" theme="simple" />
> </s:form>
> 
> Using this code, when I click at Submit, the page does not work properly,
> instead of refresh the listeners of this topic, it open a new blank page,
> as we can expect from a simple theme submit behavior.
> The form does not work, because this behavior should be provided by the
> ajax theme. But when I set the submit theme as ajax it goes to the next
> line. How put this form in a single line and keep using the submit theme
> as ajax?
> 
> Are you sure it is not a bug? If not, how do that?
> And please, I agree that this is not the place to post user doubts, and I
> could do that using a submit outside the form,
> just setting the formId. But I still think it is a workaround, and should
> be an easier way to do that.
> What do you think?
> 
> Regards,
> 
> Felipe
> 
> 
> 
> Felipe Rodrigues wrote:
>> 
>> Hi everyone,
>> 
>> I'm using a <table> to organize the layout of my form. I'd like to get
>> all components in one line, so, I'm using this code:
>> <table>
>>   <tr>
>>     <td>some text</td>
>>     <td>other text</td>
>>     <td><s:textfield name="any" size="30" required="true"/></td>
>>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
>>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
>>   </tr>
>> </table>
>> 
>> But when rendering the page, struts put each component under the other. I
>> checked out the generated code and found some <tr> tags lost in middle of
>> my <td> tags. These <tr> tags was added by struts.
>> 
>> Is that a real bug? Any idea?
>> 
>> Regards,
>> 
>> Felipe
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9744798
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: BUG - Struts ui components inside

mess the layout.Posted by Felipe Rodrigues <fe...@yahoo.com.br>.
Hi mans,
I'm really so sorry to insist in this, but look at this code. How work
around this?

<s:form action="user!insertUser" theme="ajax">
	<s:textfield name="user.name" label="Username" size="40" theme="simple" />
	<s:textfield name="user.email" label="E-mail" size="40" theme="simple" />
	<s:password name="user.password" label="Password" size="40" theme="simple"
/>
	<s:datetimepicker name="user.birthday" label="Birthday"
displayFormat="dd/MM/yyyy" theme="simple"/>
	<s:submit value="Submit" notifyTopics="listUsersTopic" theme="simple" />
</s:form>

Using this code, when I click at Submit, the page does not work properly,
instead of refresh the listeners of this topic, it open a new blank page, as
we can expect from a simple theme submit behavior.
The form does not work, because this behavior should be provided by the ajax
theme. But when I set the submit theme as ajax it goes to the next line. How
put this form in a single line and keep using the submit theme as ajax?

Are you sure it is not a bug? If not, how do that?
And please, I agree that this is not the place to post user doubts, and I
could do that using a submit outside the form,
just setting the formId. But I still think it is a workaround, and should be
an easier way to do that.
What do you think?

Regards,

Felipe



Felipe Rodrigues wrote:
> 
> Hi everyone,
> 
> I'm using a <table> to organize the layout of my form. I'd like to get all
> components in one line, so, I'm using this code:
> <table>
>   <tr>
>     <td>some text</td>
>     <td>other text</td>
>     <td><s:textfield name="any" size="30" required="true"/></td>
>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
>   </tr>
> </table>
> 
> But when rendering the page, struts put each component under the other. I
> checked out the generated code and found some <tr> tags lost in middle of
> my <td> tags. These <tr> tags was added by struts.
> 
> Is that a real bug? Any idea?
> 
> Regards,
> 
> Felipe
> 

-- 
View this message in context: http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9744755
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: BUG - Struts ui components inside

mess the layout.Posted by Rene Gielen <gi...@it-neering.net>.
Felipe,

this was not meant a flame. The doc posted snippet explains
- why you get tr/td tags
- that you could make a custom template
Since we clarified that this is a feature and not a bug, I'm sure you 
will get lots of input regarding your particular usecase if you describe 
it on the user list.

Regards,
- Rene

Felipe Rodrigues schrieb:
> whow...
> Sounds like everybody is flaming here. 
> Sorry guys, I don't want to waste your time.
> Yes, there is a annotation in a green box right in the middle telling about
> the feature,
> but there is no example about how do that with ajax behavior. Can I just set
> the theme as simple
> and use the ajax behavior?
> 
> Once again, sorry for to be so dummie. Maybe something that are so clear to
> you, is not so clear to me.
> 
> Regards,
> 
> Felipe
> 
> 
> Rene Gielen wrote:
>> Of course it was ok to ask first before filing a bug. For the docs you 
>> pointed out, there is an annotation in a green box right in the middle:
>>
>> "The xhtml theme renders out a two-column table. If a different layout 
>> is needed, do not write your own HTML. Create a new theme or utilize the 
>> simple theme."
>>
>> Thanks anyway,
>> - Rene
>>
>> Felipe Rodrigues schrieb:
>>> Hi Philip,
>>>
>>> We are look guys, since I asked here, before create an issue at Jira,
>>> isn't
>>> it?
>>>
>>> By the way I read the documentation at  
>>> http://cwiki.apache.org/WW/form-tags.html 
>>> http://cwiki.apache.org/WW/form-tags.html  but it don't tell anything
>>> about
>>> this hidden "feature".
>>>
>>> I posted here, because I really think that if it is not a bug, it can be
>>> improved.
>>>
>>> I imagined that it could be a feature, to put each component in a
>>> diferent
>>> line.
>>>
>>> But how about when we want all them in a single line and use the theme
>>> ajax
>>> to some components?
>>> A little confuse, don't you think?
>>>
>>> xhtml theme extends simple, but if I want to use my components without a
>>> label and all of them in a single line, I must 
>>> set hte theme as simple. Hum... How could we improve that?
>>>
>>> Anyway, could you give me a example about how to work around this
>>> feature?
>>> The FAQ link you sent me have no example. :-)
>>>
>>> Best Regards,
>>>
>>> Felipe
>>>
>>>
>>> Philip Luppens wrote:
>>>> You might want to read the documentation of Struts 2 (hint, under FAQ
>>>> [1]) before you shout 'BUG'.
>>>>
>>>> Plus, you should use the user mailing list for questions like this,
>>>> the dev list is for the development of Struts 2.
>>>>
>>>> [1]
>>>> http://cwiki.apache.org/WW/why-do-the-form-tags-put-table-tags-around-controls.html
>>>>
>>>> Thank you,
>>>>
>>>> Phil
>>>>
>>>> On 3/29/07, Felipe Rodrigues <fe...@yahoo.com.br> wrote:
>>>>> Hi everyone,
>>>>>
>>>>> I'm using a <table> to organize the layout of my form. I'd like to get
>>>>> all
>>>>> components in one line, so, I'm using this code:
>>>>> <table>
>>>>>   <tr>
>>>>>     <td>some text</td>
>>>>>     <td>other text</td>
>>>>>     <td><s:textfield name="any" size="30" required="true"/></td>
>>>>>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
>>>>>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
>>>>>   </tr>
>>>>> </table>
>>>>>
>>>>> But when rendering the page, struts put each component under the other.
>>>>> I
>>>>> checked out the generated code and found some <tr> tags lost in middle
>>>>> of
>>>>> my
>>>>> <td> tags. These <tr> tags was added by struts.
>>>>>
>>>>> Is that a real bug? Any idea?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Felipe


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


Re: BUG - Struts ui components inside

mess the layout.Posted by Felipe Rodrigues <fe...@yahoo.com.br>.
whow...
Sounds like everybody is flaming here. 
Sorry guys, I don't want to waste your time.
Yes, there is a annotation in a green box right in the middle telling about
the feature,
but there is no example about how do that with ajax behavior. Can I just set
the theme as simple
and use the ajax behavior?

Once again, sorry for to be so dummie. Maybe something that are so clear to
you, is not so clear to me.

Regards,

Felipe


Rene Gielen wrote:
> 
> Of course it was ok to ask first before filing a bug. For the docs you 
> pointed out, there is an annotation in a green box right in the middle:
> 
> "The xhtml theme renders out a two-column table. If a different layout 
> is needed, do not write your own HTML. Create a new theme or utilize the 
> simple theme."
> 
> Thanks anyway,
> - Rene
> 
> Felipe Rodrigues schrieb:
>> Hi Philip,
>> 
>> We are look guys, since I asked here, before create an issue at Jira,
>> isn't
>> it?
>> 
>> By the way I read the documentation at  
>> http://cwiki.apache.org/WW/form-tags.html 
>> http://cwiki.apache.org/WW/form-tags.html  but it don't tell anything
>> about
>> this hidden "feature".
>> 
>> I posted here, because I really think that if it is not a bug, it can be
>> improved.
>> 
>> I imagined that it could be a feature, to put each component in a
>> diferent
>> line.
>> 
>> But how about when we want all them in a single line and use the theme
>> ajax
>> to some components?
>> A little confuse, don't you think?
>> 
>> xhtml theme extends simple, but if I want to use my components without a
>> label and all of them in a single line, I must 
>> set hte theme as simple. Hum... How could we improve that?
>> 
>> Anyway, could you give me a example about how to work around this
>> feature?
>> The FAQ link you sent me have no example. :-)
>> 
>> Best Regards,
>> 
>> Felipe
>> 
>> 
>> Philip Luppens wrote:
>>> You might want to read the documentation of Struts 2 (hint, under FAQ
>>> [1]) before you shout 'BUG'.
>>>
>>> Plus, you should use the user mailing list for questions like this,
>>> the dev list is for the development of Struts 2.
>>>
>>> [1]
>>> http://cwiki.apache.org/WW/why-do-the-form-tags-put-table-tags-around-controls.html
>>>
>>> Thank you,
>>>
>>> Phil
>>>
>>> On 3/29/07, Felipe Rodrigues <fe...@yahoo.com.br> wrote:
>>>> Hi everyone,
>>>>
>>>> I'm using a <table> to organize the layout of my form. I'd like to get
>>>> all
>>>> components in one line, so, I'm using this code:
>>>> <table>
>>>>   <tr>
>>>>     <td>some text</td>
>>>>     <td>other text</td>
>>>>     <td><s:textfield name="any" size="30" required="true"/></td>
>>>>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
>>>>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
>>>>   </tr>
>>>> </table>
>>>>
>>>> But when rendering the page, struts put each component under the other.
>>>> I
>>>> checked out the generated code and found some <tr> tags lost in middle
>>>> of
>>>> my
>>>> <td> tags. These <tr> tags was added by struts.
>>>>
>>>> Is that a real bug? Any idea?
>>>>
>>>> Regards,
>>>>
>>>> Felipe
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9741411
>>>> Sent from the Struts - Dev mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>>
>>>>
>>>
>>> -- 
>>> iDTV System Engineer
>>> "Always code as if the guy who ends up maintaining your code will be a
>>> violent psychopath who knows where you live." - John F. Woods
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>>
>> 
> 
> 
> -- 
> Rene Gielen  | http://it-neering.net/
> Aachen       | PGP-ID: BECB785A
> Germany      | gielen at it-neering.net
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9743841
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: BUG - Struts ui components inside

mess the layout.Posted by Rene Gielen <gi...@it-neering.net>.
Of course it was ok to ask first before filing a bug. For the docs you 
pointed out, there is an annotation in a green box right in the middle:

"The xhtml theme renders out a two-column table. If a different layout 
is needed, do not write your own HTML. Create a new theme or utilize the 
simple theme."

Thanks anyway,
- Rene

Felipe Rodrigues schrieb:
> Hi Philip,
> 
> We are look guys, since I asked here, before create an issue at Jira, isn't
> it?
> 
> By the way I read the documentation at  
> http://cwiki.apache.org/WW/form-tags.html 
> http://cwiki.apache.org/WW/form-tags.html  but it don't tell anything about
> this hidden "feature".
> 
> I posted here, because I really think that if it is not a bug, it can be
> improved.
> 
> I imagined that it could be a feature, to put each component in a diferent
> line.
> 
> But how about when we want all them in a single line and use the theme ajax
> to some components?
> A little confuse, don't you think?
> 
> xhtml theme extends simple, but if I want to use my components without a
> label and all of them in a single line, I must 
> set hte theme as simple. Hum... How could we improve that?
> 
> Anyway, could you give me a example about how to work around this feature?
> The FAQ link you sent me have no example. :-)
> 
> Best Regards,
> 
> Felipe
> 
> 
> Philip Luppens wrote:
>> You might want to read the documentation of Struts 2 (hint, under FAQ
>> [1]) before you shout 'BUG'.
>>
>> Plus, you should use the user mailing list for questions like this,
>> the dev list is for the development of Struts 2.
>>
>> [1]
>> http://cwiki.apache.org/WW/why-do-the-form-tags-put-table-tags-around-controls.html
>>
>> Thank you,
>>
>> Phil
>>
>> On 3/29/07, Felipe Rodrigues <fe...@yahoo.com.br> wrote:
>>> Hi everyone,
>>>
>>> I'm using a <table> to organize the layout of my form. I'd like to get
>>> all
>>> components in one line, so, I'm using this code:
>>> <table>
>>>   <tr>
>>>     <td>some text</td>
>>>     <td>other text</td>
>>>     <td><s:textfield name="any" size="30" required="true"/></td>
>>>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
>>>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
>>>   </tr>
>>> </table>
>>>
>>> But when rendering the page, struts put each component under the other. I
>>> checked out the generated code and found some <tr> tags lost in middle of
>>> my
>>> <td> tags. These <tr> tags was added by struts.
>>>
>>> Is that a real bug? Any idea?
>>>
>>> Regards,
>>>
>>> Felipe
>>> --
>>> View this message in context:
>>> http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9741411
>>> Sent from the Struts - Dev mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
>> -- 
>> iDTV System Engineer
>> "Always code as if the guy who ends up maintaining your code will be a
>> violent psychopath who knows where you live." - John F. Woods
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>>
> 


-- 
Rene Gielen  | http://it-neering.net/
Aachen       | PGP-ID: BECB785A
Germany      | gielen at it-neering.net

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


Re: BUG - Struts ui components inside

mess the layout.Posted by Felipe Rodrigues <fe...@yahoo.com.br>.
Hi Philip,

We are look guys, since I asked here, before create an issue at Jira, isn't
it?

By the way I read the documentation at  
http://cwiki.apache.org/WW/form-tags.html 
http://cwiki.apache.org/WW/form-tags.html  but it don't tell anything about
this hidden "feature".

I posted here, because I really think that if it is not a bug, it can be
improved.

I imagined that it could be a feature, to put each component in a diferent
line.

But how about when we want all them in a single line and use the theme ajax
to some components?
A little confuse, don't you think?

xhtml theme extends simple, but if I want to use my components without a
label and all of them in a single line, I must 
set hte theme as simple. Hum... How could we improve that?

Anyway, could you give me a example about how to work around this feature?
The FAQ link you sent me have no example. :-)

Best Regards,

Felipe


Philip Luppens wrote:
> 
> You might want to read the documentation of Struts 2 (hint, under FAQ
> [1]) before you shout 'BUG'.
> 
> Plus, you should use the user mailing list for questions like this,
> the dev list is for the development of Struts 2.
> 
> [1]
> http://cwiki.apache.org/WW/why-do-the-form-tags-put-table-tags-around-controls.html
> 
> Thank you,
> 
> Phil
> 
> On 3/29/07, Felipe Rodrigues <fe...@yahoo.com.br> wrote:
>>
>> Hi everyone,
>>
>> I'm using a <table> to organize the layout of my form. I'd like to get
>> all
>> components in one line, so, I'm using this code:
>> <table>
>>   <tr>
>>     <td>some text</td>
>>     <td>other text</td>
>>     <td><s:textfield name="any" size="30" required="true"/></td>
>>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
>>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
>>   </tr>
>> </table>
>>
>> But when rendering the page, struts put each component under the other. I
>> checked out the generated code and found some <tr> tags lost in middle of
>> my
>> <td> tags. These <tr> tags was added by struts.
>>
>> Is that a real bug? Any idea?
>>
>> Regards,
>>
>> Felipe
>> --
>> View this message in context:
>> http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9741411
>> Sent from the Struts - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
> 
> 
> -- 
> iDTV System Engineer
> "Always code as if the guy who ends up maintaining your code will be a
> violent psychopath who knows where you live." - John F. Woods
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9743561
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: BUG - Struts ui components inside

mess the layout.Posted by Philip Luppens <ph...@gmail.com>.
You might want to read the documentation of Struts 2 (hint, under FAQ
[1]) before you shout 'BUG'.

Plus, you should use the user mailing list for questions like this,
the dev list is for the development of Struts 2.

[1] http://cwiki.apache.org/WW/why-do-the-form-tags-put-table-tags-around-controls.html

Thank you,

Phil

On 3/29/07, Felipe Rodrigues <fe...@yahoo.com.br> wrote:
>
> Hi everyone,
>
> I'm using a <table> to organize the layout of my form. I'd like to get all
> components in one line, so, I'm using this code:
> <table>
>   <tr>
>     <td>some text</td>
>     <td>other text</td>
>     <td><s:textfield name="any" size="30" required="true"/></td>
>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
>   </tr>
> </table>
>
> But when rendering the page, struts put each component under the other. I
> checked out the generated code and found some <tr> tags lost in middle of my
> <td> tags. These <tr> tags was added by struts.
>
> Is that a real bug? Any idea?
>
> Regards,
>
> Felipe
> --
> View this message in context: http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9741411
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


-- 
iDTV System Engineer
"Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live." - John F. Woods

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


Re: BUG - Struts ui components inside

mess the layout.Posted by Laurie Harper <la...@holoweb.net>.
Firstly, this is really a question for the users list. Please follow up 
there if you have further questions. That said:

Felipe Rodrigues wrote:
> Hi everyone,
> 
> I'm using a <table> to organize the layout of my form. I'd like to get all
> components in one line, so, I'm using this code:
> <table>
>   <tr>
>     <td>some text</td>
>     <td>other text</td>
>     <td><s:textfield name="any" size="30" required="true"/></td>
>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
>   </tr>
> </table>
> 
> But when rendering the page, struts put each component under the other. I
> checked out the generated code and found some <tr> tags lost in middle of my
> <td> tags. These <tr> tags was added by struts.
> 
> Is that a real bug? Any idea?

No, it's not a bug. It sounds like you're using the 'xhtml' theme, which 
is designed to automatically lay your forms out using table. For your 
use case, you'll need to use the 'simple' theme instead.

Be aware that you'll need to take care of showing field labels, error 
messages, etc. yourself when using the 'simple' theme.

See the documentation for more:

http://struts.apache.org/2.x/docs/themes-and-templates.html
http://struts.apache.org/2.x/docs/xhtml-theme.html
http://struts.apache.org/2.x/docs/simple-theme.html

L.


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


Re: BUG - Struts ui components inside

mess the layout.Posted by Felipe Rodrigues <fe...@yahoo.com.br>.
Sure,

Should I create a new post there and leave this one here?

Felipe

Martin Cooper-2 wrote:
> 
> On 3/29/07, Felipe Rodrigues <fe...@yahoo.com.br> wrote:
>>
>>
>> Thanks,
>>
>> So I need to set the theme as simple?
> 
> 
> You need to be asking on the User list, as mentioned by Phil.
> 
> --
> Martin Cooper
> 
> 
> But what about if I am using ajax
>> features? Because after that I have 2 <s:submit> that use theme ajax.
>>
>> Just ot remember: I want put all components in one line.
>>
>> Anyway, thanks for the answer...
>>
>> Felipe
>>
>>
>> Rainer Hermanns wrote:
>> >
>> > This is no bug, but a feature :)
>> >
>> > Either use this:
>> >  <table>
>> >    <tr>
>> >      <td>some text</td>
>> >      <td>other text</td>
>> >      <td><s:textfield name="any" size="30" required="true"
>> > theme="simple"/></td>
>> >      <td><s:checkbox name="check" value="OUT"
>> > theme="simple"></s:checkbox></td>
>> >      <td><s:checkbox name="check2"
>> > value="INV"theme="simple"></s:checkbox></td>
>> >    </tr>
>> >  </table>
>> >
>> > or:
>> >
>> > <s:form action...>
>> > <s:textfield label="x1" name="any" size="30" required="true"/>
>> > <s:checkbox label="x2" name="check" value="OUT"/>
>> > <s:checkbox label="x3" name="check2" value="INV"/>
>> > </s:form>
>> >
>> > hth,
>> > Rainer
>> >
>> >>
>> >> Hi everyone,
>> >>
>> >> I'm using a <table> to organize the layout of my form. I'd like to get
>> >> all
>> >> components in one line, so, I'm using this code:
>> >> <table>
>> >>   <tr>
>> >>     <td>some text</td>
>> >>     <td>other text</td>
>> >>     <td><s:textfield name="any" size="30" required="true"/></td>
>> >>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
>> >>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
>> >>   </tr>
>> >> </table>
>> >>
>> >> But when rendering the page, struts put each component under the
>> other.
>> I
>> >> checked out the generated code and found some <tr> tags lost in middle
>> of
>> >> my
>> >> <td> tags. These <tr> tags was added by struts.
>> >>
>> >> Is that a real bug? Any idea?
>> >>
>> >> Regards,
>> >>
>> >> Felipe
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9741411
>> >> Sent from the Struts - Dev mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> >> For additional commands, e-mail: dev-help@struts.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > Rainer Hermanns
>> > aixcept
>> > Neupforte 16
>> > 52062 Aachen - Germany
>> > w: http://aixcept.de/
>> > t:    +49-241-4012247
>> > m:  +49-170-3432912
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: dev-help@struts.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9743442
>> Sent from the Struts - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9743850
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: BUG - Struts ui components inside

mess the layout.Posted by Martin Cooper <ma...@apache.org>.
On 3/29/07, Felipe Rodrigues <fe...@yahoo.com.br> wrote:
>
>
> Thanks,
>
> So I need to set the theme as simple?


You need to be asking on the User list, as mentioned by Phil.

--
Martin Cooper


But what about if I am using ajax
> features? Because after that I have 2 <s:submit> that use theme ajax.
>
> Just ot remember: I want put all components in one line.
>
> Anyway, thanks for the answer...
>
> Felipe
>
>
> Rainer Hermanns wrote:
> >
> > This is no bug, but a feature :)
> >
> > Either use this:
> >  <table>
> >    <tr>
> >      <td>some text</td>
> >      <td>other text</td>
> >      <td><s:textfield name="any" size="30" required="true"
> > theme="simple"/></td>
> >      <td><s:checkbox name="check" value="OUT"
> > theme="simple"></s:checkbox></td>
> >      <td><s:checkbox name="check2"
> > value="INV"theme="simple"></s:checkbox></td>
> >    </tr>
> >  </table>
> >
> > or:
> >
> > <s:form action...>
> > <s:textfield label="x1" name="any" size="30" required="true"/>
> > <s:checkbox label="x2" name="check" value="OUT"/>
> > <s:checkbox label="x3" name="check2" value="INV"/>
> > </s:form>
> >
> > hth,
> > Rainer
> >
> >>
> >> Hi everyone,
> >>
> >> I'm using a <table> to organize the layout of my form. I'd like to get
> >> all
> >> components in one line, so, I'm using this code:
> >> <table>
> >>   <tr>
> >>     <td>some text</td>
> >>     <td>other text</td>
> >>     <td><s:textfield name="any" size="30" required="true"/></td>
> >>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
> >>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
> >>   </tr>
> >> </table>
> >>
> >> But when rendering the page, struts put each component under the other.
> I
> >> checked out the generated code and found some <tr> tags lost in middle
> of
> >> my
> >> <td> tags. These <tr> tags was added by struts.
> >>
> >> Is that a real bug? Any idea?
> >>
> >> Regards,
> >>
> >> Felipe
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9741411
> >> Sent from the Struts - Dev mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >>
> >
> >
> > --
> > Rainer Hermanns
> > aixcept
> > Neupforte 16
> > 52062 Aachen - Germany
> > w: http://aixcept.de/
> > t:    +49-241-4012247
> > m:  +49-170-3432912
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9743442
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: BUG - Struts ui components inside

mess the layout.Posted by Felipe Rodrigues <fe...@yahoo.com.br>.
Thanks,

So I need to set the theme as simple? But what about if I am using ajax
features? Because after that I have 2 <s:submit> that use theme ajax.

Just ot remember: I want put all components in one line.

Anyway, thanks for the answer...

Felipe


Rainer Hermanns wrote:
> 
> This is no bug, but a feature :)
> 
> Either use this:
>  <table>
>    <tr>
>      <td>some text</td>
>      <td>other text</td>
>      <td><s:textfield name="any" size="30" required="true"
> theme="simple"/></td>
>      <td><s:checkbox name="check" value="OUT" 
> theme="simple"></s:checkbox></td>
>      <td><s:checkbox name="check2" 
> value="INV"theme="simple"></s:checkbox></td>
>    </tr>
>  </table>
> 
> or:
> 
> <s:form action...>
> <s:textfield label="x1" name="any" size="30" required="true"/>
> <s:checkbox label="x2" name="check" value="OUT"/>
> <s:checkbox label="x3" name="check2" value="INV"/>
> </s:form>
> 
> hth,
> Rainer
> 
>>
>> Hi everyone,
>>
>> I'm using a <table> to organize the layout of my form. I'd like to get
>> all
>> components in one line, so, I'm using this code:
>> <table>
>>   <tr>
>>     <td>some text</td>
>>     <td>other text</td>
>>     <td><s:textfield name="any" size="30" required="true"/></td>
>>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
>>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
>>   </tr>
>> </table>
>>
>> But when rendering the page, struts put each component under the other. I
>> checked out the generated code and found some <tr> tags lost in middle of
>> my
>> <td> tags. These <tr> tags was added by struts.
>>
>> Is that a real bug? Any idea?
>>
>> Regards,
>>
>> Felipe
>> --
>> View this message in context:
>> http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9741411
>> Sent from the Struts - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
> 
> 
> -- 
> Rainer Hermanns
> aixcept
> Neupforte 16
> 52062 Aachen - Germany
> w: http://aixcept.de/
> t:    +49-241-4012247
> m:  +49-170-3432912
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9743442
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: BUG - Struts ui components inside

mess the layout.Posted by Musachy Barroso <mu...@gmail.com>.
On 3/29/07, Rainer Hermanns <he...@aixcept.de> wrote:
>
> This is no bug, but a feature :)


classic :)

musachy

Re: BUG - Struts ui components inside

mess the layout.Posted by Rainer Hermanns <he...@aixcept.de>.
This is no bug, but a feature :)

Either use this:
 <table>
   <tr>
     <td>some text</td>
     <td>other text</td>
     <td><s:textfield name="any" size="30" required="true"
theme="simple"/></td>
     <td><s:checkbox name="check" value="OUT" 
theme="simple"></s:checkbox></td>
     <td><s:checkbox name="check2" 
value="INV"theme="simple"></s:checkbox></td>
   </tr>
 </table>

or:

<s:form action...>
<s:textfield label="x1" name="any" size="30" required="true"/>
<s:checkbox label="x2" name="check" value="OUT"/>
<s:checkbox label="x3" name="check2" value="INV"/>
</s:form>

hth,
Rainer

>
> Hi everyone,
>
> I'm using a <table> to organize the layout of my form. I'd like to get all
> components in one line, so, I'm using this code:
> <table>
>   <tr>
>     <td>some text</td>
>     <td>other text</td>
>     <td><s:textfield name="any" size="30" required="true"/></td>
>     <td><s:checkbox name="check" value="OUT"></s:checkbox></td>
>     <td><s:checkbox name="check2" value="INV"></s:checkbox></td>
>   </tr>
> </table>
>
> But when rendering the page, struts put each component under the other. I
> checked out the generated code and found some <tr> tags lost in middle of
> my
> <td> tags. These <tr> tags was added by struts.
>
> Is that a real bug? Any idea?
>
> Regards,
>
> Felipe
> --
> View this message in context:
> http://www.nabble.com/BUG---Struts-ui-components-inside-%3Ctable%3E-mess-the-layout.-tf3488497.html#a9741411
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


-- 
Rainer Hermanns
aixcept
Neupforte 16
52062 Aachen - Germany
w: http://aixcept.de/
t:    +49-241-4012247
m:  +49-170-3432912

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