How to give id for a field in form widget

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How to give id for a field in form widget

Ravindra Mandre-2
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 | Threaded
Open this post in threaded view
|

Re: How to give id for a field in form widget

Ruth Hoffman-2
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 | Threaded
Open this post in threaded view
|

Re: How to give id for a field in form widget

Ruth Hoffman-2
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 | Threaded
Open this post in threaded view
|

Re: How to give id for a field in form widget

Adrian Crum-2

HTML styling doesn't work in the screen widgets because they are rendering platform agnostic.

-Adrian


--- On Sat, 5/9/09, Ruth Hoffman <[hidden email]> wrote:

> From: Ruth Hoffman <[hidden email]>
> Subject: Re: How to give id for a field in form widget
> To: [hidden email]
> Date: Saturday, May 9, 2009, 5:20 PM
> 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 | Threaded
Open this post in threaded view
|

Re: How to give id for a field in form widget

Ravindra Mandre-2
In reply to this post by Ruth Hoffman-2
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 <[hidden email]> 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 | Threaded
Open this post in threaded view
|

Re: How to give id for a field in form widget

Rishi Solanki
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.

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

On Mon, May 11, 2009 at 9:34 AM, Ravindra Mandre <[hidden email]>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 <[hidden email]>
> 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 | Threaded
Open this post in threaded view
|

Re: How to give id for a field in form widget

Jacques Le Roux
Administrator
From: "Rishi Solanki" <[hidden email]>
To: <[hidden email]>
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 <[hidden email]>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 <[hidden email]>
>> 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 | Threaded
Open this post in threaded view
|

Re: How to give id for a field in form widget

Rishi Solanki
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 <
[hidden email]> wrote:

> From: "Rishi Solanki" <[hidden email]>
> To: <[hidden email]>
> 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 <[hidden email]
>> >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 <[hidden email]>
>>> 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
>>> >>>
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> >>
>>> >
>>>
>>>
>>
>