Steve-

You can make a base class for the 2 screens and have both of your actual screen classes extend it:

BaseDetails - has all of your common code.

ShowDetails extends BaseDetails
EditDetails extends BaseDetails

Just be sure to call super.doPerform() from you child classes.

-Brian

On Wednesday, September 17, 2003, at 04:43 AM, cctech wrote:

I'll fairly new to Turbine and Velocity, but nonetheless, I have gone
Headlong into building a complex application with a large data model.

I have been constructing screens using Velocity for both displaying
Table data and for editing it. Trouble is, I seem to create Action
Classes for both display and for edit that are both exactly the same.

E.g. ShowDetails.java for ShowDetails.vm
And  EditDetails.java for EditDetails.vm (then goes to
UpdateDetails.java)

In this case the code for the two java classes (Show, Edit) is exactly
the same except with different class names.

Is there anyway of re-using the same class for different velocity
templates?
Have I missed something simple?

Thanks,

Steve


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