RE: modify search form on result page?
RE: modify search form on result page?
- Subject: RE: modify search form on result page?
- From: Josh Paul <email@hidden>
- Date: Sun, 8 Aug 2004 05:23:11 -0700
Although I may not be understanding your problem completely, couldn't
you create your InitialSearch as a component (instead of a page) and
re-use it? You could add the appropriate bindings and possibly add a
"pageNameForSubmitAction" binding which would take a String
representing the page to be returned after Submit is clicked.
Now though I have a new problem.
I have two pages in my situation;
1) InitialSearch
and
2) SearchResults
On SearchResults I have on the sidebar the search criteria in a WOForm
that I want the user to be able to modify their query and resubmit
without having to back to the original page. My question is how to
use the existing validation logic that I've already written in
InitialSearch. It doesn't appear that I can cause the
validateATTRIBUTE() methods to be called from another page. Is there
any way to use my existing code in InitialSearch to validate the modify
search form's data and if there is a problem redisplay InitialSearch
with it's corresponding validation error messages?
What I've tried and isn't working is in my SearchResults page to bind
the form values to the SearchCriteria object's attributes and then call
a modifySearch() action that sets the required searchCriteria object
needed for the form like this:
public WOComponent modifySearch() {
InitialSearch nextPage = (InitialSearch)
pageWithName("InitialSearch");
//searchCriteria is an instance variable of SearchResults
nextPage.setSearchCriteria(searchCriteria);
return nextPage.goSearchForStuff();
}
but this isn't working because the NSValidation methods aren't being
fired (I'm guessing they're tied to the submit action in some way).
Is there a way to do this? I'm probably going about this the wrong
way.
THanks
Mike
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.