Rahul Akolkar <[EMAIL PROTECTED]> wrote on 01/06/2006 05:07:21 PM: > On 1/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > <snip/> > > > > Actually I found that dialog-config.xml had an xml error so I guess it was > > silently not loaded. So I fixed it and now the Cancel works (yeahh!!) so I > > think at least I have gotten "into the dialog..:) My "Search" still throws > > a nasty error, but I guess I shall struggle with that awhile before I give > > up and ask you again..(:( > > > <snap/> > > Possibly rethink the corresponding outbound transition from the > SearchHome view state (separate the search and results views).
Thank you Rahul. Actually the specs are that my results appear just below my search form and I had already coded things so everything was in /search.jsp (I used rendered attributes to render results if present). However I guess what Shale requires is for the ids (names) to be different (and never mind what those names map to). So that's what i did: <dialog name="Search Contacts" start="Search Home"> <view name="Search Home" viewId="/search.jsp"> <transition outcome="ContactListSuccess" target="Contact List"/> </view> <view name="Contact List" viewId="/search.jsp"> </view> <end name="Home" viewId="/worklist.jsp"> </end> </dialog> This worked for my *first* search: my searchBean.find() returns " ContactListSuccess" and everything is hunky dory. Sweet. *However*, since my search form is visble above my results, I got a Faces error when I searched again! And the error made sense too (;) since I was in the "ContactListSuccess" state (after the first successful search) and I was now transitioning to "ContactSearchSuccess" again due to the second search, which is not a legal outcome according to the dialog. So I moved the <transition outcome="ContactListSuccess" target="Contact List"/> up so it was a common transition (instead of adding it twice) and then I no longer got the error. Furthermore, my menu bar, which is always visible and which has a link to dialog:Search Contacts also is always clickable. Thus I also need a common transition for outcome "Search Contacts". So my dialog now looks like this: <dialog name="Search Contacts" start="Search Home"> <transition outcome="cancel" target="Home"/> <transition outcome="ContactListSuccess" target="Contact List"/> <transition outcome="Search Contacts" target="Home"/> <view name="Search Home" viewId="/search.jsp"> </view> <view name="Contact List" viewId="/search.jsp"> </view> <end name="Home" viewId="/worklist.jsp"> </end> </dialog> I do have a few more transitions which I have omitted (which are not common), but it really seems to me that by making so many of the transitions "common", I am not utilizing what Shale can give me via dialogs. Is this correct? Or is this what i have to live with since my specs dictate I show the search form above my results and I always have the menu bar visible? I get the feeling I may be missing something important.. > > -Rahul Once again thank you for your time and patience! Geeta