Re: Tiles 2 woes

2007-05-03 Thread stanlick

stack = (ValueStack) tilesContext.getRequestScope().get(
ServletActionContext.STRUTS_VALUESTACK_KEY);

works from within the Tiles controller!  Now then, stack.getRoot() returns a
CompoundRoot which appears to be a Collection.  Is there a way to know which
element the Action is in?  It appears to be in the zero element, but I'd
like to be certain of this.  Too bad it isn't keyed!

On 5/2/07, Dave Newton [EMAIL PROTECTED] wrote:


--- [EMAIL PROTECTED] wrote:
 In short... workflow.

Oh. I just know about the Tiles/OGNL stuff :)

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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





--
Scott
[EMAIL PROTECTED]


Re: Tiles 2 woes

2007-05-03 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
 stack = (ValueStack)
 tilesContext.getRequestScope().get(
 ServletActionContext.STRUTS_VALUESTACK_KEY);
 
 works from within the Tiles controller!

Yeah, that's why I posted it :/

 It appears to be in the zero element, but I'd
 like to be certain of this.  

AFAIK this guaranteed; that's how all the S2 tags work
without having to explicitly state which stack value
you're referencing.

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Tiles 2 woes

2007-05-02 Thread stanlick

Thanks Dave --

Perhaps if I explain this in a different context we can arrive at the
optimum solution.  To begin, I am writing a generic CRUD where all my
results are complex tiles pages.  I have a single Action that handles each
of the CRUD user gestures as follows:

   action name=course_* method={1} class=course
   result name=input  type=tiles{1}Course.page/result
   result name=list type=tiles{1}Course.page/result
   result name=addtype=tiles{1}Course.page/result
   result name=show  type=tiles{1}Course.page/result
   result name=edit
type=tiles{1}Course.page/result
   result name=destroy   type=tiles{1}Course.page/result

   /action

After trying several techniques to prepare the tiles using S2 and falling
short, I then shifted my concentration to the Tiles ViewPreparer to perform
the tiles setup.  From that vantage point, is was even worse!  Actions work
with beans/OGNL in a custom tag friendly way; tiles does not.  The
ViewPreparer works fine for stashing collections of beans in the request
scope and then manually working them into the JSP.  What I nearly have
working is the attached workflow.

Examples to better understand graphic

hyperlink=course_add
method=add() in CourseAction
result=add from add() in CourseAction
tile=addCourse.page
tile form action=course_save() in CourseAction
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Tiles 2 woes

2007-05-02 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
 Actions work with beans/OGNL in a custom tag
friendly
 way; tiles does not.  The ViewPreparer works fine
for
 stashing collections of beans in the request
 scope and then manually working them into the JSP. 

I don't think the list supports attachments; at least
I didn't get anything.

What I'm saying, though, is that you can put anything
you want onto the OGNL stack from within a Tiles view
preparer (for my test I extended whatever that base
class w/ the execute(...) method) and access them
through the S2 tags. 

I tested both placing named objects on the stack via
set(ognlExpression, object) and push(object).

What specifically isn't working for you?

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Tiles 2 woes

2007-05-02 Thread stanlick

In short... workflow. I am trying to leverage XML validation, wildcards,
tiles, and a Spring injected Action.  Also, I'm trying to wire the results
in the action mapping in such a way that I am not recreating the wheel each
time I need another CRUD.  It just seems like some of the parts within this
equation are working against other parts.  I could easily code this using
verbose configuration if I were not concerned with duplicating effort for
the next CRUD.

On 5/2/07, Dave Newton [EMAIL PROTECTED] wrote:


--- [EMAIL PROTECTED] wrote:
 Actions work with beans/OGNL in a custom tag
friendly
 way; tiles does not.  The ViewPreparer works fine
for
 stashing collections of beans in the request
 scope and then manually working them into the JSP.

I don't think the list supports attachments; at least
I didn't get anything.

What I'm saying, though, is that you can put anything
you want onto the OGNL stack from within a Tiles view
preparer (for my test I extended whatever that base
class w/ the execute(...) method) and access them
through the S2 tags.

I tested both placing named objects on the stack via
set(ognlExpression, object) and push(object).

What specifically isn't working for you?

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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





--
Scott
[EMAIL PROTECTED]


Re: Tiles 2 woes

2007-05-02 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
 In short... workflow. 

Oh. I just know about the Tiles/OGNL stuff :)

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Tiles 2 woes

2007-05-01 Thread stanlick

Antonio --

Does the ViewPreparer (aka Tiles Controller) has access to the OGNL stack?
I am trying to figure out a way to push beans on the root of the tree (like
S2 does) so the S2 custom tags will implicitly link up with them from my
page parts.  The only thing I have been able to figure out so far is how to
attach the tiles controller generated beans to the #request object which
results in messy jsp code.



Scott


On 4/12/07, Antonio Petrelli [EMAIL PROTECTED] wrote:


2007/4/12, [EMAIL PROTECTED] [EMAIL PROTECTED]:
 Thanks Antonio.  This is what I decided after searching through the
Tiles
 jar for prepare.  Can you tell me if Tiles2 is documented somewhere.

Documentation is on the way, since we were busy preparing a release
(and having Easter holidays :-) ) it never came out, but I hope it is
a question of some weeks.
The official Tiles site is:
http://tiles.apache.org/


 Also, is there a guide that explains the required changes when migrating
 Tiles1 to Tiles2?

I am working on it right now.

  This looks like some really nice work and I'm happy to
 see that Tiles has remained in lockstep with Struts.  I have used Tiles
for
 years and have always thought it was one of the greatest strengths of
 Struts.  In fact, most developers around here don't even view them as
being
 unrelated.  This is probably why I posted in the Struts area.

I assume that you are not alone, there are still some Struts pages
that refer to Tiles 2 as a sandbox project, and Struts-Tiles is
still there, though it seems not to be supported anymore.


 Sorry about that,

Don't be sorry, you were in the *right* mailing list in your first
questions, but then they became Tiles-related and not Struts-related.

Anyway stay tuned for a release of Tiles 2 very soon.

Antonio

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





--
Scott
[EMAIL PROTECTED]


Re: Tiles 2 woes

2007-05-01 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
 Antonio --

Not directed towards me so I'm somewhat hesitant to
answer given responses in the past, but:

./views/jsp/TagUtils.java:
ValueStack stack = (ValueStack) 
req.getAttribute(ServletActionContext.STRUTS_VALUESTACK_KEY);

Perhaps the stack is accessible from within the
request, but I cannot test this at the moment.

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Tiles 2 woes

2007-05-01 Thread Dave Newton
For the sake of completeness, this appears to work
fine.

I can access values using the S2 tags from ValueStack
from the tile's JSP, setting the values via either
setValue() or push().

That said, given s:action.../ I'm not sure I see a
huge advantage to doing so; I was thinking about this
several months ago and was unsure if the (slight)
extra work to do this in a preparer was really worth
it.

Does anybody have any thoughts regarding the value of
Tiles view preparers in an S2 environment? To me
(right now, at least) it seems like extra work,
another API to deal with, (potential) synchronization
issues, etc., since I already have a lot of the
functionality built-in to S2.

Thanks,
Dave

--- Dave Newton [EMAIL PROTECTED] wrote:
 --- [EMAIL PROTECTED] wrote:
  Antonio --
 
 Not directed towards me so I'm somewhat hesitant to
 answer given responses in the past, but:
 
 ./views/jsp/TagUtils.java:
 ValueStack stack = (ValueStack) 

req.getAttribute(ServletActionContext.STRUTS_VALUESTACK_KEY);
 
 Perhaps the stack is accessible from within the
 request, but I cannot test this at the moment.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Tiles 2 woes

2007-04-12 Thread Antonio Petrelli

2007/4/11, [EMAIL PROTECTED] [EMAIL PROTECTED]:

Also what supersedes the controllerClass tag?


preparer attribute, and it must implement the ViewPreparer interface.
Anyway this kind of question should be asked in the Tiles mailing list:
http://tiles.apache.org/mail.html

Antonio

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



Re: Tiles 2 woes

2007-04-12 Thread stanlick

Thanks Antonio.  This is what I decided after searching through the Tiles
jar for prepare.  Can you tell me if Tiles2 is documented somewhere.
Also, is there a guide that explains the required changes when migrating
Tiles1 to Tiles2?  This looks like some really nice work and I'm happy to
see that Tiles has remained in lockstep with Struts.  I have used Tiles for
years and have always thought it was one of the greatest strengths of
Struts.  In fact, most developers around here don't even view them as being
unrelated.  This is probably why I posted in the Struts area.

Sorry about that,
Scott


On 4/12/07, Antonio Petrelli [EMAIL PROTECTED] wrote:


2007/4/11, [EMAIL PROTECTED] [EMAIL PROTECTED]:
 Also what supersedes the controllerClass tag?

preparer attribute, and it must implement the ViewPreparer interface.
Anyway this kind of question should be asked in the Tiles mailing list:
http://tiles.apache.org/mail.html

Antonio

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





--
Scott
[EMAIL PROTECTED]


Re: Tiles 2 woes

2007-04-12 Thread Antonio Petrelli

2007/4/12, [EMAIL PROTECTED] [EMAIL PROTECTED]:

Thanks Antonio.  This is what I decided after searching through the Tiles
jar for prepare.  Can you tell me if Tiles2 is documented somewhere.


Documentation is on the way, since we were busy preparing a release
(and having Easter holidays :-) ) it never came out, but I hope it is
a question of some weeks.
The official Tiles site is:
http://tiles.apache.org/



Also, is there a guide that explains the required changes when migrating
Tiles1 to Tiles2?


I am working on it right now.


 This looks like some really nice work and I'm happy to
see that Tiles has remained in lockstep with Struts.  I have used Tiles for
years and have always thought it was one of the greatest strengths of
Struts.  In fact, most developers around here don't even view them as being
unrelated.  This is probably why I posted in the Struts area.


I assume that you are not alone, there are still some Struts pages
that refer to Tiles 2 as a sandbox project, and Struts-Tiles is
still there, though it seems not to be supported anymore.



Sorry about that,


Don't be sorry, you were in the *right* mailing list in your first
questions, but then they became Tiles-related and not Struts-related.

Anyway stay tuned for a release of Tiles 2 very soon.

Antonio

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



Re: Tiles 2 woes

2007-04-11 Thread Torsten Römer
I was recently doing the same and what gave me a headache was that even
though my IDE complains about it, it has to be

definition name=errorTiles extends=homeTiles
put name=body value=/test/error.jsp/
/definition

rather than

definition name=errorTiles extends=homeTiles
put-attribute name=body value=/test/error.jsp/
/definition

which gave me a

11-Apr-2007 17:42:15 org.apache.tiles.impl.BasicTilesContainer render
SEVERE: Error rendering tile

So maybe it's that or something similar?

Torsten


[EMAIL PROTECTED] wrote:
 I'm trying to migrate a S1 web app to S2.  Most things are working with the
 exception of Tiles.  Here is the list of things I did in case someone might
 detect a glitch;
 
 
   1. Had to download commons-digester-1.8.jar because it was not
   included in \struts-2.0.6\lib
   2. Added the three struts tiles jars to my project (plugin, core, api)
   3. Added org.apache.struts2.tiles.StrutsTilesListener to web.xml
   4. Modified struts package to extend tiles-default
   5. Copied my tiles.xml
   6. Copied my jsp files
 
 When I make an HTTPRequest to my  struts action it correctly makes the
 request of the result type tiles but I receive the following error:
 
 08:58:33,459 ERROR BasicTilesContainer:401 - Error rendering tile
 
 I have double checked all the names and file locations and this message
 doesn't give me much to go by!  After reviewing
 http://struts.apache.org/2.x/docs/tiles-plugin.html it appears the tiles
 tag
 names have been changed so I updated them accordingly.  Any clues before I
 jump?
 

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



Re: Tiles 2 woes

2007-04-11 Thread Antonio Petrelli

2007/4/11, [EMAIL PROTECTED] [EMAIL PROTECTED]:
After reviewing

http://struts.apache.org/2.x/docs/tiles-plugin.html it appears the tiles tag
names have been changed so I updated them accordingly.  Any clues before I
jump?


Tiles 2 is a complete rewrite of Struts-Tiles, we tried to clean up
API, taglibs and DTD for Tiles definitions files.
So... on what floor is your cubicle? :-)

Antonio

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



RE: Tiles 2 woes

2007-04-11 Thread Hartrich, James CTR USTRANSCOM J6

Layout.jsp  
%@ taglib prefix=tiles
uri=http://struts.apache.org/tags-tiles; %
tiles:insertAttribute name=bar/

Tiles.xml
definition name=foo template=/Layout.jsp
put name=bar value=/bar.jsp/
/definition

Hope this helps.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 11, 2007 10:12 AM
To: Struts Users Mailing List
Subject: Tiles 2 woes

I'm trying to migrate a S1 web app to S2.  Most things are working with
the
exception of Tiles.  Here is the list of things I did in case someone
might
detect a glitch;


   1. Had to download commons-digester-1.8.jar because it was not
   included in \struts-2.0.6\lib
   2. Added the three struts tiles jars to my project (plugin, core,
api)
   3. Added org.apache.struts2.tiles.StrutsTilesListener to web.xml
   4. Modified struts package to extend tiles-default
   5. Copied my tiles.xml
   6. Copied my jsp files

When I make an HTTPRequest to my  struts action it correctly makes the
request of the result type tiles but I receive the following error:

08:58:33,459 ERROR BasicTilesContainer:401 - Error rendering tile

I have double checked all the names and file locations and this message
doesn't give me much to go by!  After reviewing
http://struts.apache.org/2.x/docs/tiles-plugin.html it appears the tiles
tag
names have been changed so I updated them accordingly.  Any clues before
I
jump?

-- 
Scott
[EMAIL PROTECTED]

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



Re: Tiles 2 woes

2007-04-11 Thread stanlick

I'm starting to realize this!  I had a nice S1 Tiles application just die
under S2 tiles.  Should the taglib be:

http://struts.apache.org/tags-tiles or http://tiles.apache.org/tags-tiles

Also what supersedes the controllerClass tag?

Scott


Re: Tiles 2 woes

2007-04-11 Thread Torsten Römer
This one works for me:

http://tiles.apache.org/tags-tiles

Torsten


[EMAIL PROTECTED] schrieb:
 I'm starting to realize this!  I had a nice S1 Tiles application just die
 under S2 tiles.  Should the taglib be:
 
 http://struts.apache.org/tags-tiles or http://tiles.apache.org/tags-tiles
 
 Also what supersedes the controllerClass tag?
 
 Scott
 

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



Re: Tiles 2 woes

2007-04-11 Thread stanlick

Thanks Torsten --

This is what I finally got to work after snooping around in the jars.  Too
bad the online documentation shows the wrong URI!  That was my problem.

Scott

On 4/11/07, Torsten Römer [EMAIL PROTECTED] wrote:


This one works for me:

http://tiles.apache.org/tags-tiles

Torsten


[EMAIL PROTECTED] schrieb:
 I'm starting to realize this!  I had a nice S1 Tiles application just
die
 under S2 tiles.  Should the taglib be:

 http://struts.apache.org/tags-tiles or
http://tiles.apache.org/tags-tiles

 Also what supersedes the controllerClass tag?

 Scott


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





--
Scott
[EMAIL PROTECTED]