You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Griffith, Michael *" <Mi...@fda.hhs.gov> on 2009/06/09 21:20:35 UTC

How can I insert a table into a struts form?

Hello everyone, 
 
I'm wondering is there a way I can insert a displayTag table into my
struts form? I want the table to appear under form edit controls, but
before the buttons, like a master detail type of view. I'd like to know
if there is a way to do this without making changes to the default
templates?
 
Any reply is appreciated, 
 
Best Regards,
MG

PS: My apologies if this hits the list twice, the first message looks
like it was rejected by the list.

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


RE: How can I insert a table into a struts form?

Posted by "Griffith, Michael *" <Mi...@fda.hhs.gov>.
Awesome! 

You just improved my understanding of how the theme works. I appreciate
the input from you and Dave.

Best Regards,

MG 

-----Original Message-----
From: Wes Wannemacher [mailto:wesw@wantii.com] 
Sent: Tuesday, June 09, 2009 3:59 PM
To: Struts Users Mailing List
Subject: Re: How can I insert a table into a struts form?

On Tue, Jun 9, 2009 at 4:51 PM, Griffith, Michael
*<Mi...@fda.hhs.gov> wrote:
> Thanks Dave! That was too easy. Here I thought I would have to edit 
> the template. I'm always over thinking S2.
>
> How can I make my submit buttons show up next to each other, rather 
> than on separate rows (using xhtml template)
>
> <s:submit action="cancel" key="button.cancel"
> onclick="javascript:setMethod('cancel');" tabindex="2" /> <s:submit 
> tabindex="3" onclick="javascript:setMethod('submit');" />
>

<tr><td colspan="2">
<s:submit action="cancel" key="button.cancel" theme="simple"
 onclick="javascript:setMethod('cancel');" tabindex="2" /> <s:submit
tabindex="3" onclick="javascript:setMethod('submit');"
 theme="simple" />
</td></tr>

Really, the xhtml theme only creates a two column table, don't over
think it ;)

-Wes

> Cheers!
> mg
>
> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@yahoo.com]
> Sent: Tuesday, June 09, 2009 3:35 PM
> To: Struts Users Mailing List
> Subject: Re: How can I insert a table into a struts form?
>
> Griffith, Michael * wrote:
>>>> Create a <tr><td colspan="2">...
>> Do this in my form, or change the template?
>
> ....
>
> On your page.
>
> ---------------------------------------------------------------------
> 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
>
>



--
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

---------------------------------------------------------------------
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: How can I insert a table into a struts form?

Posted by Wes Wannemacher <we...@wantii.com>.
On Tue, Jun 9, 2009 at 4:51 PM, Griffith, Michael
*<Mi...@fda.hhs.gov> wrote:
> Thanks Dave! That was too easy. Here I thought I would have to edit the
> template. I'm always over thinking S2.
>
> How can I make my submit buttons show up next to each other, rather than
> on separate rows (using xhtml template)
>
> <s:submit action="cancel" key="button.cancel"
> onclick="javascript:setMethod('cancel');" tabindex="2" />
> <s:submit tabindex="3" onclick="javascript:setMethod('submit');" />
>

<tr><td colspan="2">
<s:submit action="cancel" key="button.cancel" theme="simple"
 onclick="javascript:setMethod('cancel');" tabindex="2" />
<s:submit tabindex="3" onclick="javascript:setMethod('submit');"
 theme="simple" />
</td></tr>

Really, the xhtml theme only creates a two column table, don't over think it ;)

-Wes

> Cheers!
> mg
>
> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@yahoo.com]
> Sent: Tuesday, June 09, 2009 3:35 PM
> To: Struts Users Mailing List
> Subject: Re: How can I insert a table into a struts form?
>
> Griffith, Michael * wrote:
>>>> Create a <tr><td colspan="2">...
>> Do this in my form, or change the template?
>
> ....
>
> On your page.
>
> ---------------------------------------------------------------------
> 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
>
>



-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

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


RE: How can I insert a table into a struts form?

Posted by "Griffith, Michael *" <Mi...@fda.hhs.gov>.
Thanks Dave! That was too easy. Here I thought I would have to edit the
template. I'm always over thinking S2.

How can I make my submit buttons show up next to each other, rather than
on separate rows (using xhtml template)

<s:submit action="cancel" key="button.cancel"
onclick="javascript:setMethod('cancel');" tabindex="2" />
<s:submit tabindex="3" onclick="javascript:setMethod('submit');" />  

Cheers!
mg

-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: Tuesday, June 09, 2009 3:35 PM
To: Struts Users Mailing List
Subject: Re: How can I insert a table into a struts form?

Griffith, Michael * wrote:
>>> Create a <tr><td colspan="2">... 
> Do this in my form, or change the template?

....

On your page.

---------------------------------------------------------------------
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: How can I insert a table into a struts form?

Posted by Dave Newton <ne...@yahoo.com>.
Griffith, Michael * wrote:
>>> Create a <tr><td colspan="2">... 
> Do this in my form, or change the template?

....

On your page.

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


RE: How can I insert a table into a struts form?

Posted by "Griffith, Michael *" <Mi...@fda.hhs.gov>.
Dave, 

Thanks for the reply.

>> Create a <tr><td colspan="2">... 

Do this in my form, or change the template?

MG

-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: Tuesday, June 09, 2009 3:27 PM
To: Struts Users Mailing List
Subject: Re: How can I insert a table into a struts form?

Griffith, Michael * wrote:
> I'm wondering is there a way I can insert a displayTag table into my 
> struts form? I want the table to appear under form edit controls, but 
> before the buttons, like a master detail type of view. I'd like to 
> know if there is a way to do this without making changes to the 
> default templates?

Create a <tr><td colspan="2">... and put it in there? Depends on what
theme you're using and what DisplayTag outputs.

Dave

---------------------------------------------------------------------
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: How can I insert a table into a struts form?

Posted by Dave Newton <ne...@yahoo.com>.
Griffith, Michael * wrote:
> I'm wondering is there a way I can insert a displayTag table into my
> struts form? I want the table to appear under form edit controls, but
> before the buttons, like a master detail type of view. I'd like to know
> if there is a way to do this without making changes to the default
> templates?

Create a <tr><td colspan="2">... and put it in there? Depends on what 
theme you're using and what DisplayTag outputs.

Dave

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