cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From H.vanderLin...@MI.unimaas.nl
Subject RE: Woody + flow/action: more verbose example please
Date Fri, 26 Dec 2003 10:51:07 GMT
Hi,

Thanks for the advice. I've looked these pages over and over, but I fail to
understand how it works exactly. I really need snippets of code to see how
it works. Most importantly: how do I reference elements like widgets and
request attributes in my form.

One remark I must make (this might be a cause of my problems, so comments
are welcome): I start out with an XML describing my form, so I can't use
stuff like "<xsl:value-of select='request-attribute-syntax'>" 


More in detail what I want to accomplish:

Scenario:

1. display search form using Woody widgets
2. on submit: check to see that at least one field/widget is filled
3. pass the information entered to my connect-xsp (which connects to a
database)
4. connect-xsp returns list of items found
5. list is transformed into a form using Woody widgets
6. user selects one item
7. pass selection to connect-xsp
8. return all details of item
9. display all details
10. either store the item-id in the session (and repeat step 7-9 for each
page that displays details of this item) or store an ItemObject (= XML?) in
the session holding all details. 

I wonder if I should use flow (which is not yet clear to me) or actions?

Bye and thanks, Helma

> -----Original Message-----
> From: Danny Bols [mailto:dbols@osirion.be] 
> Sent: Friday, 26 December 2003 09:41
> To: users@cocoon.apache.org
> Subject: RE: Woody + flow/action: more verbose example please
> 
> 
> Why don't you add an output widget to your woody form and 
> fill it with the
> appropriate message from within flow.
> 
> Documentation on the output widget can be found here:
> http://wiki.cocoondev.org/Wiki.jsp?page=WoodyWidgetReference#r
> ef-WoodyWidget
> Reference-5
> 
> Cheers
> --
> Danny
> 
> > -----Original Message-----
> > From: H.vanderLinden@MI.unimaas.nl 
> [mailto:H.vanderLinden@MI.unimaas.nl]
> > Sent: vrijdag 26 december 2003 8:56
> > To: users@cocoon.apache.org
> > Subject: RE: Woody + flow/action: more verbose example please
> >
> >
> > O great. Could you give me some details as to where I can find it?
> >
> > Bye, Helma
> >
> > > -----Original Message-----
> > > From: Brian McCallister [mailto:mccallister@forthillcompany.com]
> > > Sent: Friday, 26 December 2003 03:54
> > > To: users@cocoon.apache.org
> > > Subject: Re: Woody + flow/action: more verbose example please
> > >
> > >
> > > I did a small woody + flowscript app a while back and modified the
> > > woody xslt's to display the error messages directly -- I
> > > didn't do this
> > > in the FlowScript or form definition.
> > >
> > > -Brian
> > >
> > > On Dec 25, 2003, at 7:24 PM, H.vanderLinden@MI.unimaas.nl wrote:
> > >
> > > > Hi,
> > > >
> > > > A slight update on the message below: I got my script
> > > working and I'm
> > > > able
> > > > to redirect to a different pipeline, but how can I display
> > > an error
> > > > message
> > > > on the page itself? So, not a validation string of a single
> > > field, but
> > > > the
> > > > result of the test done in the .js script.
> > > >
> > > > Login.js script
> > > >
> > > > cocoon.load("resource://org/apache/cocoon/woody/flow/javascript/
> > > > woody2.js");
> > > >
> > > > function login(form) {
> > > > //    var form = new Form("scratchpad/loginWoodyDef.xml");
> > > >     var model = form.getModel();
> > > >
> > > >     form.showForm("woodyLogin");
> > > > 	if (model.username != "test@data.com") {
> > > > 			
> //cocoon.sendPage("login-failure-pipeline"); <--
> > > > this works
> > > > 			String errMsg="not a valid name";
> > > >
> > > > 			/*
> > > > 				????? What should I do 
> here to get the
> > > > message displayed
> > > > 			*/
> > > > 		}
> > > > 		else {
> > > >     cocoon.sendPage("login-success-pipeline", bizdata);
> > > > 		}
> > > > }
> > > >
> > > >
> > > > Form transformed to:
> > > >
> > > > <span class="error">error message goes here</span>
> > > > Username: <input name="username" id="username"/><br/>
> > > > Password: <input name="password" id="password"/>
> > > >
> > > >
> > > > Thanks.
> > > >
> > > > Bye, Helma
> > > >
> > > >
> > > >> -----Original Message-----
> > > >> From: H.vanderLinden@MI.unimaas.nl
> > > >> [mailto:H.vanderLinden@MI.unimaas.nl]
> > > >> Sent: Thursday, 25 December 2003 15:08
> > > >> To: users@cocoon.apache.org
> > > >> Subject: Woody + flow/action: more verbose example please
> > > >>
> > > >>
> > > >> Hi,
> > > >>
> > > >> I'm trying to implement a form with woody widgets and either
> > > >> flow or action
> > > >> handling. I got as far as properly displaying my form, but
> > > >> nothing happens
> > > >> on clicking the submit button. I can't get enough information
> > > >> out of the
> > > >> documentation or the examples to modify the register sample
> > > >> to something
> > > >> like this:
> > > >>
> > > >> On submit:
> > > >>
> > > >> If (username.equals("test") && !password.equals(username))
{
> > > >> 	// do some success action and/or
> > > >> 	// go to some success form/pipeline
> > > >> }
> > > >> else {
> > > >> 	// display error message on the form itself and/or
> > > >> 	// go to some failure form/pipeline
> > > >> }
> > > >>
> > > >> Can someone post some snippets that makes the register sample
> > > >> do this? And
> > > >> _PLEASE_ change the name of the various forms, functions,
> > > >> actions, pipelines
> > > >> so they don't all have the same name.
> > > >> In the form1 example it's very confusing to try and figure
> > > >> out which "form1"
> > > >> is called.
> > > >>
> > > >> Thanks.
> > > >>
> > > >> Bye, Helma
> > > >>
> > > >>
> > > 
> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > >> For additional commands, e-mail: users-help@cocoon.apache.org
> > > >>
> > > >
> > > >
> > > 
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> > >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message