Hi Tom,

How about using properties for that? In my model 2 environment you could
do something like..

<OPERATION
        NAME = "ApproveTransaction"
        CLASSNAME = "es.uib.checkCredit"
        UI_PATH = "/defaultTransaction.jsp"
>
        <PROPERTY NAME="notEnoughCreditURL" VALUE="/needsMoreMoney.jsp" />
        <PROPERTY NAME="transactionApprovedURL" VALUE="/gimmeMoney.jsp" />
</OPERATION>

Then your action classes (I call them operations) could use this
properties to control the workflow(using this.getProperty()). This way
you can have the workflow "in-coded" but not "hardcoded" which is better
for maintenance ;). Of course, your model 2 approach has to support this
kind of things but we've done it and it's not that hard to introduce and
it's proven to be quite useful. Oh, BTW, we also support the syntax
<OPERATION
        NAME = "ApproveTransaction"
        CLASSNAME = "es.uib.checkCredit"
        UI_PATH = "/defaultTransaction.jsp"
        PROPERTIES_FILE="/where/ever/myAction.properties"
>
</OPERATION>
where "myAction.properties" would be a usual java properties file. This
can also be quite helpful if you want to control/modify/share the
properties as a whole.
I hope this helps,
Dan
PD: I understand your unsubscribing for the list as I might happen to do
the same(or swap to digest mode). There's too much noise and not that
much time in my agenda :).
-------------------------------------------
Daniel Lopez Janariz ([EMAIL PROTECTED])
Web Services
Computer Center
Balearic Islands University
-------------------------------------------


Tom Eugelink wrote:
>
> > But hardcoding workflow in any kind of java class (actions,
> > beans, even special
> > classes just dedicated to that)
> > .... I wouldn't recommend it for mantainability's sake.
> > Just another 2c,
> > Dan
>
> Ah. Thanks for the insight. The reason why I'm focused on the hardcoded
> links is that I need to do financial calculations in my webpage, where the
> workflow is closely related to the calculation logic. In a certain
> calculation a page needs to be filled out, in another it doesn't, all
> depending on outcome of the on going calculation. Hence the preference for
> in code links.
>
> Tom
>
> BTW: I'm unsubscribing from the list, it consumes to much time.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to