Advanced Tiles

2003-04-04 Thread Jeff Caddel
After going thru Cedric's doc 
(http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf) on 
Advanced Tiles Features I came up with something that's a slight 
derivative of the example on page 15, right under where it says, 
Example of a controller inserted as an URL:.  That example shows how 
to associate a controller with a tile definition. 

The point in doing that (as far as my wee little brain can tell) is to 
try and make each tile as autonomous as possible.  Right before each 
tile loads, an action gets invoked by the framework.  This gives you a 
chance to execute business logic and prepare the request for the tile 
that's about to load.

My issue is that I need a set of related actions to execute in an order 
that I can control before any of the tiles start to render. 

An example is a split screen where there is a tree of users displayed on 
the left, and a single user displayed on the right.  This screen has 
/tree.do which preps the request for the tree, and /user.do which 
handles all the user updates.  For the tree to display correctly I need 
/user.do to execute first (even though the tile it's associated with 
renders second), so that /tree.do has the updated information when it 
gets invoked.   Here are the relevant snippets I came up with to get 
this behavior:

At the top of layout.jsp:   tiles:insert definition=user.controllers/

tiles.xml:
  definition name=user.controllers 
path=/WEB-INF/jsp/common/controller.jsp
putList name=controllers
add value=/admin/user.do/
add value=/admin/tree.do/
/putList
  /definition

controller.jsp:
tiles:importAttribute/
logic:iterate id=controller name=controllers type=java.lang.String
  tiles:insert page=%=controller% flush=false/
/logic:iterate
This combination lets me execute an arbitrary set of actions in whatever 
order I want by simply editing tiles.xml.  Is this a clever thing to be 
doing?  A phenomenally bad idea?  Is there (as there usually is) a 
simpler/different way to get this behavior?  Any and all 
thoughts/comments/suggestions are welcome! 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Advanced Tiles

2003-04-04 Thread David Graham
Another approach is to factor the setup code into a helper class and use 
that class in actions and specific Tiles controller classes.  That way you 
don't need to mess with action chaining.

David



From: Jeff Caddel [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Advanced Tiles
Date: Fri, 04 Apr 2003 11:49:11 -0700
After going thru Cedric's doc 
(http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf) on Advanced 
Tiles Features I came up with something that's a slight derivative of the 
example on page 15, right under where it says, Example of a controller 
inserted as an URL:.  That example shows how to associate a controller 
with a tile definition.

The point in doing that (as far as my wee little brain can tell) is to try 
and make each tile as autonomous as possible.  Right before each tile 
loads, an action gets invoked by the framework.  This gives you a chance to 
execute business logic and prepare the request for the tile that's about to 
load.

My issue is that I need a set of related actions to execute in an order 
that I can control before any of the tiles start to render.

An example is a split screen where there is a tree of users displayed on 
the left, and a single user displayed on the right.  This screen has 
/tree.do which preps the request for the tree, and /user.do which handles 
all the user updates.  For the tree to display correctly I need /user.do to 
execute first (even though the tile it's associated with renders second), 
so that /tree.do has the updated information when it gets invoked.   Here 
are the relevant snippets I came up with to get this behavior:

At the top of layout.jsp:   tiles:insert definition=user.controllers/

tiles.xml:
  definition name=user.controllers 
path=/WEB-INF/jsp/common/controller.jsp
putList name=controllers
add value=/admin/user.do/
add value=/admin/tree.do/
/putList
  /definition

controller.jsp:
tiles:importAttribute/
logic:iterate id=controller name=controllers type=java.lang.String
  tiles:insert page=%=controller% flush=false/
/logic:iterate
This combination lets me execute an arbitrary set of actions in whatever 
order I want by simply editing tiles.xml.  Is this a clever thing to be 
doing?  A phenomenally bad idea?  Is there (as there usually is) a 
simpler/different way to get this behavior?  Any and all 
thoughts/comments/suggestions are welcome!



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Advanced Tiles files (URGENT)

2002-09-04 Thread Heligon Sandra


Hi,

I am searching tile files with:
- a header that will contain the logo of the company, 
,a horizontal menu (with commands like Home, Admin, Logout, Help
...),
and the current date-time.
- The footer will contain the copyright, the last revision.

If someone has a such example (tiles-def.xml and corresponding JSP
pages), 
thank you to send it me it's very time-saving.


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Advanced Tiles files (URGENT)

2002-09-04 Thread Michael

Look at the files in the tutorial included in the
tiles-documentation.war.  Also there is an advanced tiles PDf file.

 -Original Message-
 From: Heligon Sandra [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, September 04, 2002 9:56 AM
 To: '[EMAIL PROTECTED]'
 Subject: Advanced Tiles files (URGENT)
 
 
 
   Hi,
 
   I am searching tile files with:
   - a header that will contain the logo of the company, 
   ,a horizontal menu (with commands like Home, Admin, 
 Logout, Help ...),
   and the current date-time.
   - The footer will contain the copyright, the last revision.
 
   If someone has a such example (tiles-def.xml and 
 corresponding JSP pages), 
   thank you to send it me it's very time-saving.
   
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Advanced Tiles files (URGENT)

2002-09-04 Thread Heligon Sandra

Thanks for your reply I deployed the tiles-documentation.war,
and I rapidly read the advanced tiles PDf file.
But I don't have a lot of time to implement my application,
that's why I would like if someone has already created a tiles
structure similar to the model described previously
(header with a logo company + horizontal menu + current date-time) .
It will allow me to save time.

-Original Message-
From: Michael [mailto:[EMAIL PROTECTED]]
Sent: 04 September 2002 10:35
To: 'Struts Users Mailing List'
Subject: RE: Advanced Tiles files (URGENT)


Look at the files in the tutorial included in the
tiles-documentation.war.  Also there is an advanced tiles PDf file.

 -Original Message-
 From: Heligon Sandra [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, September 04, 2002 9:56 AM
 To: '[EMAIL PROTECTED]'
 Subject: Advanced Tiles files (URGENT)
 
 
 
   Hi,
 
   I am searching tile files with:
   - a header that will contain the logo of the company, 
   ,a horizontal menu (with commands like Home, Admin, 
 Logout, Help ...),
   and the current date-time.
   - The footer will contain the copyright, the last revision.
 
   If someone has a such example (tiles-def.xml and 
 corresponding JSP pages), 
   thank you to send it me it's very time-saving.
   
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Advanced Tiles files (URGENT)

2002-09-04 Thread Joss Wright

Heligon,

I have some example layouts and tiles-def.xml for what you want. They are 
rewritten versions of Cedrics tutorial menus, if you have read the Tiles 
tutorial they should be fairly easy to use.

The only issue is that I use the visibility style to create drop-down menus 
which I believe is not supported in Netscape 4, but it shouldn't be 
difficult to rewrite the example to use an alternative approach.

Please email me directly if you (or anyone else) would like them. I was not 
sure if it is appropriate to send an attachment directly to this list.

Regards,

Joss







From: Heligon Sandra [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: Advanced Tiles files (URGENT)
Date: Wed, 4 Sep 2002 09:55:38 +0200


   Hi,

   I am searching tile files with:
   - a header that will contain the logo of the company,
   ,a horizontal menu (with commands like Home, Admin, Logout, Help
...),
   and the current date-time.
   - The footer will contain the copyright, the last revision.

   If someone has a such example (tiles-def.xml and corresponding JSP
pages),
   thank you to send it me it's very time-saving.


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Advanced Tiles files (URGENT)

2002-09-04 Thread Michael

The time you gain by copying someone elses tiles-defs.xml and files will
surely be lost right after because you won't understand any of the files
that you're using!  Building up the files yourself (start simple like in
the tutorial and getting more complicated) is the way to go.

Also I forgot to mention, read the struts book, chapter 14/15, which you
can find on theserverside.com.  It was the biggest help to me.

Michael

 -Original Message-
 From: Heligon Sandra [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, September 04, 2002 10:52 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Advanced Tiles files (URGENT)
 
 
 Thanks for your reply I deployed the tiles-documentation.war, 
 and I rapidly read the advanced tiles PDf file. But I don't 
 have a lot of time to implement my application, that's why I 
 would like if someone has already created a tiles structure 
 similar to the model described previously (header with a logo 
 company + horizontal menu + current date-time) . It will 
 allow me to save time.
 
 -Original Message-
 From: Michael [mailto:[EMAIL PROTECTED]]
 Sent: 04 September 2002 10:35
 To: 'Struts Users Mailing List'
 Subject: RE: Advanced Tiles files (URGENT)
 
 
 Look at the files in the tutorial included in the 
 tiles-documentation.war.  Also there is an advanced tiles PDf file.
 
  -Original Message-
  From: Heligon Sandra [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, September 04, 2002 9:56 AM
  To: '[EMAIL PROTECTED]'
  Subject: Advanced Tiles files (URGENT)
  
  
  
  Hi,
  
  I am searching tile files with:
  - a header that will contain the logo of the company, 
  ,a horizontal menu (with commands like Home, Admin,
  Logout, Help ...),
  and the current date-time.
  - The footer will contain the copyright, the last revision.
  
  If someone has a such example (tiles-def.xml and
  corresponding JSP pages), 
  thank you to send it me it's very time-saving.
  
  
  --
  To unsubscribe, e-mail:   
  mailto:struts-user- [EMAIL PROTECTED]
  For
  additional commands, 
  e-mail: mailto:[EMAIL PROTECTED]
  
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Advanced Tiles files (URGENT)

2002-09-04 Thread Joss Wright

Michael,

The files I have sent ARE example files. I suggest you look at them before 
passing comment on how they can be used or how we should learn.

Joss


From: Michael [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Advanced Tiles files (URGENT)
Date: Wed, 4 Sep 2002 11:11:31 +0200

The time you gain by copying someone elses tiles-defs.xml and files will
surely be lost right after because you won't understand any of the files
that you're using!  Building up the files yourself (start simple like in
the tutorial and getting more complicated) is the way to go.

Also I forgot to mention, read the struts book, chapter 14/15, which you
can find on theserverside.com.  It was the biggest help to me.

Michael

  -Original Message-
  From: Heligon Sandra [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, September 04, 2002 10:52 AM
  To: 'Struts Users Mailing List'
  Subject: RE: Advanced Tiles files (URGENT)
 
 
  Thanks for your reply I deployed the tiles-documentation.war,
  and I rapidly read the advanced tiles PDf file. But I don't
  have a lot of time to implement my application, that's why I
  would like if someone has already created a tiles structure
  similar to the model described previously (header with a logo
  company + horizontal menu + current date-time) . It will
  allow me to save time.
 
  -Original Message-
  From: Michael [mailto:[EMAIL PROTECTED]]
  Sent: 04 September 2002 10:35
  To: 'Struts Users Mailing List'
  Subject: RE: Advanced Tiles files (URGENT)
 
 
  Look at the files in the tutorial included in the
  tiles-documentation.war.  Also there is an advanced tiles PDf file.
 
   -Original Message-
   From: Heligon Sandra [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, September 04, 2002 9:56 AM
   To: '[EMAIL PROTECTED]'
   Subject: Advanced Tiles files (URGENT)
  
  
  
 Hi,
  
 I am searching tile files with:
 - a header that will contain the logo of the company,
 ,a horizontal menu (with commands like Home, Admin,
   Logout, Help ...),
 and the current date-time.
 - The footer will contain the copyright, the last revision.
  
 If someone has a such example (tiles-def.xml and
   corresponding JSP pages),
 thank you to send it me it's very time-saving.
  
  
   --
   To unsubscribe, e-mail:
   mailto:struts-user- [EMAIL PROTECTED]
   For
   additional commands,
   e-mail: mailto:[EMAIL PROTECTED]
  
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user- [EMAIL PROTECTED]
  For
  additional commands,
  e-mail: mailto:[EMAIL PROTECTED]
 


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]