You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Raghuveer Rawat <ra...@gmail.com> on 2007/11/12 16:22:53 UTC

[Tile2] Help in Page Layout Design using Tiles2

Hi, I have newbie in GUI design (Tiles/Menuing) etc. I need some urgent help
in Page Layout Design using Tile2/Struts Menu.
I am using below template for my page. Menu is very simple one so I have
just anchor tags in Header.jsp

<
definition name=".layout" template="/WEB-INF/common/Layout.jsp">

<put-attribute name="title" value="Title"/>

<put-attribute name="header" value="/WEB-INF/common/Header.jsp"/>

<put-attribute name="leftPanel" value="nothing"/>

< put-attribute name="content" value="nothing"/>

<put-attribute name="rightPanel" value="nothing"/>

<put-attribute name="footer" value="/WEB-INF/common/Footer.jsp"/>

</definition>
Now my other pages are extending this tile layout like below.

<definition name="welcome" extends=".layout">
<put-attribute name= "title" value="Title"/>
<put-attribute name="leftPanel" value="/WEB-INF/jsp/Left.jsp"/>
<put-attribute name="content" value="/WEB-INF/jsp/Center.jsp"/>
<put-attribute name="rightPanel" value="/WEB-INF/jsp/Right.jsp"/>
</definition>

Left.jsp contains a number of link. When user click on these links content
of Center.jsp will also change.

Now again Center.jsp have 4-5 menu items and page will change besed on menu
item selection.
I am wondering what will be best way to Design Layout of this Center.jsp.

Anyone who can help me.

Re: [Tile2] Help in Page Layout Design using Tiles2

Posted by Antonio Petrelli <an...@gmail.com>.
Mmm... You are confusing Tiles and Frames:
http://tiles.apache.org/faq.html#refresh

Antonio

2007/11/12, Raghuveer Rawat <ra...@gmail.com>:
>
> There is little difference between Left Panel and Center Panel links.
> Okay, let me explain it with below example..
>
> This definition will define mail layout for the page.
>
> <definition name=".layout" template= "/WEB-INF/common/Layout.jsp">
> <put-attribute name="title" value ="Title"/>
> <put-attribute name="header" value="/WEB-INF/common/Header.jsp"/>
> <put-attribute name="leftPanel" value="nothing"/>
> < put-attribute name= "content" value="nothing"/>
> <put-attribute name="rightPanel" value="nothing"/>
> <put-attribute name="footer" value="/WEB-INF/common/Footer.jsp"/>
> </definition>
>
> My my case main Menu is part of Header.jsp and they are simple anchor
> tags.
> Now when we click on My Account Link in Main Menu then below definition
> will
> replace Left, Center and Right Panel.
>
> <definition name="myAccount" extends=".layout">
> <put-attribute name="title" value="My Account"/>
> <put-attribute name="leftPanel" value="/WEB-INF/jsp/MyAccountLeft.jsp"/>
> <put-attribute name="content" value="/WEB-INF/jsp/MyAccount.jsp"/>
> <put-attribute name="rightPanel" value="/WEB-INF/jsp/Right.jsp"/>
> </definition>
>
> Now again if we click on My Articles link in Left Panel (MyAccount
> Left.jsp)
> then only Center Panel will get change to My Articles.jsp. Here there is
> no
> change in Left or Right Panel.
>
> <definition name="myArticles" extends="myAccount">
> <put-attribute name="title" value="My Articles"/>
> <put-attribute name="content" value="/WEB-INF/jsp/MyArticles.jsp"/>
> </definition>
>
> Now again this page MyArticles.jsp have a menu items (few links) in it for
> diffirentiating between diffirent types of Articles. Menu items will be
> static but page below menu will be changed based on Menu Item Selection.
>
> I also to change background color of Menu selection in Main Menu, Left
> Menu
> and Center Menu.
> Is it possible to do this using Tiles?
>
>
>
> On 11/12/07, Antonio Petrelli <an...@gmail.com> wrote:
> >
> > 2007/11/12, Raghuveer Rawat <ra...@gmail.com>:
> > > I am wondering what will be best way to Design Layout of this
> Center.jsp
> > .
> >
> > I just cannot understand what is your doubt...
> > From my POV the links in your left part and in your center part work
> > the same way: they both link to a new page, where the center part
> > changes.
> > So probably you have to design them in the same way.
> >
> > Antonio
> >
>

Re: [Tile2] Help in Page Layout Design using Tiles2

Posted by Raghuveer Rawat <ra...@gmail.com>.
There is little difference between Left Panel and Center Panel links.
Okay, let me explain it with below example..

This definition will define mail layout for the page.

<definition name=".layout" template= "/WEB-INF/common/Layout.jsp">
<put-attribute name="title" value ="Title"/>
<put-attribute name="header" value="/WEB-INF/common/Header.jsp"/>
<put-attribute name="leftPanel" value="nothing"/>
< put-attribute name= "content" value="nothing"/>
<put-attribute name="rightPanel" value="nothing"/>
<put-attribute name="footer" value="/WEB-INF/common/Footer.jsp"/>
</definition>

My my case main Menu is part of Header.jsp and they are simple anchor tags.
Now when we click on My Account Link in Main Menu then below definition will
replace Left, Center and Right Panel.

<definition name="myAccount" extends=".layout">
<put-attribute name="title" value="My Account"/>
<put-attribute name="leftPanel" value="/WEB-INF/jsp/MyAccountLeft.jsp"/>
<put-attribute name="content" value="/WEB-INF/jsp/MyAccount.jsp"/>
<put-attribute name="rightPanel" value="/WEB-INF/jsp/Right.jsp"/>
</definition>

Now again if we click on My Articles link in Left Panel (MyAccount Left.jsp)
then only Center Panel will get change to My Articles.jsp. Here there is no
change in Left or Right Panel.

<definition name="myArticles" extends="myAccount">
<put-attribute name="title" value="My Articles"/>
<put-attribute name="content" value="/WEB-INF/jsp/MyArticles.jsp"/>
</definition>

Now again this page MyArticles.jsp have a menu items (few links) in it for
diffirentiating between diffirent types of Articles. Menu items will be
static but page below menu will be changed based on Menu Item Selection.

I also to change background color of Menu selection in Main Menu, Left Menu
and Center Menu.
Is it possible to do this using Tiles?



On 11/12/07, Antonio Petrelli <an...@gmail.com> wrote:
>
> 2007/11/12, Raghuveer Rawat <ra...@gmail.com>:
> > I am wondering what will be best way to Design Layout of this Center.jsp
> .
>
> I just cannot understand what is your doubt...
> From my POV the links in your left part and in your center part work
> the same way: they both link to a new page, where the center part
> changes.
> So probably you have to design them in the same way.
>
> Antonio
>

Re: [Tile2] Help in Page Layout Design using Tiles2

Posted by Antonio Petrelli <an...@gmail.com>.
2007/11/12, Raghuveer Rawat <ra...@gmail.com>:
> I am wondering what will be best way to Design Layout of this Center.jsp.

I just cannot understand what is your doubt...
>From my POV the links in your left part and in your center part work
the same way: they both link to a new page, where the center part
changes.
So probably you have to design them in the same way.

Antonio