You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by VSG <sr...@gmail.com> on 2008/12/16 09:55:03 UTC

alignment problem in struts2

Hi,
 
     I am using default form theme.Means i am not putting any thing in the
form attribute
     <s:form>
     </s:form>

    In this form i need two fields in the same row. Like
      <s:textfield label="Fisrt"> 
       <s:textfield label="Second" >

   It should appear in the same row.But the problem is here it is apperaing
in two rows.
   Which i want in one row.And the same thing with the buttons cancel and
reset button should appear in   same row.

 if i use simple theme than labels are not working and i also fear of not
working validations and any more features of struts 2.
 Is it correct?

Regards,
VSG.

     
-- 
View this message in context: http://www.nabble.com/alignment-problem-in-struts2-tp21029381p21029381.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: alignment problem in struts2

Posted by Andy Sykes <a....@ucl.ac.uk>.
Hi,

No idea why it doesn't work - I found the XHTML theme to be a bit  
cumbersome for anything other than a stack of fields, one on top of  
the other.

Use the simple theme - it'll give you more flexibility. You can write  
your own themes as well.

For getting the validation errors in the simple theme, use the  
<s:fielderror> tag.

Andy.

On 16 Dec 2008, at 10:17, VSG wrote:

>
> Hi Manikanta,
>    I have gone throgh the documents.
>    so,With the default(XHTML) theme Im unable to put two fileds in  
> the same
> row?
>    Can u pls tell why?
>    Could u provide me a solution.
>
>  i try to see with the following lines of code
>   <s:textfield label="Fisrt">
>           <s:param name="labelcolspan"  value="%{1}"></s:param>
>           <s:param name="inputcolspan"  value="%{2}"></s:param>
>         </s:textfield>
>
>  but it is not working.
> is it the correct way?
>
> VSG
>
>
>
>
>
> ManiKanta G-2 wrote:
>>
>>>
>>>  It should appear in the same row.But the problem is here it is
>>> apperaing
>>> in two rows.
>>>  Which i want in one row.And the same thing with the buttons  
>>> cancel and
>>> reset button should appear in   same row.
>>>
>>
>> If u've seen the S2 docs, S2 uses templates/themes while  
>> constructing the
>> views.
>> By default XHTML theme will be used.
>>
>> See
>> http://struts.apache.org/2.x/docs/why-do-the-form-tags-put-table-tags-around-controls.html
>> http://struts.apache.org/2.x/docs/themes-and-templates.html
>>
>> ManiKanta
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/alignment-problem-in-struts2-tp21029381p21030443.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: alignment problem in struts2

Posted by VSG <sr...@gmail.com>.
Hi Manikanta,
    I have gone throgh the documents.
    so,With the default(XHTML) theme Im unable to put two fileds in the same
row?
    Can u pls tell why?
    Could u provide me a solution.

  i try to see with the following lines of code
   <s:textfield label="Fisrt">
           <s:param name="labelcolspan"  value="%{1}"></s:param>
           <s:param name="inputcolspan"  value="%{2}"></s:param>
         </s:textfield>

  but it is not working.
 is it the correct way?

 VSG
  




ManiKanta G-2 wrote:
> 
>>
>>   It should appear in the same row.But the problem is here it is
>> apperaing
>> in two rows.
>>   Which i want in one row.And the same thing with the buttons cancel and
>> reset button should appear in   same row.
>>
> 
> If u've seen the S2 docs, S2 uses templates/themes while constructing the
> views.
> By default XHTML theme will be used.
> 
> See
> http://struts.apache.org/2.x/docs/why-do-the-form-tags-put-table-tags-around-controls.html
> http://struts.apache.org/2.x/docs/themes-and-templates.html
> 
> ManiKanta
> 
> 

-- 
View this message in context: http://www.nabble.com/alignment-problem-in-struts2-tp21029381p21030443.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: alignment problem in struts2

Posted by ManiKanta G <go...@gmail.com>.
>
>   It should appear in the same row.But the problem is here it is apperaing
> in two rows.
>   Which i want in one row.And the same thing with the buttons cancel and
> reset button should appear in   same row.
>

If u've seen the S2 docs, S2 uses templates/themes while constructing the
views.
By default XHTML theme will be used.

See
http://struts.apache.org/2.x/docs/why-do-the-form-tags-put-table-tags-around-controls.html
http://struts.apache.org/2.x/docs/themes-and-templates.html

ManiKanta