Re: Launching actions

Laurie Harper <[email protected]> Thu, 12 Dec 2002 21:02:33 -0500
Newsgroups gmane.comp.java.jpublish.devel
Message-ID <BA1EA9E9.1D32D%[email protected]>
Do you mean that an 'action' parameter automatically triggers the named
action to be run? In which case what should the parameter value be, the
action name from jpublish.xml?

Or would I need a global action to provide that functionality? In which case
how do I lookup and invoke an action from another action?

L.

[PS, sorry for the slow reply, I was watching for something on the list, not
realising I'd mis-typed the address!]

On 12/5/02 10:47 PM, "Anthony Eden" <[email protected]> wrote:

> There are two possible approaches:
> 
> 1.) Use a pre-evaluation action which executes the action and does a
> redirect.
> 2.) Link back to the list view page and either add an action to the URL
> with an action= parameter or execute the action every time and check for
> a particular request parameter value.
> 
> P.S. If you want to send a message to the JPublish developer list then
> send it to [email protected] .
> 
> Sincerely,
> Anthony Eden
> 
>> -----Original Message-----
>> From: Laurie Harper [mailto:[email protected]]
>> Sent: Thursday, December 05, 2002 10:03 PM
>> To: [email protected]
>> Subject: Launching actions
>> 
>> 
>> Is there any way I can cause an action to be run without
>> asociating it 
>> with a particular page? I'd like to be able to specify links
>> and forms 
>> which cause an action to be run before rendering the result page, but
>> the action shouldn't be run every time the page is displayed.
>> 
>> As a concrete example, consider a page with a list of order
>> items. The 
>> page has a button or link to create a new order item which
>> takes you to 
>> another page containing a form. When you submit the form, you
>> should be 
>> taken back to the original list view page, where the new
>> order item will 
>> now be included in the list.
>> 
>> On form submission, I need to execute an action to add the new order
>> item to the database or whatever. But that action shouldn't be
>> associated with the list view page, since it only makes sense
>> to execute 
>> it when the new order item form is submitted.
>> 
>> The only solution I can see is to define a page whose sole
>> purpose is to 
>> execute the action and forward to the list view. What am I missing?
>> 
>> Thanks,
>> 
>> L.
>> 
>> 
> 



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/