Yo may use a customized requestProcessor that check for this preview attribute (or any other thing) and put a flag in request scope. Any other controller/view element can then check this flag to change it's behaviour.

Nico.

Nick Sophinos a écrit :

Given that we are talking about an MVC framework, that kind of controlling
input should be processed in the controller. In other words, it would be
best to
request.getParameter("preview") in the action class.

- Nick

On 11/18/05, Jesper Preuss <[EMAIL PROTECTED]> wrote:
My homepage is loaded with struts, tiles.
Because I use the url parameter preview
(http://localhost/page/Page1.do?preview=true), this is inserted in all
the links and forms actions (links).
I use the request.getParameter("preview") in the JSP page to test if it
should load the special preview stuff. And no it's not only css, also
special stuff from the database.

I have a problem: Tiles template page inserts some jsp pages. And these
jsp pages can't catch the request.getParameter("preview") parameter.
That's why it's a Struts related problem.

And I also thought that Struts have had this problem before. Different
pages with the same session.


-----Oprindelig meddelelse-----
Fra: Michael Jouravlev [mailto:[EMAIL PROTECTED]
Sendt: 17. november 2005 21:52
Til: Struts Users Mailing List
Emne: Re: How to make a preview

On 11/17/05, Jesper Preuss <[EMAIL PROTECTED]> wrote:
Hi !

Hi have a web project using struts.

My homepage have an administrator module. Where you can change
pictures,
CSS/colors, page texts and more.
Now you can save Submit->"save" a form. Here you have saved all the
new
CSS colors permanent. And it will show for all the users of the page.

What I would like to do is, add an button Submit->"preview" to this
form. And when you 'preview' it will come with an pop-window. And here
you can browse the whole web-site, with the preview values.

You should be able to close the window. The original browser windows
session should not be affected by the preview values.

It is one session and two browsers, showing two different color
schemes.
How do you implement this in Struts.
Non-Struts related. Search for CSS style switcher.

Michael.

---------------------------------------------------------------------
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]




This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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

Reply via email to