You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christoph Hermann <ch...@tu-clausthal.de> on 2005/01/15 00:28:25 UTC

Cforms on-load like

Hello,

is there something like an on-load for a widget?
I want to set the value of a select-list depending on the value of 
another widget when the form is loaded. (I need something to set the 
selected value when the Form is loaded.)
Any help and or links where to get more Information is really 
appreciated.

Christoph

Re: Cforms on-load like

Posted by Carlos Chávez <cc...@agssa.net>.
Christoph Hermann Escribio :-)
> Hello,
>
> is there something like an on-load for a widget?
> I want to set the value of a select-list depending on the value of
> another widget when the form is loaded. (I need something to set the
> selected value when the Form is loaded.)
> Any help and or links where to get more Information is really
> appreciated.
>
> Christoph
>

 Hi Christoph.

 You can use fb:javascript in the binding. see :
 http://cocoon.apache.org/2.1/userdocs/forms/binding.html#fb%3Ajavascript

 Cheers.

-- 
Carlos Chávez

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


Re: Cforms on-load like

Posted by Carlos Chávez <cc...@agssa.net>.
Christoph Hermann Escribio :-)
> Mark Lundquist schrieb:
>
> Hello,
>
>> > is there something like an on-load for a widget?
>> > I want to set the value of a select-list depending on the value of
>> > another widget when the form is loaded. (I need something to set
>> > the selected value when the Form is loaded.)
>>
>> What do you mean by "when the Form is loaded"?
>
> I meant when (before) its displayed the first time.
> Maybe there is a better solution to my Problem...
> I have two widgets (id, select). I get the id out of a database and
> populate the select list also with all possible values from the
> database using flow-jxpath implementation.
>
> When the select is changed i use the on-value changed to get the id for
> the selected value from the database and set the value of the
> id-widget.
>
> I now want to have the value from the database to be selected in the
> select-widget.
>
> Is there any better way to do this?
>
> Christoph
>

 Hi Christoph,

 you can try this in the binding, using fb:javacript, for example

 <fb:value id="id" path="id"/>
 <fb:value id="fieldToHaveList" path="fieldToHaveList"/>

 <fb:javascript id="fieldToHaveList" path="fieldOfTheBean" direction="load">
  <fb:load-form>
    // the "widget" var is the field reference in id="fieldToHaveList"

    // Obtain the value of the widget what you need for populate the
    // List
    var id = widget.parent.getChild("id").getValue();

    // then you can do what do you need for populate the list
    // sentences write to continue
    typewidget.setSelectionList(  what you need   );
  </fb:load-form>
 </fb:javascript>

 this work is you write in the flowscript form.load(bean)

 Cheers.

-- 
Carlos Chávez

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


Re: Cforms on-load like

Posted by Christoph Hermann <ch...@tu-clausthal.de>.
Mark Lundquist schrieb:

Hello,

> > is there something like an on-load for a widget?
> > I want to set the value of a select-list depending on the value of
> > another widget when the form is loaded. (I need something to set
> > the selected value when the Form is loaded.)
>
> What do you mean by "when the Form is loaded"?

I meant when (before) its displayed the first time.
Maybe there is a better solution to my Problem...
I have two widgets (id, select). I get the id out of a database and 
populate the select list also with all possible values from the 
database using flow-jxpath implementation.

When the select is changed i use the on-value changed to get the id for 
the selected value from the database and set the value of the 
id-widget.

I now want to have the value from the database to be selected in the 
select-widget.

Is there any better way to do this?

Christoph

xslt 2.0 grouping functions

Posted by Harry Stangel <ha...@posthastedirectmail.com>.
I flame out when attempting to use Saxon's grouping functions.  The error:

Message:
file:<path>/<filename>:92: <xsl:for-each-group> is an unknown XSL tag.

Description:
org.apache.cocoon.ProcessingException: Unable to get transformer handler for
file:<path>/<filename>:
org.apache.excalibur.xml.xslt.XSLTProcessorException:
Exception in creating Transform Handler

Sender:
org.apache.cocoon.servlet.CocoonServlet

I have configured my 'xslt-saxon' transformer, and am able to use it for
other non-grouping tranformations.

Running my transformation from the command line creates the correct output
with no errors.

I am running Cocoon 2.1.6 inside Resin 3.0.9, have the J2SDK 1.5.0, and
Saxon 8.2(B).

My saxon8.jar is located in $RESIN_HOME/webapps/cocoon/WEB-INF/lib/local/.

Any help?

Peace,
Harry


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


RE: Cforms on-load like

Posted by Mark Lundquist <ml...@wrinkledog.com>.
Hi Christoph,

> From: Christoph Hermann [mailto:christoph.hermann@tu-clausthal.de]
> 
> Hello,
> 
> is there something like an on-load for a widget?
> I want to set the value of a select-list depending on the value of 
> another widget when the form is loaded. (I need something to set the 
> selected value when the Form is loaded.)

What do you mean by "when the Form is loaded"?

-ml-


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