On Tuesday 08 June 2010 10:17 AM, Deepika1234 wrote:
In form  CommForms.xml at no place<auto-fields-service>   is specified.
Please let me know from where the form id is getting populated in the view
source.
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd";
  <form name="EditCommEvent" type="single" target="updateCommunicationEvent"
default-map-name="communicationEvent">
         <alt-target target="createCommunicationEvent"
use-when="communicationEvent==null"/>

------------------------------------------------------------------
<field name="roleTypeIdFrom" widget-style="length1">
             <drop-down no-current-selected-key="_NA_">
                 <entity-options description="${description}"
entity-name="RoleType" key-field-name="roleTypeId">
                     <entity-order-by field-name="description"/>
                 </entity-options>
             </drop-down>
         </field>

         <field name="roleTypeIdTo" position="2" widget-style="length1">
             <drop-down no-current-selected-key="_NA_">
                 <entity-options description="${description}"
entity-name="RoleType" key-field-name="roleTypeId">
                     <entity-order-by field-name="description"/>
                 </entity-options>
             </drop-down>
         </field>



Hi Deepika,

As i am getting you want to know that how the id of the field changes in the view source.

The form is rendered through MacroFormRenderer.java, if we talk about DropDown then in the file you find a method renderDropDownField() which is used to render dropdown. here you see

String id = modelFormField.getCurrentContainerId(context);

so the id which you see in the view source is actually set from here...
or you can also trace further...

--
Thanks&  Regards:
Ankit Jain
Enterprise Software Developer
Hotwax Media Pvt. Ltd.
www.hotwaxmedia.com

Reply via email to