cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Re: Multivaluefield - getting values in JXTemplate?
Date Fri, 18 Jun 2004 13:50:46 GMT
Sorry Joerg

I am not sure that this is making a difference:

ie in my flowscript if I now have:

var atheme = form.getChild("theme").getValue();

and in the  "jxpage" 

  <jx:forEach var="thisTheme" items="theme">
    <li>A Selection: ${atheme}</li>
  </jx:forEach>
    
  <jx:forEach var="thisTheme" items="theme">
    <li>A Selection: ${thisTheme}</li>
  </jx:forEach>   


I get 

A Selection: [Ljava.lang.Object;@119ca2c 
A Selection:
org.apache.cocoon.generation.JXTemplateGenerator$Expression@284ac3 


Where and how should I be using the "getValue()"  ?

Thanks
Derek

>>> joerg.heinicke@gmx.de 2004/06/18 07:43:02 AM >>>
On 17.06.2004 08:06, Derek Hohls wrote:

> The "jxpage" looks like this:
> 
> <html xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
>   <head>
>     <title>Report successful</title>
>   </head>
>   <body>
>     Report was successful for ${theme} and ${atheme}
>   <ul>
>   <jx:forEach var="thisTheme" items="theme">
>     <li>Selection: ${theme.current}</li>
>   </jx:forEach>
>   <jx:forEach var="thisTheme" items="theme">
>     <li>A Selection: ${atheme.current}</li>
>   </jx:forEach>
>   </ul>
>   </body>
> </html>
> 
> And the output looks like:
> 
> Report was successful for
> org.apache.cocoon.forms.flow.javascript.ScriptableWidget@12a585c and
> org.apache.cocoon.forms.formmodel.MultiValueField@10f3801 
> * Selection: 
> * A Selection: 
> 
> 
> How do I go about getting the values selected in the
> multivaluefield?  (And if you know this, then perhaps you
> can help with multi-check boxes and radio groups?)

What about theme.getValue() or atheme.getValue() which should return an

Object[]?
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/MultiValueField.java?annotate=1.12#155


Joerg

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


-- 
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message