cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: [Forms] broadcastEvent
Date Wed, 06 Apr 2005 09:30:57 GMT
Ben Anderson wrote:

>ok, I won't use broadcastEvent()...
>
>Is there a way to specify a default value for the selection-list
>throught the pipeline specified?  For instance my pipeline could
>return something like:
>
><fd:selection-list default="1">
>  <fd:item value="1">
>    <fd:label>foo</fd:label>
>  </fd:item>
>  <fd:item value="2">
>    <fd:label>bar</fd:label>
>  </fd:item>
></fd:selection-list>
>
>so now when I run this code:
>  someWidget.setSelectionList("cocoon:/selection-lists/some/pipe?raSearch="
>+ value);
>  var raId = someWidget.getValue();
>
>so now raId contains 1.  That would certainly help me out.
>  
>

Unfortunately, that isn't possible with an URL-defined selection list. 
Such lists are generated only when the form is displayed, i.e. in the 
view pipeline. There are other selection list implementations that rely 
on some existing data structure that could allow this (although not 
currently), but not the SAX stream based list defined by an URL.

>I guess I'll try using processPipelineTo here.  I've heard people
>mention on the list before that rhino has some inherent xml processing
>abilities.  Can anyone point me to documentation for this?
>  
>

You can also have a look at the 
org.apache.cocoon.components.flow.util.PipelineUtil class. It's a 
generalization of cocoon.processPipelineTo not only for streams, but 
also DOM and SAX handlers.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://apache.org/~sylvain            http://anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


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


Mime
View raw message