Hey Mark,

I too will be interested to see what the more experienced folks have to say. I settled for using messages, at least in some cases:

Action:

  data.setMessage("myMessageType=" + dataToPass);
  TemplateScreen.setTemplate(data, "MyScreen.vm");

Screen:
  if (data.hasMessage()) {
    String msg = data.getMessage();
    // use StringTokenizer to check and parse the data
    // if appropriate, add something to context

Flexible, perhaps lame. Seems cheap and easy though, and the scope is much more limited than set/getTemp.


At 12:05 PM -0500 3/5/03, Mark Lybarger wrote:
i recently started to use $data.getUser().getTemp("tempObject") in my
velocity template, and data.getUser().setTemp("tempObject") in my action
classes.


Are there any drawbacks to using this approach of putting data out there for
the templates to use?  this seems _much_ easier than using our former
approach of making each action class put data into the context that the next
form will need, so there's got to be a drawback somewhere.


Mark Lybarger [EMAIL PROTECTED] CBC Companies 614.442.3741

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 2/25/2003


--------------------------------------------------------------------- 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]



Reply via email to