ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vivek <er.jadiyavi...@gmail.com>
Subject How do i store the return value from javascript in XML from declaration
Date Sat, 09 Oct 2010 13:28:57 GMT

Hi All,

Here i am trying to add drop down attribute to the defaultConfigOptionId tab
inside product administration page. When we are adding not updating the
config item to the product i wish that the configItemId should be passed as
an entity constraint to the drop down of defaultConfigOptionId. Here below
is the code i am trying: form name: AddProductConfig File: ProductForms.xml

<field name="configItemId" title="${uiLabelMap.ProductConfigItem}"
event="onchange" action="return configItemIdPassed()">
  <drop-down>
      <entity-options entity-name="ProductConfigItem"
description="${configItemName} 
          <entity-order-by field-name="configItemName"/>
      </entity-options>
  </drop-down>
</field>

<field name="defaultConfigOptionId"
title="${uiLabelMap.DefaultConfigOptionId}">
    <drop-down>
    <entity-options entity-name="ProductConfigOption"
key-field-name="configOptionId" description="${configOptionId}">
      <entity-constraint name="configItemId" operator="equals"
value="wantJavaScriptValueHere"/>
      <entity-order-by field-name="configItemId"/>
    </entity-options>
    </drop-down>
</field>

js included in other ftl 
function configItemIdPassed(){
var idPassed = document.AddProductConfig.configItemId.value;
return idPassed;
}

However i added the dropdown to updateProductConfig form successfully as
confgiItemId is already available.

I am stuck at this place & is desperately looking out for option to do it.
Your help would be highly appreciated.

thanks

-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/How-do-i-store-the-return-value-from-javascript-in-XML-from-declaration-tp2969572p2969572.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Mime
View raw message