Craig McClanahan wrote the following on 9/6/2005 9:57 PM:
ch_action}"/>
And, in the EmployeeDetails.java class (the backing bean for this page),
you'd have an action method that navigated to the right place, based on data
currently on this form:
public String search_action() {
; // A missing detail goes here -- see below
if (... this is a domestic employee ...) {
return "domesticSearch";
} else {
return "internationalSearch";
}
}
These outcome values would be fed into your navigation rules, and would
navigate to "/DomesticSearch.jsp" or "/InternationalSearch.jsp".
Now, where do you do your setup logic for a domestic search? In the
prerender() method of the DomesticSearch.java backing bean, *not* in the
prerender() method of the EmployeeDetails bean! (Same exact scenario for
international searches).
But what if you are resuing the same jsp.... I won't have
domesticSearch.jsp, InternationSearch.jsp ---- that's just crazy to make
an entire new view (even if using some includes) just to throw in maybe
one or two more fields. Especially when the logic done for doing the
search is the same regardless of the type. (Hands of VO to backend and
returns Employees).
In the above scenario you seem to be stating that I *need/should* have
two different types of bean backing the two different types of searches
(DomesticSearch.java and a InternationalSearch.java) - but this is
exactly what I'm trying to avoid - I just need a "Search.java"
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]