Roel Derksen wrote:
>
> Hi,
>
> I'm new with Turbine and I've got the following question:
> Is there a way for a Action to use the Objects of a previous Action?
>
> What I mean is this:
> public class myAction extends SecureAction
> {
> String sMyString;
IMPORTANT: This is a big no-no. Actions should not have attributes.
Modules must be threadsafe, just as a servlet should be.
>
> public void doSomething(RunData data, Context context)
> {
> sMyString = new String("TuRbInE");
> }
> public void doSomethingelse(RunData data, Context context)
> {
> if (sMyString.length() != 0)
> System.out.println(sMyString);
> }
> }
>
> When I doSomethingelse I get a NullPointerExeption on sMyString.length(). So
> I guess sMyString isn't a allocated String at that time.
> Is there a way to do this ?
>
> I know you can use Context to pass data to the Template and that way pass it
> to another Action. But this is only useful for simple strings, not for
> Objects.
>
> Greetings Roel Derksen
>
> ---------------------------------------------------------------------
> 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]