Hi all,
I am running into the occasional transformation exception, which is easy
enough to correct with some minor refactoring... but just for interest
sake take a look at this code snippet:
/** My data object used in a beanform */
@Persist
private BeanFormData myBeanFormObj_ = new BeanFormData();
/**
* The begin render method.
*/
@BeginRender
public void beginRender() {
createUserData();
}
private void createUserData(){
try {
//some initialization code for the form
myBeanFormObj_.setSelectedTitle(getTitle());
myBeanFormObj_.setFullName(getFirstName() + " " +
getLastName());
myBeanFormObj_.setEmail(getEmail());
} catch (Exception e) {
//error handling here
}
}
This all works just fine, but occasionaly when I inline the code instead
in BeginRender, I get a transformation exception and have to refactor my
code... its not something I can pinpoint exactly, but it seems somehow
that objects accessible to the beanform/component in the page come into
conflict with my initialization code for these objects... somehow the
error is averted when using a call to private method ? well I hope this
example is clear enough and can maybe help someone... thanks for all the
hard work on Tapestry, I'm really starting to love this framework.
Cheers,
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]