Thank you Jacques for interest,
Soon I will start a thread on dev list for the same probably in next few
hours.
Will list out all the tag where we need the id-name to handle. For sure dev
list is better place to discuss the improvements.

-- 
Rishi Solanki
Enterprise Software Developer
HotWax Media Pvt. Ltd.

On Wed, May 13, 2009 at 1:35 PM, Jacques Le Roux <
[email protected]> wrote:

> From: "Rishi Solanki" <[email protected]>
> To: <[email protected]>
> Sent: Monday, May 11, 2009 1:49 PM
> Subject: Re: How to give id for a field in form widget
>
>
>  Hi Ravindra,
>>
>>> <field  id-name="existingNameId" name="existingName" title="Existing
>>>>
>>> Name"
>> widget-style="checkbox"><check></field>
>>
>>  From your code reference it seems that you are using check box in the
>>> form
>>>
>> widget. The concept is like that, whenever you write any tag in the Form
>> Widget then the attributes it supports all attributes which are defined in
>> the widget-forms.xml, but accepting a tag for a particular field does not
>> mean that it will be taken care while the conversion in to the Html by the
>> HtmlFormRenderer.java. In the HtmlFormRenderer.java all the methods to
>> render all the tags which are supported by the Form-Widgets exists. In
>> your
>> case the method is  "renderCheckField", in this method there is no
>> mechanism
>> to get the id-name and then convert it in to the id i.e Html equivalent.
>>
>> There are two choices you have to get id for the check box.
>> 1). Do not use form widget and use ftl where you can directly interact
>> with
>> the check box.
>> 2). Another way to enable form widget remaining field (in this case check
>> box) should get Id so that we can apply JS/Ajax on those fields as well.
>>
>> Ravindra you can go with #1.
>> For the #2 I would refer we should have all the form-widget fields have
>> id-name attribute support so that we can ignore use of ftl as much as
>> possible, even in case of JS/Ajax functionalities. Would be good if we
>> (users) discuss and if agree then go for it.
>>
>
> Hi Rishi,
>
> Interesting idea, I think this should be better discussed on dev ML
>
> Thanks
>
> Jacques
>
>
>  --
>> Rishi Solanki
>> Enterprise Software Developer
>> HotWax Media Pvt. Ltd.
>>
>> On Mon, May 11, 2009 at 9:34 AM, Ravindra Mandre <[email protected]
>> >wrote:
>>
>>  Thanks for reply Ruth,
>>> Actually I am working in form widget and in form-widget's field tag there
>>> is
>>> an attribute named "id-name" which is used to provide id for that field
>>> but
>>> I am using <check/> tag after the field and also  I provided id-name ,
>>> but
>>> not getting id for that field in firebug.
>>>
>>> may the code help you for giving solution.
>>>
>>> <field  id-name="existingNameId" name="existingName" title="Existing
>>> Name"
>>> widget-style="checkbox"><check>
>>> </field>
>>>
>>> In above when I inspecting "existingNameId" through firebug then it does
>>> not
>>> show any id???
>>>
>>>
>>> Thanks in advance
>>>
>>> Regards
>>> Ravindra Mandre
>>>
>>>
>>> On Sun, May 10, 2009 at 5:50 AM, Ruth Hoffman <[email protected]>
>>> wrote:
>>>
>>> > Actually, if the second example works - I would think it should read
>>> > something like:
>>> >
>>> > id="some_id {width: 120px}"
>>> >
>>> > Ruth
>>> >
>>> > Ruth Hoffman wrote:
>>> >
>>> >> Hi Ravi:
>>> >> How about:
>>> >> <container id="some_id">
>>> >> ...
>>> >> </container>
>>> >>
>>> >> Is that what you mean by set default value?
>>> >>
>>> >> Or do you want something like:
>>> >> id="some_id: {width: 120px}"?  Not sure if you can do this. Haven't
>>> tried.
>>> >>
>>> >> Ruth
>>> >> Ravi wrote:
>>> >>
>>> >>> Hi list,
>>> >>> Is there any way that we can give id for a field in form widget and
>>> >>> can set id's default value.
>>> >>> any answer much appreciated
>>> >>>
>>> >>>
>>> >>> Regards
>>> >>> Ravindra Mandre
>>> >>>
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> >>
>>> >
>>>
>>>
>>
>

Reply via email to