Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 25052 invoked from network); 12 Sep 2005 10:49:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Sep 2005 10:49:45 -0000 Received: (qmail 19798 invoked by uid 500); 12 Sep 2005 10:49:38 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 19762 invoked by uid 500); 12 Sep 2005 10:49:37 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 19749 invoked by uid 99); 12 Sep 2005 10:49:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2005 03:49:37 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=HTML_MESSAGE,HTML_TEXT_AFTER_BODY,HTML_TEXT_AFTER_HTML,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [203.91.193.23] (HELO wip-ectls-mx3.wipro.com) (203.91.193.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2005 03:49:48 -0700 Received: from wip-ectls-mx3.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id 09BA5224261 for ; Mon, 12 Sep 2005 15:47:39 +0530 (IST) Received: from blr-ec-bh01.wipro.com (blr-ec-bh01.wipro.com [10.201.50.91]) by wip-ectls-mx3.wipro.com (Postfix) with ESMTP id D9613224CFC for ; Mon, 12 Sep 2005 15:47:38 +0530 (IST) Received: from BLR-EC-MBX04.wipro.com ([10.201.50.165]) by blr-ec-bh01.wipro.com with Microsoft SMTPSVC(6.0.3790.211); Mon, 12 Sep 2005 15:47:38 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C5B783.33A0D664" Subject: Problem with fd:group and fd:struct Date: Mon, 12 Sep 2005 15:49:25 +0530 Message-ID: <3D81D46E0E63304FBC9ECEB136B4CF26A681B8@BLR-EC-MBX04.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem with fd:group and fd:struct Thread-Index: AcW3g3OalT7ufxM0RACnVVbzD57j9w== From: To: X-OriginalArrivalTime: 12 Sep 2005 10:17:38.0795 (UTC) FILETIME=[33D25BB0:01C5B783] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C5B783.33A0D664 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, =0D Can anyone help me out in using fd:group instead of fd:struct? =0D While using fd:group I am getting the following exception :- =0D org.apache.avalon.framework.CascadingException: Unknown kind of widget 'group' =0D Does any namespace needs to be declared on fd:form? =0D Basicaly I want to know what is the difference in using fd:struct and fd:group.=0D If fd:struct and fd:group are conceptually same then I think I can struct itself. =0D Moreover While using fd:struct I am facing the following problem:- =0D I want to use onchange event on flow script. I am giving like=0D =0D wid.lookupWidget('description_u/visible/description').onChange =3D function (oldValue, newValue) { wid.lookupWidget('description_c').setValue('visible'); print("oldValue is " + oldValue); print("newValue is " + newValue); }; =0D But it is not at all getting fired. Please refer below for the definition file details. =0D =0D Thanks and regards, Baskar =0D -----Original Message----- From: Baskar Ganesh (WT01 - Technology,Media,Transportation&Services) Sent: Friday, September 09, 2005 7:34 PM To: 'users@cocoon.apache.org' Subject: RE: Accessing the union type widget value =0D Thanks Jason. I can able to access the widget now... =0D -----Original Message----- From: Jason Johnston [mailto:cocoon@lojjic.net] Sent: Friday, September 09, 2005 7:14 PM To: users@cocoon.apache.org Subject: Re: Accessing the union type widget value =0D baskar.ganesh@wipro.com wrote: > Hi all, >=0D > =0D >=0D > Can anyone tell me how can we access the union widget from the flowscript? >=0D > I have created a definition file as follows:- >=0D > =0D >=0D > xmlns:i18n=3D"http://apache.org/cocoon/i18n/2.1" > xmlns:fd=3D"http://apache.org/cocoon/forms/1.0#definition"> > =0D > > =0D > > > =0D > > =0D > > > > > > =0D > > =0D > > > >=0D > > =0D >=0D > > > =0D > > >=0D > =0D >=0D > The form is getting rendered correctly by giving the following code >=0D > =0D >=0D > var wid =3D frmView.getWidget(); >=0D > wid.lookupWidget(student').setValue('firstname') >=0D > =0D >=0D > It is displaying me a text box but if I want to access the firstname=0D > how will I access? >=0D > I tried accessing wid.lookupWidget(student').firstname which it is=0D > telling undefined. >=0D > Can any one please help me out in accessing the widget inside a structure. =0D Try: =0D wid.lookupWidget("structStudent/firstname/name").getValue(); =0D The argument to lookupWidget is an path-like string that allows you to navigate the widget tree... you can use ".." to go up a level, etc. =0D =0D --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org =0D =0D =0D Confidentiality Notice=0D The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and may contain confidential or= privileged information. If you are not the intended recipient, please notify the sender at Wipro or= Mailadmin@wipro.com immediately and destroy all copies of this message and any attachments. ------_=_NextPart_001_01C5B783.33A0D664 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi= all,

 

Can anyone help me out= in using fd:group instead of fd:struct?

 

While using fd:group I= am getting the following exception :-

 

org.apache.avalon.framework.CascadingException: Unknown kind of widget 'group'

 

Does any= namespace needs to be declared on fd:form?

 

Basicaly I want to= know what is the difference in using fd:struct and fd:group.=

If fd:struct and= fd:group are conceptually same then I think I can struct= itself.

 

Moreover While using fd:struct I am facing the following problem:-

 

I want to use onchange= event on flow script.

I am giving like=

 

wid.lookupWidget('description_u/visible/description').onChange =3D function (oldValue, newValue) {

  wid.lookupWidget('description_c').setValue('visible');

    print("oldValue is " + oldValue);

    print("newValue is " + newValue);

 = };

 

But it is not at all= getting fired.

Please refer below for= the definition file details.

 

 

Thanks and= regards,

Baskar

 

-----Original= Message-----

From: Baskar Ganesh (WT01 -= Technology,Media,Transportation&Services)

Sent: Friday,= September 09, 2005 7:34 PM

To: 'users@cocoon.apache.org'<= /p>

Subject: RE: Accessing= the union type widget value

 

Thanks Jason. I can= able to access the widget now...

 

-----Original= Message-----

From: Jason Johnston= [mailto:cocoon@lojjic.net]

Sent: Friday,= September 09, 2005 7:14 PM

To: users@cocoon.apache.org

Subject: Re: Accessing= the union type widget value

 

baskar.ganesh@wipro.com wrote:

> Hi= all,

>=

> =

>=

> Can anyone tell= me how can we access the union widget from the= flowscript?

>=

> I have created a definition file as follows:-

>=

> =

>=

> <fd:form xmlns= =3D"http://apache.org/cocoon/forms/1.0#definition"

>       xmlns:i18n= =3D"http://apache.org/cocoon/i18n/2.1"

>       xmlns:fd= =3D"http://apache.org/cocoon/forms/1.0#definition">=

>     

>  = <fd:widgets>

> =

>     <!-- case widget, with _c suffix -->

>     <fd:field id=3D"student" required= =3D"true">

>       <fd:datatype base=3D"string" />=

>     </fd:field>

>   =

>     <fd:union id=3D"structStudent" case= =3D"student">

>       <fd:widgets>

>         <fd:struct id=3D"firstname">

>           <fd:widgets>

>          &nbs= p;  <fd:field id=3D"name">

>          &nbs= p;    <fd:datatype base=3D"string" />=

>          &nbs= p;  </fd:field>

>           </fd:widgets>

>         </fd:struct>

>         <fd:struct id=3D"lastname">

>           <fd:widgets>

>=

>= </fd:widgets>

>         </fd:struct>  

>=

>    </fd:widgets>

>     </fd:union>

>  =

>   </fd:widgets>

>= </fd:form>

>=

> =

>=

> The form is= getting rendered correctly by giving the following= code

>=

> =

>=

> var wid =3D frmView.getWidget();

>=

> wid.lookupWidget(student’).setValue(‘firstname’)

>=

> =

>=

> It is displaying= me a text box but if I want to access the firstname=

> how will I= access?

>=

> I tried accessing wid.lookupWidget(student’).firstname which it is=

> telling= undefined.

>=

> Can any one please  help me out in accessing the widget inside a= structure.

 

Try:

 

wid.lookupWidget("structStudent/firstname/name").getValue(= );

 

The argument to= lookupWidget is an path-like string that allows you to navigate the widget tree... you= can use ".." to go up a level, etc.

 

 

--------------------------------------------------------------------= -

To unsubscribe,= e-mail: users-unsubscribe@cocoon.apache.org

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

 

 

 



Confidentiality Notice

The information contained in this electronic message and any attachments to= this message are intended
for the exclusive use of the addressee(s) and may contain confidential or= privileged information. If
you are not the intended recipient, please notify the sender at Wipro or= Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.
------_=_NextPart_001_01C5B783.33A0D664--