Re: Conceptual help with model response inputs, outputs, and commands

"Michael Nash JGlobal.com" <[email protected]>
Newsgroups gmane.comp.java.keel.user
Organization JGlobal
Message-ID <20040407152412.4db479c5@jglobal>
Justin:

I think you've got the idea of Inputs and Outputs down about right. Don't forget they can be "nested", making an XML-like tree structure - this is handy for repating sections (like a multi-row area).

A Command is essentially the "trigger" to submit a form, proceeding on to the next action. More than one command in a response indicates the user has a choice of where to go next. They can be rendered on the page as either buttons or links (or icons, etc). They define the "flow" of a Model and the subsequent model's available for the user to choose.

An example might be:

1. PromptForSomeDataModel: Contains a command where model="SaveSomeData"
2. User clicks the command's button
3. SaveSomeData invoked, perhaps in a Sequence that goes directly on to the "ShowTheReport" model....

That kind of thing...

There is also a more sophisticated workflow application in Keel, which abstracts this kind of flow out of the models altogether, but I'd start with Commands as above, then check out app-workflow for a more advanced approach.

HTH!

Mike

On Wed, 7 Apr 2004 09:39:46 -0700
"Justin Makeig" <[email protected]> wrote:

> I'm having a little trouble figuring out how to correctly use inputs, outputs, and commands in a model's response object. From what I've seen in app-hoj and app-poll, inputs provide a hook so that keel knows which data to expect in a request from the generated page. Outputs, allow read-only data to be passed to the UI for display. Commands are still a little hazy to me. It looks like they're used to call other models. They are added to a ModelResponse, but I don't understand how and when one should use a command. Any help would be much appreciated.
> 
> - Justin
> 
> --
> ThatOne Company
> http://www.thatone.com/
> 
> _______________________________________________
> User mailing list
> [email protected]
> http://lists.keelframework.org/listinfo.cgi/user-keelframework.org


-- 
Michael Nash

JGlobal Ltd 
Next-Generation Web Application Development and Open Source Support
http://www.jglobal.com

Bahamas Commerce and Trade
Offshore eCommerce Hosting and Business Services
http://www.bahamascommerce.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.