use data.setTarget("foo.vm")
john mcnally
Amanda Edwards wrote:
>
> Hi Folks,
>
> Still trying to get to grips with Turbine!
>
> Anyway the problem I'm having is that I call my action class, which then
> parses an xml file, and depending on the element that comes back from
> the xml file I need to display a certain screen.
>
> Ok so in the action class I think I need to use setTemplate(RunDate
> data, "SomeScreen.vm");
>
> But the problem is that when the screen is displayed it contains no form
> field values, i.e. the java class that sits behind the screen doesn't
> seem to be called to populate the screen.
>
> Maybe I should be doing this differently?
>
> My html looks like the following
>
> <form method="POST" name="form1"
> action="$link.setPage("GenericQueue.vm").setAction("GenericQueueRecords"
> )">
>
> #if ($data.Parameters.nextTemplate)
> <input type="text" name="nextTemplate"
> value="$data.Parameters.nextTemplate">
> else
> <input type="text" name="nextTemplate"
> value="EnterNotices.vm">
> end
>
>
> My java class currently look like:
>
> public class GenericQueueRecords extends SecureAction
> {
> public void doGetrecs( RunData data, Context context ) throws Exception
> {
> boolean template = getValueFromXML();
>
> if (template)
> {
> setTemplate(data, "AcCabinForm.vm");
> }
> else
> {
> setTemplate(data, "AcCabin.vm");
> }
> }
> }
>
> Any help would be appreciated.
> _______________________________
> Amanda Edwards
> Aircraft Management Technologies
> p: +353 1 845 7254
> f: +353 1 806 1025
> e: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
> w:
> <outbind://8-000000009FA5961FE368094292D08BEB69BD89D70700E51C581E6A4B704
> 19EE95ECAF247F88700000000F3410000E51C581E6A4B70419EE95ECAF247F8870000000
> 0F57F0000/www.airmantech.com> www.airmantech.com
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>