You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matt Raible <ma...@yahoo.com> on 2002/02/06 14:34:28 UTC
Tiles: specifying an insert attribute that is not required
That worked beautifully - thank you.
A new question - is it possible to specify something like the following in my
layout JSPs:
<tiles:insert attribute="search" required="false"/>
This would enable my definitions the "option" of defining content for this
region, and I might be able to use a common template more often in my site. Or
is it possible to just extend the original layout and add one line for this new
attribute?
Thanks,
Matt
--- Cedric Dumoulin <ce...@lifl.fr> wrote:
>
> Hi,
>
> If the definition is defined in an xml file, there is no way to set a value
> from
> a property file.
> But, you can do another approach : in your definition, use the property key
> value, and in your template/layout, read the value from the property file
> using the
> property key.
>
> Cedric
>
> Example :
> <definition name="index" path="/layouts/courseBuilder.jsp">
> <put name="title.key" value="title.courseBuilder" />
> <put name="header" value="/common/header.jsp" />
> <put name="menu" value="doc.menu.main" />
> <put name="footer" value="/common/footer.jsp" />
> <put name="body" value="doc.portal.body" />
> </definition>
>
> .... in courseBuilder.jsp :
> <tiles:importAttribute name="title.key"/>
> <bean:message name="title.key"/>
>
>
> Matt Raible wrote:
>
> > Hopefully this is easy...
> >
> > In the following tiles definition:
> >
> > <definition name="index" path="/layouts/courseBuilder.jsp">
> > <put name="title" value="Course Builder" />
> > <put name="header" value="/common/header.jsp" />
> > <put name="menu" value="doc.menu.main" />
> > <put name="footer" value="/common/footer.jsp" />
> > <put name="body" value="doc.portal.body" />
> > </definition>
> >
> > How do I make the "title" attribute come from my
> ApplicationResource.properties
> > file?
> >
> > Thanks - first time getting into the nitty gritty of tiles, so sorry for
> the
> > ignorance.
> >
> > Matt
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE Valentine eCards with Yahoo! Greetings!
> > http://greetings.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tiles: specifying an insert attribute that is not required
Posted by Matt Raible <ma...@yahoo.com>.
Yep, worked like a charm - just starting with Tiles, I'll make sure and help
other folks out when I see similar problems to what I'm experiencing.
Thanks,
Matt
--- Cedric Dumoulin <ce...@lifl.fr> wrote:
>
> Doesn't the ignore property work for you ?
>
> <tiles:insert attribute="search" ignore="true"/>
>
> Cedric
>
>
> Matt Raible wrote:
>
> > That worked beautifully - thank you.
> >
> > A new question - is it possible to specify something like the following in
> my
> > layout JSPs:
> >
> > <tiles:insert attribute="search" required="false"/>
> >
> > This would enable my definitions the "option" of defining content for this
> > region, and I might be able to use a common template more often in my site.
> Or
> > is it possible to just extend the original layout and add one line for this
> new
> > attribute?
> >
> > Thanks,
> >
> > Matt
> >
> > --- Cedric Dumoulin <ce...@lifl.fr> wrote:
> > >
> > > Hi,
> > >
> > > If the definition is defined in an xml file, there is no way to set a
> value
> > > from
> > > a property file.
> > > But, you can do another approach : in your definition, use the property
> key
> > > value, and in your template/layout, read the value from the property file
> > > using the
> > > property key.
> > >
> > > Cedric
> > >
> > > Example :
> > > <definition name="index" path="/layouts/courseBuilder.jsp">
> > > <put name="title.key" value="title.courseBuilder" />
> > > <put name="header" value="/common/header.jsp" />
> > > <put name="menu" value="doc.menu.main" />
> > > <put name="footer" value="/common/footer.jsp" />
> > > <put name="body" value="doc.portal.body" />
> > > </definition>
> > >
> > > .... in courseBuilder.jsp :
> > > <tiles:importAttribute name="title.key"/>
> > > <bean:message name="title.key"/>
> > >
> > >
> > > Matt Raible wrote:
> > >
> > > > Hopefully this is easy...
> > > >
> > > > In the following tiles definition:
> > > >
> > > > <definition name="index" path="/layouts/courseBuilder.jsp">
> > > > <put name="title" value="Course Builder" />
> > > > <put name="header" value="/common/header.jsp" />
> > > > <put name="menu" value="doc.menu.main" />
> > > > <put name="footer" value="/common/footer.jsp" />
> > > > <put name="body" value="doc.portal.body" />
> > > > </definition>
> > > >
> > > > How do I make the "title" attribute come from my
> > > ApplicationResource.properties
> > > > file?
> > > >
> > > > Thanks - first time getting into the nitty gritty of tiles, so sorry
> for
> > > the
> > > > ignorance.
> > > >
> > > > Matt
> > > >
> > > > __________________________________________________
> > > > Do You Yahoo!?
> > > > Send FREE Valentine eCards with Yahoo! Greetings!
> > > > http://greetings.yahoo.com
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> > >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE Valentine eCards with Yahoo! Greetings!
> > http://greetings.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tiles: specifying an insert attribute that is not required
Posted by Cedric Dumoulin <ce...@lifl.fr>.
Doesn't the ignore property work for you ?
<tiles:insert attribute="search" ignore="true"/>
Cedric
Matt Raible wrote:
> That worked beautifully - thank you.
>
> A new question - is it possible to specify something like the following in my
> layout JSPs:
>
> <tiles:insert attribute="search" required="false"/>
>
> This would enable my definitions the "option" of defining content for this
> region, and I might be able to use a common template more often in my site. Or
> is it possible to just extend the original layout and add one line for this new
> attribute?
>
> Thanks,
>
> Matt
>
> --- Cedric Dumoulin <ce...@lifl.fr> wrote:
> >
> > Hi,
> >
> > If the definition is defined in an xml file, there is no way to set a value
> > from
> > a property file.
> > But, you can do another approach : in your definition, use the property key
> > value, and in your template/layout, read the value from the property file
> > using the
> > property key.
> >
> > Cedric
> >
> > Example :
> > <definition name="index" path="/layouts/courseBuilder.jsp">
> > <put name="title.key" value="title.courseBuilder" />
> > <put name="header" value="/common/header.jsp" />
> > <put name="menu" value="doc.menu.main" />
> > <put name="footer" value="/common/footer.jsp" />
> > <put name="body" value="doc.portal.body" />
> > </definition>
> >
> > .... in courseBuilder.jsp :
> > <tiles:importAttribute name="title.key"/>
> > <bean:message name="title.key"/>
> >
> >
> > Matt Raible wrote:
> >
> > > Hopefully this is easy...
> > >
> > > In the following tiles definition:
> > >
> > > <definition name="index" path="/layouts/courseBuilder.jsp">
> > > <put name="title" value="Course Builder" />
> > > <put name="header" value="/common/header.jsp" />
> > > <put name="menu" value="doc.menu.main" />
> > > <put name="footer" value="/common/footer.jsp" />
> > > <put name="body" value="doc.portal.body" />
> > > </definition>
> > >
> > > How do I make the "title" attribute come from my
> > ApplicationResource.properties
> > > file?
> > >
> > > Thanks - first time getting into the nitty gritty of tiles, so sorry for
> > the
> > > ignorance.
> > >
> > > Matt
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Send FREE Valentine eCards with Yahoo! Greetings!
> > > http://greetings.yahoo.com
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>