You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Leahy, Kevin" <Ke...@drkw.com> on 2005/11/09 13:18:19 UTC

Tiles: nesting one template inside another?

I have a generic company layout mainly composed of the menu navigations
system.
 
I have also a 'Search' type form. The search form will be used in various
different tiles because it is relevant to View, Edit, Update, Save etc
functionality.
 
What I want to do is kind of nest the Search Form layout inside the generic
company layout so that in my tiles definitions file I keep the generic
company part and still inject other tiles into the Form part.
 
I have a generic layout A :
 
<html>
<head>
<title><tiles:getAsString name="title" /></title>
</head>
<body>
<tiles:insert attribute="content" />
<script language="JavaScript">buildMenus();</script>
</body>
</html>
 
All pages will use this layout.
But I also have a Search form that will be used in many pages: view, edit,
save etc.
 
The form consists of many common elements and will change only slightly
according to context. At the moment I have implemented this using a separate
layout manager which is a cut and paste of layout A but with other tiles
inserts.
 
<html>
<head>
<title><tiles:getAsString name="title" /></title>
</head>
<body>
<form>
<tiles:insert attribute="xx" />
<tiles:insert attribute="yy" />
</form>
<script language="JavaScript">buildMenus();</script>
</body>
</html>
 
But it seems that I should be able to define a the form as a layout and use
the generic layout as a starting point and inject the tiles into the form
layout.
 
Am I just missing something obvious in the documentation? Or has anyone done
something similar?
 
Many thanks
 
Kevin
 ------


--------------------------------------------------------------------------------
The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient, please
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender. 3167
--------------------------------------------------------------------------------


Re: [OT] [LYNCHMOB]Re: Picking a framework

Posted by Yujun Liang <yu...@acm.org>.
 Struts Development can be very simple and productive if you design a POJO
based view layer.

I designed a POJO based View layer, the following are the core members of
the layer,
Page, -- Top panel
Tab, -- differentiate active tab and inactive tabs and fields on each tab
Button, -- you know
Field, -- you know
Summay, -- display free form data
ValueList,-- display tabular data
SearchCriteria -- display the search criteria for valuelist

I only have one set of JSP files and they can display as many domain objects
as you want. And the number of actions is less then the number of pages. For
example, the fields to be displayed on the summary area of the page is
defined in a property file, so the page can pick up the value of the
properties of the domain objects and display them automatically. The domain
object can be assoicated to other domain objects or composite key and the
configuration of the property is JSTL-like

pageName.summary.fields=myObject.itsCompositeKey.id,
myObject.itsChild.someProperty,myObject.anotherProperty

in the Resources Bundle file.

The input fields are also automatically generated. When Editting, instead of
display value, it creates 3 fields on the HTML form,
<input name=myObject.itsCompositeKey.id <http://myObject.itsCompositeKey.id>
>
<input name=myObject.itsChild.someProperty>
<input name=myObject.anotherProperty>

By contract, the domain objects need to be Java Beans.

So it is a relief from struggling with JSF, JSPs, JSTLs and Actions,
everything is just POJO.

Only one Action is used to get the ValueLists of million types of domain
objects.

The development is very productive considering it eliminates so many tasks.

On 11/10/05, Dave Newton <ne...@pingsite.com> wrote:
>
> Michael Jouravlev wrote:
>
> >On 11/9/05, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
> wrote:
> >
> >
> >>Anyway, now we're moving to a new J2EE development environment and
> trying
> >>to decide how to build apps going forward Struts is the logical choice
> >>because we know it. However, one of the big issues we have with Struts
> >>right now is that it still involves a lot of things to be done "by
> hand". I
> >>don't mind but management keeps coming back at us with "how come the
> .NET
> >>group can crank out the webapps so much faster? Why do you have to build
> >>all these common components? Why does it take so long? blah, blah, blah"
> >>
> >>
> >
> >Why don't you (your team) just switch to .NET? This is not a sarcasm.
> >
> >
> Are you allowed to say that? ;)
>
> Michael has a good point: if you're changing infrastructures anyway, and
> you already have an in-house .NET knowledge base, what is the compelling
> reason to stay with J2EE?
>
> An why _does_ it take "so long" for your J2EE team to build
> applications? That's a legitimate question that you'll have to answer. I
> have no ability to purchase tools at this time, but by spending a small
> amount of time with a decent language (I use Ruby and/or Lisp) you can
> often automate large chunks of previously hand-driven stuff. For
> example, I run a ruby script to add an action to a webapp: it adds the
> action mapping to the struts config, creates some default things in my
> app resources, creates a JSP tile chunk and creates a tile definition,
> etc. There's still stuff to do, but not as much as before, and it keeps
> you from forgetting Really Important Stuff.
>
> Believe me, I have little love for the .NET development experience
> (although C# is pretty nice as "normal" languages go) but...
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


--
Yujun Liang
yujun.liang@acm.org

Re: [OT] Re: Picking a framework

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Hey, your talking to an MCP and MCSD here!  I'm already straddling the
fence :)

Actually, I can't remember the last time I did anything more than a
trivial project with any MS technology.  So no, I think I'll stick around
a bit longer :)

I just didn't know they had been ported.  That *us* interesting info
either way.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com

On Wed, November 9, 2005 1:45 pm, Michael Jouravlev said:
> Want to jump the ship? ;-)
>
> On 11/9/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
>> Cool!  I had no idea, thanks!
>>
>> --
>> Frank W. Zammetti
>> Founder and Chief Software Architect
>> Omnytex Technologies
>> http://www.omnytex.com
>> AIM: fzammetti
>> Yahoo: fzammetti
>> MSN: fzammetti@hotmail.com
>>
>> On Wed, November 9, 2005 1:27 pm, Larry Meadors said:
>> > Yes.
>> >
>> > On 11/9/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
>> >> On Wed, November 9, 2005 1:14 pm, Ted Husted said:
>> >> > We use Subversion for version control, MySQL for the
>> >> > database, iBATIS for the data access layer, and Spring.Web for
>> >> > dependency injection.
>> >>
>> >> Are there iBATIS and Spring ports to .Net?
>> >>
>> >> Frank
>
> ---------------------------------------------------------------------
> 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: [OT] Re: Picking a framework

Posted by Michael Jouravlev <jm...@gmail.com>.
Want to jump the ship? ;-)

On 11/9/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> Cool!  I had no idea, thanks!
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM: fzammetti
> Yahoo: fzammetti
> MSN: fzammetti@hotmail.com
>
> On Wed, November 9, 2005 1:27 pm, Larry Meadors said:
> > Yes.
> >
> > On 11/9/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> >> On Wed, November 9, 2005 1:14 pm, Ted Husted said:
> >> > We use Subversion for version control, MySQL for the
> >> > database, iBATIS for the data access layer, and Spring.Web for
> >> > dependency injection.
> >>
> >> Are there iBATIS and Spring ports to .Net?
> >>
> >> Frank

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


Re: [OT] Re: Picking a framework

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Cool!  I had no idea, thanks!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com

On Wed, November 9, 2005 1:27 pm, Larry Meadors said:
> Yes.
>
> On 11/9/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
>> On Wed, November 9, 2005 1:14 pm, Ted Husted said:
>> > We use Subversion for version control, MySQL for the
>> > database, iBATIS for the data access layer, and Spring.Web for
>> > dependency injection.
>>
>> Are there iBATIS and Spring ports to .Net?
>>
>> Frank
>>
>> ---------------------------------------------------------------------
>> 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
>
>


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


Re: [OT] Re: Picking a framework

Posted by Larry Meadors <lm...@apache.org>.
Yes.

On 11/9/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> On Wed, November 9, 2005 1:14 pm, Ted Husted said:
> > We use Subversion for version control, MySQL for the
> > database, iBATIS for the data access layer, and Spring.Web for
> > dependency injection.
>
> Are there iBATIS and Spring ports to .Net?
>
> Frank
>
> ---------------------------------------------------------------------
> 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: [OT] Re: Picking a framework

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
On Wed, November 9, 2005 1:14 pm, Ted Husted said:
> We use Subversion for version control, MySQL for the
> database, iBATIS for the data access layer, and Spring.Web for
> dependency injection.

Are there iBATIS and Spring ports to .Net?

Frank

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


Re: [OT] Re: Picking a framework

Posted by Ted Husted <te...@gmail.com>.
On 11/9/05, Dave Newton <ne...@pingsite.com> wrote:
> Believe me, I have little love for the .NET development experience
> (although C# is pretty nice as "normal" languages go) but...

I've been working in .NET for about a year and a half now. Once we
started to ignore the usual examples and try to use the framework the
way Anders intended, it's become a real pleasure to use. We call a
Commons Chain port from our code-behinds and let Commands do all the
heavy-lifting. We use Subversion for version control, MySQL for the
database, iBATIS for the data access layer, and Spring.Web for
dependency injection. Once you plug JetBrains Resharper into VStudio,
I pretty much feel like I'm coding in Java again. :) The platforms are
very much alike; core skills transfer.

Of course, for a sanity check, we still use Linux boxes to run
Subversion and MySQL. We haven't done it yet, but we keep thinking of
putting Mono on one of the Linux boxes, so that we have another server
for testing. Mono turns ASP.NET into a "run anywhere" environment too.

-Ted.

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


[OT] [LYNCHMOB]Re: Picking a framework

Posted by Dave Newton <ne...@pingsite.com>.
Michael Jouravlev wrote:

>On 11/9/05, pantichd@firstenergycorp.com <pa...@firstenergycorp.com> wrote:
>  
>
>>Anyway, now we're moving to a new J2EE development environment and trying
>>to decide how to build apps going forward Struts is the logical choice
>>because we know it. However, one of the big issues we have with Struts
>>right now is that it still involves a lot of things to be done "by hand". I
>>don't mind but management keeps coming back at us with "how come the .NET
>>group can crank out the webapps so much faster? Why do you have to build
>>all these common components? Why does it take so long?  blah, blah, blah"
>>    
>>
>
>Why don't you (your team) just switch to .NET? This is not a sarcasm.
>  
>
Are you allowed to say that? ;)

Michael has a good point: if you're changing infrastructures anyway, and 
you already have an in-house .NET knowledge base, what is the compelling 
reason to stay with J2EE?

An why _does_ it take "so long" for your J2EE team to build 
applications? That's a legitimate question that you'll have to answer. I 
have no ability to purchase tools at this time, but by spending a small 
amount of time with a decent language (I use Ruby and/or Lisp) you can 
often automate large chunks of previously hand-driven stuff. For 
example, I run a ruby script to add an action to a webapp: it adds the 
action mapping to the struts config, creates some default things in my 
app resources, creates a JSP tile chunk and creates a tile definition, 
etc. There's still stuff to do, but not as much as before, and it keeps 
you from forgetting Really Important Stuff.

Believe me, I have little love for the .NET development experience 
(although C# is pretty nice as "normal" languages go) but...

Dave



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


Re: Picking a framework

Posted by Michael Jouravlev <jm...@gmail.com>.
On 11/9/05, pantichd@firstenergycorp.com <pa...@firstenergycorp.com> wrote:
> Anyway, now we're moving to a new J2EE development environment and trying
> to decide how to build apps going forward Struts is the logical choice
> because we know it. However, one of the big issues we have with Struts
> right now is that it still involves a lot of things to be done "by hand". I
> don't mind but management keeps coming back at us with "how come the .NET
> group can crank out the webapps so much faster? Why do you have to build
> all these common components? Why does it take so long?  blah, blah, blah"

Why don't you (your team) just switch to .NET? This is not a sarcasm.

Michael.

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


Re: Picking a framework

Posted by Ted Husted <te...@gmail.com>.
In your situation, you probably want to have a look at Struts Shale
and Java Server Faces. JSF is similar to .NET.

* http://struts.apache.org/shale/index.html
* http://jsfcentral.com/

Shale is still pre-1.0, but I understand the essential features are in
the nightly build.

Meanwhile, some of us are starting to collect information about the
various Java frameworks here:

* http://opensource2.atlassian.com/confluence/oss/display/WAG/Home

-- HTH, Ted.
http://www.husted.com/poe/

On 11/9/05, pantichd@firstenergycorp.com <pa...@firstenergycorp.com> wrote:
> Hello,
>
> I realize that this is not the most unbiased group  : ) but it seems to be
> a very sensible and well behaved (no nasty name calling like you find on
> some other groups). So I'm hoping not to get beat up when I ask this.
>
> We have been using Struts for about 4 years now and we've never updated..
> Don't ask why!
>
> Anyway, now we're moving to a new J2EE development environment and trying
> to decide how to build apps going forward Struts is the logical choice
> because we know it. However, one of the big issues we have with Struts
> right now is that it still involves a lot of things to be done "by hand". I
> don't mind but management keeps coming back at us with "how come the .NET
> group can crank out the webapps so much faster? Why do you have to build
> all these common components? Why does it take so long?  blah, blah, blah"
>
> I know that part of the problem is that we're on such an old version of
> Struts. I also know that there are a ton of Java (Struts, JSF, Spring,
> Turbine, Tapestry, Cocoon, ) frameworks and tools out there. Since this is
> a good time to make a change (upgrade or switch) I want to make sure we
> don't make the wrong choice. But I'm feeling a little overwhelmed with
> everything out there. How does one pick? Once you commit to one it's not
> easy to change.
>
> I know some will come back with "it depends on your situation and
> experience" I understand that. Obviously, Struts has an advantage because
> our are comfortable with it.
>
> I'm sure there are tools that make development (especially the Visual part
> of the MVC) quicker in java but I am having a hard time sifting thru
> everything to find them
>
> Has anyone seen any good comprehensive reviews/investigations of the
> various frameworks?
>
> Anyhelp would be greatly appreciated.
>
> Sorry for the long rambling message.
>
> David

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


Re: Picking a framework

Posted by Dakota Jack <da...@gmail.com>.
I would highly suggest you look at Spring and its web framework. You may
find that in the long run the .NET apps and the JSF apps are a false time
saving. This will be particularly clear when your engineers have become tool
jockeys who spend a lot of their work time finding new iTunes don't know how
to fix something when it is broken. I recommend you just peruse this list
for names that support JSF and ask yourself if you can live with that bunch
for long. Remember too that these are the experts.



On 11/9/05, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
wrote:
>
> Hello,
>
> I realize that this is not the most unbiased group : ) but it seems to be
> a very sensible and well behaved (no nasty name calling like you find on
> some other groups). So I'm hoping not to get beat up when I ask this.
>
> We have been using Struts for about 4 years now and we've never updated..
> Don't ask why!
>
> Anyway, now we're moving to a new J2EE development environment and trying
> to decide how to build apps going forward Struts is the logical choice
> because we know it. However, one of the big issues we have with Struts
> right now is that it still involves a lot of things to be done "by hand".
> I
> don't mind but management keeps coming back at us with "how come the .NET
> group can crank out the webapps so much faster? Why do you have to build
> all these common components? Why does it take so long? blah, blah, blah"
>
> I know that part of the problem is that we're on such an old version of
> Struts. I also know that there are a ton of Java (Struts, JSF, Spring,
> Turbine, Tapestry, Cocoon, ) frameworks and tools out there. Since this is
> a good time to make a change (upgrade or switch) I want to make sure we
> don't make the wrong choice. But I'm feeling a little overwhelmed with
> everything out there. How does one pick? Once you commit to one it's not
> easy to change.
>
> I know some will come back with "it depends on your situation and
> experience" I understand that. Obviously, Struts has an advantage because
> our are comfortable with it.
>
> I'm sure there are tools that make development (especially the Visual part
> of the MVC) quicker in java but I am having a hard time sifting thru
> everything to find them
>
> Has anyone seen any good comprehensive reviews/investigations of the
> various frameworks?
>
> Anyhelp would be greatly appreciated.
>
> Sorry for the long rambling message.
>
> David
>
>
> -----------------------------------------
> The information contained in this message is intended only for the
> personal and confidential use of the recipient(s) named above. If the
> reader of this message is not the intended recipient or an agent
> responsible for delivering it to the intended recipient, you are hereby
> notified that you have received this document in error and that any
> review, dissemination, distribution, or copying of this message is
> strictly prohibited. If you have received this communication in error,
> please notify us immediately, and delete the original message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

Picking a framework

Posted by pa...@firstenergycorp.com.
Hello,

I realize that this is not the most unbiased group  : )  but it seems to be
a very sensible and well behaved (no nasty name calling like you find on
some other groups). So I'm hoping not to get beat up when I ask this.

We have been using Struts for about 4 years now and we've never updated..
Don't ask why!

Anyway, now we're moving to a new J2EE development environment and trying
to decide how to build apps going forward Struts is the logical choice
because we know it. However, one of the big issues we have with Struts
right now is that it still involves a lot of things to be done "by hand". I
don't mind but management keeps coming back at us with "how come the .NET
group can crank out the webapps so much faster? Why do you have to build
all these common components? Why does it take so long?  blah, blah, blah"

I know that part of the problem is that we're on such an old version of
Struts. I also know that there are a ton of Java (Struts, JSF, Spring,
Turbine, Tapestry, Cocoon, ) frameworks and tools out there. Since this is
a good time to make a change (upgrade or switch) I want to make sure we
don't make the wrong choice. But I'm feeling a little overwhelmed with
everything out there. How does one pick? Once you commit to one it's not
easy to change.

I know some will come back with "it depends on your situation and
experience" I understand that. Obviously, Struts has an advantage because
our are comfortable with it.

I'm sure there are tools that make development (especially the Visual part
of the MVC) quicker in java but I am having a hard time sifting thru
everything to find them

Has anyone seen any good comprehensive reviews/investigations of the
various frameworks?

Anyhelp would be greatly appreciated.

Sorry for the long rambling message.

David


-----------------------------------------
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.


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


Re: Tiles: nesting one template inside another?

Posted by Yujun Liang <yu...@acm.org>.
Yes, you can use Layout B, just let xx be empty and yy be the content when
showing layout A.

Regards

On 11/9/05, Leahy, Kevin <Ke...@drkw.com> wrote:
>
> I have a generic company layout mainly composed of the menu navigations
> system.
>
> I have also a 'Search' type form. The search form will be used in various
> different tiles because it is relevant to View, Edit, Update, Save etc
> functionality.
>
> What I want to do is kind of nest the Search Form layout inside the
> generic
> company layout so that in my tiles definitions file I keep the generic
> company part and still inject other tiles into the Form part.
>
> I have a generic layout A :
>
> <html>
> <head>
> <title><tiles:getAsString name="title" /></title>
> </head>
> <body>
> <tiles:insert attribute="content" />
> <script language="JavaScript">buildMenus();</script>
> </body>
> </html>
>
> All pages will use this layout.
> But I also have a Search form that will be used in many pages: view, edit,
> save etc.
>
> The form consists of many common elements and will change only slightly
> according to context. At the moment I have implemented this using a
> separate
> layout manager which is a cut and paste of layout A but with other tiles
> inserts.
>
> <html>
> <head>
> <title><tiles:getAsString name="title" /></title>
> </head>
> <body>
> <form>
> <tiles:insert attribute="xx" />
> <tiles:insert attribute="yy" />
> </form>
> <script language="JavaScript">buildMenus();</script>
> </body>
> </html>
>
> But it seems that I should be able to define a the form as a layout and
> use
> the generic layout as a starting point and inject the tiles into the form
> layout.
>
> Am I just missing something obvious in the documentation? Or has anyone
> done
> something similar?
>
> Many thanks
>
> Kevin
> ------
>
>
>
> --------------------------------------------------------------------------------
> The information contained herein is confidential and is intended solely
> for the
> addressee. Access by any other party is unauthorised without the express
> written permission of the sender. If you are not the intended recipient,
> please
> contact the sender either via the company switchboard on +44 (0)20 7623
> 8000, or
> via e-mail return. If you have received this e-mail in error or wish to
> read our
> e-mail disclaimer statement and monitoring policy, please refer to
> http://www.drkw.com/disc/email/ or contact the sender. 3167
>
> --------------------------------------------------------------------------------
>
>
>


--
Yujun Liang
yujun.liang@acm.org