Persistence is needed because form is submitted in one request (that send redirect in response) and rendered in second request.
If you do not want to persist data for form you should
1. turn off redirect after post and process submission in one request
public class WebModule {
public static void contributeApplicationDefaults(MappedConfiguration<String, String> configuration) { configuration.add(TapestryConstants.SUPPRESS_REDIRECT_FROM_ACTION_REQUESTS_SYMBOL, "true");
}
}

2. Disallow form to persist ValidationTracker (if you need this).

in .tml

<form t:type="form" tracket="tracker">
...
</form>

in .java

@Property(write = false)
private ValidationTracker tracker;

osamuo пишет:
Register.tml: let a user register a value
Verify.tml: let a user verify a input


Register.tml
---------------------------------------
<form t:type="Form" t:id="form">
  <input t:type="TextField" t:value="someValue" />
  <input type="submit" />
</form>
---------------------------------------

Register.java
---------------------------------------
public class Register{
@Property
 private String someValue;
@InjectPage
 private Verify verifyPage;
public Object onSuccessFromForm()
   verifyPage.setSomeValue( someValue );
return verifyPage;
 }
}



Verify.tml
-------------------------------------
<form t:type="Form" t:id="form">
  <input t:type="TextField" t:value="someValue" />
  <input type="submit" />
</form>
-------------------------------------

Verify.java
-------------------------------------
public class Verify{
@Persist( "session" ) <== I don't want to store this into the session.
  private String someValue;
public String getSomeValue(){
    return someValue;
  }
public void setSomeValue( String someValue ){
    this.someValue = someValue;
  }
public Object onSuccessFromForm(){
    ...
  }
}
-------------------------------------


Is there any way to submit "someValue" in Verify.tml without using @Persist(
"session" )?
And why don't T5 support t:type="Hidden"?

Thanks,
Osamuo






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

Reply via email to