Results 1 to 2 of 2
  1. #1
    saleh_neu is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Default layout struts 2 forms components vertically

    Hi folks :),

    Iím new to struts 2 thus i appreciate your help , my question is simple :

    How to layout the form components horizontally , for instance the following form display the textfield components vertically while I need it to be horizontally :

    <s:form action="login" >
    <s:textfield name="ages" label="Ages"/>
    <s:textfield name="ages" label="Ages"/>
    <s:textfield name="ages" label="Ages"/>
    <s:textfield name="names[0]" label="names"/>
    <s:textfield name="names[1]" label="names"/>
    <s:textfield name="names[2]" label="names"/>
    <s:submit/>
    </s:form>

    I tried to use table to layout it vertically but it is not working Ö

    Thanks in advanced

  2. #2
    saleh_neu is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Default the solution

    i found the solution, easily change the theme attribute to be simple then use html table :
    <s:form .... theme="simple" >
    <table >

    .
    .
    .


    Because by default the theme is XHTML that use the html table to layout the component

Similar Threads

  1. Replies: 4
    Last Post: 08-05-2010, 08:08 AM
  2. Help needed in layout of components
    By silversurfer2in in forum AWT / Swing
    Replies: 2
    Last Post: 05-27-2010, 11:50 AM
  3. Components Layout in a JPanel
    By jboy in forum New To Java
    Replies: 4
    Last Post: 10-11-2009, 12:08 PM
  4. Layout problem / add components from another class
    By ehochedez in forum AWT / Swing
    Replies: 9
    Last Post: 09-02-2009, 10:42 AM
  5. Inconsistent layout w/dynamic resize of components
    By donb2000 in forum AWT / Swing
    Replies: 3
    Last Post: 07-26-2008, 02:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •