You can attach Controller to the tiles .. You can very well attach a
controller to the main layout .. so I guess it becomes Model 2 .. :)) I may
be wrong also ..But that solves your purpose ..
If you have a Menu driven site and all the links are accesed through links
then its becomes too cumbersome to add an entry in both the files
(struts-config and tiles-config) ..

Any thoughts ??? 


-----Original Message-----
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:43 PM
To: 'Struts Users Mailing List'
Subject: RE: Re[2]: Forwarding to a tile definition



A link to a tiles def is like linking to a JSP.  This is Model 1 and not
Model 2 architecture.  Someday, you will want something to occur (like a
security check or something) before every page is served up and you are
going to have to go back to all your links and rewrite them because JSPs are
calling JSPs.  It is not good.

I don't understand what the problem is.  You add one element to your struts
config and the problem is solved.

So instead of <a href="doc.homepage">Home</a>  then you would have
<a href="/linkHome.do">Home</a> by adding this:

    <action    path="/linkHome"
            parameter="doc.homepage"
            type="org.apache.struts.actions.ForwardAction">
    </action>

So everything is still going through your controller. Later on if you have
to load up personalized info on the home page then you create a new action,
say, named PrepHome.java and simply change your action mapping to be 

    <action    path="/linkHome"
            parameter="doc.homepage"
            type="my.PrepHome"
          ...
          >
    </action>


Am I missing something?



-----Original Message-----
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 12, 2003 10:11 AM
To: Struts Users Mailing List
Subject: RE: Re[2]: Forwarding to a tile definition

+1 .. I too was wandering .. 
I guess Probably because Tiles is just treated as a plugin .. and not really
part of Struts 

-----Original Message-----
From: Davidson, Glenn [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 7:23 PM
To: 'Struts Users Mailing List'
Subject: RE: Re[2]: Forwarding to a tile definition


To the designers of Struts:
Why not allow a link:forward to forward directly to a tiles definition?
It
appears that we have to forward to an action then have the action
forward to
the tile definition. Any thoughts?

Glenn

-----Original Message-----
From: Dirk Markert [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 9:10 AM
To: Struts Users Mailing List
Subject: Re[2]: Forwarding to a tile definition


Hallo Greg,

consider again your url

"http://www.mymacine.com/myapp/my.tile.def";

which you get by using html tags. What else would you expect?
What should be in your server created html file? In my opinion the
url is indeed correct.

If your browser sends a request to the server the server is configured
to handle *.do and *.jsp. How is the server supposed to know how to
handle *.def?

Regards,
Dirk  

***************************************************************


GFM> On Jun 12, 2003, <[EMAIL PROTECTED]>  wrote:

GFM>  |Have u checked the definition?
GFM>  |Because when you do a forward, the definition is searched for
..And
in your c
GFM>  | ase, it seems that it is not finding the definition.

GFM> I know it is finding the forward - that is how it is getting the
GFM> literal text "my.tile.def".  And, I confirmed that literal text is
the
GFM> same in the forward as it is in the tiles-defs.xml file.

GFM> Now, Dirk recommended to use actions.  I'll give that a try again.
I
GFM> had it that way before, but I don't remember what the problem was -
it
GFM> could be that the html:link action= wasn't working which would also
GFM> suck (I should use action= for actions and forward= for forwards,
GFM> right?).

GFM> Thanks,

GFM> /greg

GFM> --
GFM> Gregory F. March    -=-    http://www.gfm.net:81/~march    -=-
AIM:GfmNet

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


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

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

Reply via email to