cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From laurent_ror...@marinepower.com
Subject Fw: Cocoon Forms - Woody
Date Thu, 15 Apr 2004 08:13:45 GMT
Dear Members,


1) Is there a way to translate the "general.field-required" label received 
when validating such a widget with @required=true

<wd:field id="tellus_lastname" required="true">
      <wd:label>
        <i18n:text key="tellus.lastname">tellus.lastname</i18n:text>
      </wd:label>
      <wd:datatype base="string">
        <wd:validation>
          <wd:length min="1" />
        </wd:validation>
      </wd:datatype>
</wd:field>


I want to translate it with i18n 

1) Is there a way to get back the value and the label of a selection_list.

Actually what I made is a flowscript via JS  and in this javascript , I 
call a Java Object  : kind of Notes Document factory

tellus_country is  the selection list and in my object it receive the 
value and never the label ?

var TellUsFactory = 
Packages.com.mpe.cocoon.woody.tellus.TellUsFactory.getInstance();

function newTellUs()
{
   try
   {
      var form = new Form("context://woody/tellus/forms/entry.xml");
      ....
      {
         cocoon.log.debug(">>> TELLUS : User pass the validation and wants 
to submit the request");
         var model = form.getModel();
          var tellusentry = new 
Packages.com.mpe.cocoon.woody.tellus.TellUsEntry(model.tellus_firstname, 
model.tellus_email, model.tellus_country);
         if(tellusentry == null)
         {
            throw "Can not create a new tell us entry";
         }
         TellUsFactory.submitTellUsDocument(tellusentry);
        ....

Thanks a lot for your help !
Mime
View raw message