You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by vikrant S <sh...@gmail.com> on 2009/11/10 15:24:50 UTC

Alligning multiple buttons in a single row.

Hi All,
I am new to struts programming and trying to learn struts from the tutorials
provided online.
First Let me descibe my application.
 I am using html inside  a jsp page for the frontend. I have three buttons
in this page. They are as "START" , "STOP", and "CHANGE". I have different
actions for each buttons and I have mapped this actions to respective
methods in the action class. My problem is that I am not able to design the
page. I  need these three buttons in the same row But  I am not able to do
so. I tried to put these buttons inside a tables but still All buttons are
coming vertically and  not horizontally. I will provide you my both html
script.
!) One without using tables
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:form action="Workload">
<s:textfield label="Load"  name="load">
<s:textfield label="Duration" name="time">
<s:submit action="start" method="StartWorkload" value="START"/>
<s:submit action="stop" method="StopWorkload" value="STOP"/>
<s:submit action="change" method="ChangeWorkload" value="CHANGE"/>
2) One with using Tables
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<title>Struts Application</title>
<body style="background-color: 	#CBCE8A"> 
<table frame="below" align="center" rules="rows">
<tr>
<s:form action="Workload">
	<table>
		<tr>
			<td><s:textfield label="Load"  name="load"></s:textfield></td>
  		</tr>
		<tr>
			<td><s:textfield label="Duration" name="time"></s:textfield></td>
		</tr>
		<tr>
		<td><s:submit action="start" method="StartWorkload" value="START"/></td>
		<td><s:submit action="stop" method="StopWorkload" value="STOP"/></td>
		<td><s:submit action="change" method="ChangeWorkload"
value="CHANGE"/></td>
		</tr>
	</table>
	
</s:form> 
</tr>
</table>
</body>
</html>


By using both Scripts i am getting same result with all buttons vertically.
I need these buttons to be in a single horizontal line.
Please Help me out of this!!!!!
Thanks in advance!
-- 
View this message in context: http://old.nabble.com/Alligning-multiple-buttons-in-a-single-row.-tp26284283p26284283.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: Alligning multiple buttons in a single row.

Posted by vikrant S <sh...@gmail.com>.
Hi ,
My problem is solved 

-- 
View this message in context: http://old.nabble.com/Alligning-multiple-buttons-in-a-single-row.-tp26284283p26284848.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: Alligning multiple buttons in a single row.

Posted by vikrant S <sh...@gmail.com>.
Hi,
I am very much thankful to you. My problem is solved. But the buttons are
not at equal distance from each other.
They are spaced unequally. Any Suggestions Please.



-- 
View this message in context: http://old.nabble.com/Alligning-multiple-buttons-in-a-single-row.-tp26284283p26284846.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: Alligning multiple buttons in a single row.

Posted by Paweł Wielgus <po...@gmail.com>.
Hi,
add theme="simple" inside s:submit.

Best greetings,
Paweł Wielgus.

2009/11/10 vikrant S <sh...@gmail.com>:
>
> Hi All,
> I am new to struts programming and trying to learn struts from the tutorials
> provided online.
> First Let me descibe my application.
>  I am using html inside  a jsp page for the frontend. I have three buttons
> in this page. They are as "START" , "STOP", and "CHANGE". I have different
> actions for each buttons and I have mapped this actions to respective
> methods in the action class. My problem is that I am not able to design the
> page. I  need these three buttons in the same row But  I am not able to do
> so. I tried to put these buttons inside a tables but still All buttons are
> coming vertically and  not horizontally. I will provide you my both html
> script.
> !) One without using tables
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <s:form action="Workload">
> <s:textfield label="Load"  name="load">
> <s:textfield label="Duration" name="time">
> <s:submit action="start" method="StartWorkload" value="START"/>
> <s:submit action="stop" method="StopWorkload" value="STOP"/>
> <s:submit action="change" method="ChangeWorkload" value="CHANGE"/>
> 2) One with using Tables
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <html>
> <title>Struts Application</title>
> <body style="background-color:  #CBCE8A">
> <table frame="below" align="center" rules="rows">
> <tr>
> <s:form action="Workload">
>        <table>
>                <tr>
>                        <td><s:textfield label="Load"  name="load"></s:textfield></td>
>                </tr>
>                <tr>
>                        <td><s:textfield label="Duration" name="time"></s:textfield></td>
>                </tr>
>                <tr>
>                <td><s:submit action="start" method="StartWorkload" value="START"/></td>
>                <td><s:submit action="stop" method="StopWorkload" value="STOP"/></td>
>                <td><s:submit action="change" method="ChangeWorkload"
> value="CHANGE"/></td>
>                </tr>
>        </table>
>
> </s:form>
> </tr>
> </table>
> </body>
> </html>
>
>
> By using both Scripts i am getting same result with all buttons vertically.
> I need these buttons to be in a single horizontal line.
> Please Help me out of this!!!!!
> Thanks in advance!
> --
> View this message in context: http://old.nabble.com/Alligning-multiple-buttons-in-a-single-row.-tp26284283p26284283.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