Craig McClanahan wrote the following on 9/6/2005 10:13 PM:
If you did perform both kinds of searches on the same JSP page, and
therefore had a shared prerender() method, you would indeed need conditional
logic inside prerender() that knew which scenario was being shown. You would
need to pass in knowledge of that fact somehow, just like you had to pass in
the employee id in the scenario I described.
Of course, you're going to have other conditional logic too (like, whether
or not to render the dropdown list at all). That's the complexity price you
pay for using the same JSP page to perform two distinct functions;
presumably this extra complexity is worth the benefits, or you'd have used
separate pages in the first place.
But the key principle is the 1:1 relationship between a JSP page and a
ViewController. Otherwise, you're going against the grain that the
ViewController architecture encourages.
Thanks. You helped clear that up. Unfortunately, yes, for the apps I
need to write the view often is the one that has to morph a bit - ie
different drop downs will show up based on certain types of users etc -
yet the backend action that takes place is the same. I have no problem
with the conditional logic in the prerender. I'm glad you were around to
set me straight. Appreciate it.
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]