Here are links to two relevant tutorials. The first is how to create a UI Component, which is what I think you need. The second is more advanced on how to create your own theme....

http://www.vitarara.org/cms/struts_2_cookbook/creating_a_ui_component

http://www.vitarara.org/cms/struts_2_cookbook/creating_a_theme

-D
On Apr 29, 2008, at 4:45 AM, George Wei wrote:


Hi, all!

There is a simple form in my AppFuse's Struts 2 project. There are 5
textfields:

Product Name - I want to put it on the first line on the form
Category, Manufacturer, Model & Price Range - I want to put them on the
second line

and 2 buttons:

Submit, Reset - I want to put them on the second line just after the
textfields.

The problem is I could never achieve this effect.

My code is as follows:

<%@ include file="/common/taglibs.jsp"%>

<head>
        <title><fmt:message key="productList.title"/></title>
        <meta name="menu" content="ProductSearchMenu"/>
</head>

<s:action id="priceRangeAction" name="priceRanges"/>

<s:form id="productSearchForm" action="productSearch" method="post"
validate="true">
 <div class="table">
          <li>
                <div>
                <s:textfield key="product.name" name="name" required="false"
maxlength="50" cssClass="text medium"/>
            </div>
          </li>
        
          <li nowrap="true">
                <div>
                        <div class="left">
<s:textfield key="product.category" name="category" required="false"
maxlength="50" cssClass="text medium"/>
              </div>
                        <div class="left">
                        <s:textfield key="product.manufacturer" 
name="manufacturer"
required="false" maxlength="50" cssClass="text medium"/>
              </div>
              <div class="left">
                        <s:textfield key="product.model" name="model" 
required="false"
maxlength="30" cssClass="text medium"/>
              </div>
              <div class="left">
                        <s:select key="priceRange.name" name="priceRangeId"
list="#priceRangeAction.priceRanges" listKey="id" listValue="name"
/>
              </div>
              <div>
                <s:submit cssClass="button" method="list" key="button.search"
theme="simple"/>
                <s:submit cssClass="button" method="reset" key="button.reset"
theme="simple"/>
              </div>
            </div>
          </li>
 </div>
</s:form>

and the strange effect is as follows:

http://www.nabble.com/file/p16958661/1.jpg

What should I change in my code to implement my expected effect? Thanks for
any clues.

Regards,
George
--
View this message in context: 
http://www.nabble.com/How-to-align-multi-Struts-2-tags-on-the-same-line--tp16958661s2369p16958661.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to