Hi Randy,
> One final question, is there any way to invoke the
> requestool.get() when
> the form is submitted ? This would eliminate the requirement for a
> second template.
> Would something like this work ?
> <form method="post"
> action=$link.setPage("TestPullResult.vm").setAction("$requesto
> ol.getData()")">
I would just pass a conditional parameter as query variable, path info or
form field and then check for that value at the top of the template.
Modified TestPullResult.vm...
#*
* If the Invoke does not exist
* or is false $requestool.getData() will not
* be invoked.
*#
#if($data.Parameters.Invoke)
$requestool.getData()
#end
<form method="post"
action=$link.setPage("TestPullResult.vm").setPathInfo('invoke',true)">
Scott
> -----Original Message-----
> From: Randall G. Alley [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 07, 2002 9:15 AM
> To: Turbine Users List
> Subject: Re: Extract form data directly from a Pull Tool ?
>
>
> Scott,
>
> I was able to get the request tool to extract the parameters
> and store
> the data in the session tool.
> I used one template to submit the form data, and then used
>
> <form method="post" action="$link.setPage("TestPullResult.vm")">
>
> to direct the flow to a template which called the request pull tool
> method to extract the data:
>
> $requestool.getData()
>
> This was done without any screens or actions.
>
> One final question, is there any way to invoke the
> requestool.get() when
> the form is submitted ? This would eliminate the requirement for a
> second template.
> Would something like this work ?
>
> <form method="post"
> action=$link.setPage("TestPullResult.vm").setAction("$requesto
> ol.getData()")">
>
> I don't see anything in DynamicURI that handles this.
> Couching the call
> to the request tool as an action doesn't work (predictably).
>
> Thanks again for the insight. Thanks to Slave also.
>
> Randy
>
>
>
> Weaver, Scott wrote:
>
> >Randall,
> >
> >
> >
> >>1) Could I have the request Pull Tool move the data to the
> >>session Pull
> >>
> >>
> >
> >Yes.
> >
> >You can retrieve ANY pull tool from the Context.
> >
> >Within a method in your request tool...
> >
> >Context context = TurbineVelocity.getContext(RunData);
> >
> >// "MySessionToolName" is the name you used to define the tool in
> >// TR.props
> >MySessionTool sTool = (MySessionTool)
> context.get("MySessionToolName");
> >
> >// Just my example, your mileage may vary.
> >sTool.setFormFieldValue("SomeField",
> >RunData.getParameters().getString("SomeField"));
> >
> >
> >
> >
> >
> >>2) Or have the request Pull Tool save the data to a
> >>persistent object,
> >>
> >>
> >
> >This is another valid yet more complicated approach.
> >
> >If I where you and I wanted to take this approach, I would use JCS to
> >accomplish it.
> >
> >
> >
> >>which I don't like since the object wouldn't be
> automatically cached,
> >>and managed, and so forth.
> >>
> >>
> >
> >Using JCS elimnates these issues.
> >
> >
> >I am +1 on the first approach, as it is less complicated and
> somewhat more
> >elegant than 2.
> >
> >hth,
> >Scott
> >
> >
> >
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>