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.

Reply via email to