Grzegorz
 
I finally managed to find the answer - its mentioned here:
http://mail-archives.apache.org/mod_mbox/cocoon-users/200708.mbox/[EMAIL 
PROTECTED] 

Basically you need to use:
var myWidgets = myForm.getWidget().getChildren();

So, for the record, my complete code looks like:

if (myForm.getWidget().getSubmitWidget().getId().equals("ok")) {
 var it = myForm.getWidget().getChildren();
 if ( it != null ) {
  var fwidget = null;
  var ID  = null;
  var val = null;  
  while ( it.hasNext() ) {  
   fwidget = it.next() ; 
   ID = fwidget.getId();
   if ( (ID!=null) && (ID!="ok") && (ID!="cancel") && (ID!="message") ) {
    val = fwidget.getValue();
    if ( val!=null ) { 
     //process a widget that has a value...
    } 
   }
  }   
 }
}

HTH someone!

Derek


>>> On 2008/04/27 at 03:39, in message <[EMAIL PROTECTED]>, Grzegorz 
>>> Kossakowski <[EMAIL PROTECTED]> wrote:
Derek Hohls pisze:
> Can anyone help with this?! - 
> I am sure its a simple syntax issue...
> 
>>>> On 2008/04/21 at 12:40, in message <[EMAIL PROTECTED]>, "Derek Hohls" 
>>>> <[EMAIL PROTECTED]> wrote:
> Gregorz
> 
> Unfortunately, when I try:
> 
> var it = model.children;
> 
> it has an "undefined" (null) result, not an iterator.
> 
> I also tried:
> 
> var it = myform.getChildren();
> 
> but without success.
> 
> Any ideas  how to get this to work?  I have tried this in 
> different flowscripts for different forms; all have the
> same problem.

Hi Derek,

Thanks for reminding me. I'm just developing some Forms so I'll try my 
suggestion and see why it's 
not working. Stay tuned.

-- 
Best regards,
Grzegorz Kossakowski

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to