Craig,

This is in response to your comment on Bug#36439 (custom DTD's.)  You
asked me to outline some of the "non standard" things I was doing with
dialog.  We have a few different things that we have added to Shale
and I'm happy to outline them in case they are useful for Shale or
other developers who use Shale.

One of these is a LookupDialog that allows you to define a dialog as a
complete subset of another dialog with a defined start and end point. 
Here's how a trivial example ...

<dialog name="Contact" start="firstName">
     <view name="firstName" viewId="/firstName.jsp">
          <transition outcome="next" target="lastName"/>
     </view>
     <view name="lastName" viewId="/lastName.jsp"/>
          <transition outcome="prev" target="firstName"/>
          <transition outcome="next" target="address"/>
     </view>
     <view name="address" viewId="/address.jsp"/>
          <transition outcome="prev" target="lastName"/>
     </view>
</dialog>

Suppose you had another dialog that required just name information
(first two screens) and you wanted to reuse the first and last name
screens.  You would have to break up the original dialog into pieces
and then piece together your two dialogs using <subdialog>.

<subdialog> works fine when you want to mix and match pieces of
dialogs but if you would like to reuse a portion of an existing dialog
this gets tedious.  In our application we have some ten step dialogs
for creating a new "document" which populates a bunch of fields on a
form.  You can then go back and edit specific fields.  Using the
standard approach this requires 10 different dialogs and then a slew
of <subdialogs>.

Instead we have LookupDialog which allows you to do the following:

<dialog name="Just Name" dialogName="Contact" start="firstName"
stop="lastName" className="LookupDialog"/>

One nice thing is that the original ten step dialog is one nice big
chunk 'o XML without any of the <subdialogs> cluttering things up. 
Don't get me wrong, we use subdialog also, but for this type of
usecase, LookupDialog is superior.

What do you think?  I can show you the patch if you're interested but
it will take a little work to refactor to org.apache.shale, etc. so I
won't bother unless there's interest.

sean

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to