You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Danny Bols <db...@osirion.be> on 2003/11/12 12:59:58 UTC
Woody and Flow Script
Hello,
I am using Cocoon 2.1.2 (not the CVS version) and I ran into some questions
related to using woody with flow script. Here they are:
1. How can I access the woody form object from within my xsp page when using
flowscript (the form object is not availble anymore in the request)?
2. How can I fill the key/value pairs of a selection list based upon the
values available in a business object?
---
Danny
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Woody and Flow Script
Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Danny Bols dijo:
> Thanks for the quick response.
>
> I like the FlowJXPathSelectionListBuilder solution but I it's not
> available
> in my Cocoon 2.1.2 :-(.
> Any idea if it will be shipped with the new upcoming release?
Yep. 2.1.3 is programmed for tomorrow release.
Antonio Gallardo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody and Flow Script
Posted by Ugo Cei <u....@cbim.it>.
Danny Bols wrote:
> Any idea if it will be shipped with the new upcoming release?
Of course it will.
Ugo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody and Flow Script
Posted by Ugo Cei <u....@cbim.it>.
Danny Bols wrote:
> I am using the Cocoon 2.1.3. / Woody release now but the
> FlowJXPathSelectionListBuilder doesn't work. I tried the example which can
> be found in the API...but...No Errors...No Logging....and no combo box :-(
I haven't tried to retype verbatim the example in the API, but the
"countryselector" sample
<http://localhost:8888/samples/woody/countryselector> works for me.
Ugo (who ha just realized he didn't link the sample from the samples page).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Woody and Flow Script
Posted by Danny Bols <d....@skynet.be>.
I tracked my selection list problem in woody a bit further down and it looks
as if the following code in the StaticSelectionList is causing the problem:
if (label != null) {
interpreter.recycle();
interpreter.setContentHandler(contentHandler);
interpreter.deserialize(label);
} else {
contentHandler.characters(stringValue.toCharArray(), 0,
stringValue.length());
}
Changing my flowscript code
from selectionList.addItem("AL", "Alabama");
to selectionList.addItem("AL", null);
bypasses the above "interpreter" code and causes my flowscript example to
work.
Hope this helps tracking down the selection list problem.
--
Danny
> -----Original Message-----
> From: Danny Bols [mailto:dbols@osirion.be]
> Sent: zaterdag 15 november 2003 10:57
> To: users@cocoon.apache.org
> Subject: RE: Woody and Flow Script
>
>
> Hello,
>
> I am using the Cocoon 2.1.3. / Woody release now but the
> FlowJXPathSelectionListBuilder doesn't work. I tried the example which can
> be found in the API...but...No Errors...No Logging....and no combo box :-(
>
> Desperatly I tried the following solution (which in my case would
> be better)
> in flow script which resulted in an empty combo box in my form??
>
> function myform(form) {
> var widget = form.form.getWidget("myfield");
> var selectionList = new
> Packages.org.apache.cocoon.woody.datatype.StaticSelectionList(widg
> et.getData
> type());
> selectionList.addItem("AL", "Alabama");
> selectionList.addItem("AK", "Alaska");
> selectionList.addItem("WY", "Wyoming");
> widget.setSelectionList(selectionList);
> form.showForm("flow/myform.form");
> }
>
> --
> Danny
>
> > -----Original Message-----
> > From: Danny Bols [mailto:dbols@osirion.be]
> > Sent: woensdag 12 november 2003 16:57
> > To: users@cocoon.apache.org
> > Subject: RE: Woody and Flow Script
> >
> >
> > Thanks for the quick response.
> >
> > I like the FlowJXPathSelectionListBuilder solution but I it's not
> > available
> > in my Cocoon 2.1.2 :-(.
> > Any idea if it will be shipped with the new upcoming release?
> >
> > --
> >
> > Danny
> >
> > > -----Original Message-----
> > > From: Bruno Dumon [mailto:bruno@outerthought.org]
> > > Sent: woensdag 12 november 2003 16:08
> > > To: users@cocoon.apache.org
> > > Subject: Re: Woody and Flow Script
> > >
> > >
> > > On Wed, 2003-11-12 at 16:06, Antonio Gallardo wrote:
> > > > Danny Bols dijo:
> > > > > 2. How can I fill the key/value pairs of a selection list
> > > based upon the
> > > > > values available in a business object?
> > > >
> > > > Hi:
> > > >
> > > > We use 2 internal pipeline to address this:
> > > >
> > > > <!-- Flow to generate XML docs to fill combos -->
> > > > <map:match pattern="*.combo">
> > > > <map:call function="{1}Combo"/>
> > > > </map:match>
> > > >
> > > > <!-- Combo data in Woody format -->
> > > > <map:match pattern="*Combo-data">
> > > > <map:generate type="jx" src="forms/combo/{1}.xml"/>
> > > > <map:serialize type="xml"/>
> > > > </map:match>
> > > >
> > > > The flow is:
> > > >
> > > > function auth_resourceCombo() {
> > > > var factory = cocoon.getComponent(Packages.o.a.c...JdoPMF.ROLE);
> > > > var bean = new Packages.test.Auth_resourceList();
> > > > var handler = new Packages.test.Auth_resourceHandler();
> > > > handler.getList(bean, factory);
> > > > cocoon.sendPage("auth_resourceCombo-data", {"bean": bean});
> > > > cocoon.releaseComponent(factory);
> > > > }
> > > >
> > > > In woody we write:
> > > >
> > > > <wd:selection-list src="cocoon:/auth_resource.combo"
> dynamic="true"/>
> > > >
> > > > The handler is a java class that use OJB.
> > > >
> > > > Hope this help. :-D
> > >
> > > Or much simpler, use the flow-jxpath selection list
> implementation. See
> > > also the javadocs of the FlowJXPathSelectionListBuilder class for more
> > > information:
> > >
> > > http://cvs.apache.org/viewcvs.cgi/*checkout*/cocoon-2.1/src/blocks
> >
> >
> > ---------------------------------------------------------------------
> > 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
RE: Woody and Flow Script
Posted by Danny Bols <db...@osirion.be>.
Hello,
I am using the Cocoon 2.1.3. / Woody release now but the
FlowJXPathSelectionListBuilder doesn't work. I tried the example which can
be found in the API...but...No Errors...No Logging....and no combo box :-(
Desperatly I tried the following solution (which in my case would be better)
in flow script which resulted in an empty combo box in my form??
function myform(form) {
var widget = form.form.getWidget("myfield");
var selectionList = new
Packages.org.apache.cocoon.woody.datatype.StaticSelectionList(widget.getData
type());
selectionList.addItem("AL", "Alabama");
selectionList.addItem("AK", "Alaska");
selectionList.addItem("WY", "Wyoming");
widget.setSelectionList(selectionList);
form.showForm("flow/myform.form");
}
--
Danny
> -----Original Message-----
> From: Danny Bols [mailto:dbols@osirion.be]
> Sent: woensdag 12 november 2003 16:57
> To: users@cocoon.apache.org
> Subject: RE: Woody and Flow Script
>
>
> Thanks for the quick response.
>
> I like the FlowJXPathSelectionListBuilder solution but I it's not
> available
> in my Cocoon 2.1.2 :-(.
> Any idea if it will be shipped with the new upcoming release?
>
> --
>
> Danny
>
> > -----Original Message-----
> > From: Bruno Dumon [mailto:bruno@outerthought.org]
> > Sent: woensdag 12 november 2003 16:08
> > To: users@cocoon.apache.org
> > Subject: Re: Woody and Flow Script
> >
> >
> > On Wed, 2003-11-12 at 16:06, Antonio Gallardo wrote:
> > > Danny Bols dijo:
> > > > 2. How can I fill the key/value pairs of a selection list
> > based upon the
> > > > values available in a business object?
> > >
> > > Hi:
> > >
> > > We use 2 internal pipeline to address this:
> > >
> > > <!-- Flow to generate XML docs to fill combos -->
> > > <map:match pattern="*.combo">
> > > <map:call function="{1}Combo"/>
> > > </map:match>
> > >
> > > <!-- Combo data in Woody format -->
> > > <map:match pattern="*Combo-data">
> > > <map:generate type="jx" src="forms/combo/{1}.xml"/>
> > > <map:serialize type="xml"/>
> > > </map:match>
> > >
> > > The flow is:
> > >
> > > function auth_resourceCombo() {
> > > var factory = cocoon.getComponent(Packages.o.a.c...JdoPMF.ROLE);
> > > var bean = new Packages.test.Auth_resourceList();
> > > var handler = new Packages.test.Auth_resourceHandler();
> > > handler.getList(bean, factory);
> > > cocoon.sendPage("auth_resourceCombo-data", {"bean": bean});
> > > cocoon.releaseComponent(factory);
> > > }
> > >
> > > In woody we write:
> > >
> > > <wd:selection-list src="cocoon:/auth_resource.combo" dynamic="true"/>
> > >
> > > The handler is a java class that use OJB.
> > >
> > > Hope this help. :-D
> >
> > Or much simpler, use the flow-jxpath selection list implementation. See
> > also the javadocs of the FlowJXPathSelectionListBuilder class for more
> > information:
> >
> > http://cvs.apache.org/viewcvs.cgi/*checkout*/cocoon-2.1/src/blocks
>
>
> ---------------------------------------------------------------------
> 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
RE: Woody and Flow Script
Posted by Danny Bols <db...@osirion.be>.
Thanks for the quick response.
I like the FlowJXPathSelectionListBuilder solution but I it's not available
in my Cocoon 2.1.2 :-(.
Any idea if it will be shipped with the new upcoming release?
--
Danny
> -----Original Message-----
> From: Bruno Dumon [mailto:bruno@outerthought.org]
> Sent: woensdag 12 november 2003 16:08
> To: users@cocoon.apache.org
> Subject: Re: Woody and Flow Script
>
>
> On Wed, 2003-11-12 at 16:06, Antonio Gallardo wrote:
> > Danny Bols dijo:
> > > 2. How can I fill the key/value pairs of a selection list
> based upon the
> > > values available in a business object?
> >
> > Hi:
> >
> > We use 2 internal pipeline to address this:
> >
> > <!-- Flow to generate XML docs to fill combos -->
> > <map:match pattern="*.combo">
> > <map:call function="{1}Combo"/>
> > </map:match>
> >
> > <!-- Combo data in Woody format -->
> > <map:match pattern="*Combo-data">
> > <map:generate type="jx" src="forms/combo/{1}.xml"/>
> > <map:serialize type="xml"/>
> > </map:match>
> >
> > The flow is:
> >
> > function auth_resourceCombo() {
> > var factory = cocoon.getComponent(Packages.o.a.c...JdoPMF.ROLE);
> > var bean = new Packages.test.Auth_resourceList();
> > var handler = new Packages.test.Auth_resourceHandler();
> > handler.getList(bean, factory);
> > cocoon.sendPage("auth_resourceCombo-data", {"bean": bean});
> > cocoon.releaseComponent(factory);
> > }
> >
> > In woody we write:
> >
> > <wd:selection-list src="cocoon:/auth_resource.combo" dynamic="true"/>
> >
> > The handler is a java class that use OJB.
> >
> > Hope this help. :-D
>
> Or much simpler, use the flow-jxpath selection list implementation. See
> also the javadocs of the FlowJXPathSelectionListBuilder class for more
> information:
>
> http://cvs.apache.org/viewcvs.cgi/*checkout*/cocoon-2.1/src/blocks
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody and Flow Script
Posted by Bruno Dumon <br...@outerthought.org>.
On Wed, 2003-11-12 at 16:06, Antonio Gallardo wrote:
> Danny Bols dijo:
> > 2. How can I fill the key/value pairs of a selection list based upon the
> > values available in a business object?
>
> Hi:
>
> We use 2 internal pipeline to address this:
>
> <!-- Flow to generate XML docs to fill combos -->
> <map:match pattern="*.combo">
> <map:call function="{1}Combo"/>
> </map:match>
>
> <!-- Combo data in Woody format -->
> <map:match pattern="*Combo-data">
> <map:generate type="jx" src="forms/combo/{1}.xml"/>
> <map:serialize type="xml"/>
> </map:match>
>
> The flow is:
>
> function auth_resourceCombo() {
> var factory = cocoon.getComponent(Packages.o.a.c...JdoPMF.ROLE);
> var bean = new Packages.test.Auth_resourceList();
> var handler = new Packages.test.Auth_resourceHandler();
> handler.getList(bean, factory);
> cocoon.sendPage("auth_resourceCombo-data", {"bean": bean});
> cocoon.releaseComponent(factory);
> }
>
> In woody we write:
>
> <wd:selection-list src="cocoon:/auth_resource.combo" dynamic="true"/>
>
> The handler is a java class that use OJB.
>
> Hope this help. :-D
Or much simpler, use the flow-jxpath selection list implementation. See
also the javadocs of the FlowJXPathSelectionListBuilder class for more
information:
http://cvs.apache.org/viewcvs.cgi/*checkout*/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/FlowJXPathSelectionListBuilder.java?rev=HEAD
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody and Flow Script
Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Danny Bols dijo:
> 2. How can I fill the key/value pairs of a selection list based upon the
> values available in a business object?
Hi:
We use 2 internal pipeline to address this:
<!-- Flow to generate XML docs to fill combos -->
<map:match pattern="*.combo">
<map:call function="{1}Combo"/>
</map:match>
<!-- Combo data in Woody format -->
<map:match pattern="*Combo-data">
<map:generate type="jx" src="forms/combo/{1}.xml"/>
<map:serialize type="xml"/>
</map:match>
The flow is:
function auth_resourceCombo() {
var factory = cocoon.getComponent(Packages.o.a.c...JdoPMF.ROLE);
var bean = new Packages.test.Auth_resourceList();
var handler = new Packages.test.Auth_resourceHandler();
handler.getList(bean, factory);
cocoon.sendPage("auth_resourceCombo-data", {"bean": bean});
cocoon.releaseComponent(factory);
}
In woody we write:
<wd:selection-list src="cocoon:/auth_resource.combo" dynamic="true"/>
The handler is a java class that use OJB.
Hope this help. :-D
Best Regards,
Antonio Gallardo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Woody and Flow Script
Posted by Reinhard Poetz <re...@apache.org>.
From: Danny Bols
> I am using Cocoon 2.1.2 (not the CVS version) and I ran into
> some questions related to using woody with flow script. Here they are:
>
> 1. How can I access the woody form object from within my xsp
> page when using flowscript (the form object is not availble
> anymore in the request)?
http://cocoon.apache.org/2.1/userdocs/flow/jpath.html
HTH
--
Reinhard
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org