How to show form field tool tip on mouse over

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

How to show form field tool tip on mouse over

rajsaini
Hi,

I want to show the tool tip for a form field on mouse over. All examples
Various forms I found in OFBiz, render the tool tip as hint label. Is it
possible to show the tool tip on mouse over on a form field?

Thanks,

Raj
Reply | Threaded
Open this post in threaded view
|

Re: How to show form field tool tip on mouse over

Rishi Solanki
Hi Raj,
Currently there is no support for this in Form widget ; I think this support
should be there in form widget.
This can be easily done by the title attribute of any input as follows;
<input type="text" autocomplete="off" id="findCommEvents_partyIdTo"
size="25" name="partyIdTo" title="Party Id To"/>

I try to submit a patch to give this support till Monday.

Rishi Solanki
Enterprise Software Developer
HotWax Media Pvt. Ltd.


On Fri, Jan 8, 2010 at 1:50 PM, Raj Saini <[hidden email]> wrote:

> Hi,
>
> I want to show the tool tip for a form field on mouse over. All examples
> Various forms I found in OFBiz, render the tool tip as hint label. Is it
> possible to show the tool tip on mouse over on a form field?
>
> Thanks,
>
> Raj
>
Reply | Threaded
Open this post in threaded view
|

Re: How to show form field tool tip on mouse over

rajsaini
Hi Rishi,

Thank you very much and look forward to this feature in OFbiz.

Thanks,

Raj

Rishi Solanki wrote:

> Hi Raj,
> Currently there is no support for this in Form widget ; I think this support
> should be there in form widget.
> This can be easily done by the title attribute of any input as follows;
> <input type="text" autocomplete="off" id="findCommEvents_partyIdTo"
> size="25" name="partyIdTo" title="Party Id To"/>
>
> I try to submit a patch to give this support till Monday.
>
> Rishi Solanki
> Enterprise Software Developer
> HotWax Media Pvt. Ltd.
>
>
> On Fri, Jan 8, 2010 at 1:50 PM, Raj Saini <[hidden email]> wrote:
>
>  
>> Hi,
>>
>> I want to show the tool tip for a form field on mouse over. All examples
>> Various forms I found in OFBiz, render the tool tip as hint label. Is it
>> possible to show the tool tip on mouse over on a form field?
>>
>> Thanks,
>>
>> Raj
>>
>>    
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: How to show form field tool tip on mouse over

Parimal Gain
In reply to this post by rajsaini
Hello Raj,

One way to do this might be call javascript method from the form field
and write necessary code that you want to display as tooltip within the
method.
You can call javascript method by following manner :

<field name="abc" event="onmouseover"
action="javascript:methodName();"/>

Regards
--
Parimal Gain


On Fri, 2010-01-08 at 13:50 +0530, Raj Saini wrote:
> Hi,
>
> I want to show the tool tip for a form field on mouse over. All examples
> Various forms I found in OFBiz, render the tool tip as hint label. Is it
> possible to show the tool tip on mouse over on a form field?
>
> Thanks,
>
> Raj



Reply | Threaded
Open this post in threaded view
|

Re: How to show form field tool tip on mouse over

Bruno Busco
Having a field widget property that renders to the title property to
the input field seems much simpler.
-Bruno

2010/1/8 Parimal Gain <[hidden email]>:

> Hello Raj,
>
> One way to do this might be call javascript method from the form field
> and write necessary code that you want to display as tooltip within the
> method.
> You can call javascript method by following manner :
>
> <field name="abc" event="onmouseover"
> action="javascript:methodName();"/>
>
> Regards
> --
> Parimal Gain
>
>
> On Fri, 2010-01-08 at 13:50 +0530, Raj Saini wrote:
>> Hi,
>>
>> I want to show the tool tip for a form field on mouse over. All examples
>> Various forms I found in OFBiz, render the tool tip as hint label. Is it
>> possible to show the tool tip on mouse over on a form field?
>>
>> Thanks,
>>
>> Raj
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to show form field tool tip on mouse over

Michael Xu (xudong)
hi Bruno,

However, such improvement needs to change the form widget schema and the
render. I proposed another way to make form widget more flexible. For your
reference, I pasted it here:

>>>>

hi all,

In ofbiz form, we can use lookup controller for fields which link to
entities. But the lookup controller only support to return single value. How
to implement a multiple lookup?

Looking into source code, it seems that we have to extend a new controller
in form widget schema and implement it in the form render. Is it a correct
way to go?

BTW: In my opinion, it is not flexible to extend form widget in current
design. (correct me if I am wrong). Let's take one example.

<form name="AssignGlAccount" type="single"
target="createGlAccountOrganization" title="" default-map-name="account"
        header-row-style="header-row" default-table-style="basic-table">
        <field name="glAccountId">
            <drop-down>
                <entity-options entity-name="GlAccount"
description="${accountCode} - ${accountName} [${glAccountId}]">
                    <entity-order-by field-name="accountCode"/>
                </entity-options>
            </drop-down>
        </field>
...
</form>

Here, we have to use <drop-down> tag to tell system to render a HTML
drop-down component. But what if a customized field? Then do we have to
change form widget schema for that field? And then add the render logic in
the long switch-cases?

Maybe we can refactor the design, like this:

<form name="AssignGlAccount" type="single"
target="createGlAccountOrganization" title="" default-map-name="account"
        header-row-style="header-row" default-table-style="basic-table">
        <field name="glAccountId">
            <controller name="drop-down">
            <!--
                for new non-standard controller, we can define like this:
<controller name="org.ofbiz.FancyDropDown">
             -->
                <param key="entity-name" value="GLAccount"/>
                <param key="description" value="...."/>
                <param key="entity-order-by" value="accountCode"/>
            <!--
                for new non-standard controller, we can define new
parameters
             -->
        </field>
...
</form>

with the new design, then we don't need to break the schema and change the
core code of render logic. Instead, we just need to implement a new
controller from a predefined controller interface. And then we can reuse it
in all forms.

(In here, due to the limitation of current form widget, we have to give up
form and use FTL directly.)

--
Regards,
Michael Xu (xudong)
www.wizitsoft.com | Office: (8610) 6267 0615 ext 806 | Mobile: (86) 135 0135
9807 | Fax: (8610) 62670096


On Sat, Jan 9, 2010 at 1:17 AM, Bruno Busco <[hidden email]> wrote:

> Having a field widget property that renders to the title property to
> the input field seems much simpler.
> -Bruno
>
> 2010/1/8 Parimal Gain <[hidden email]>:
> > Hello Raj,
> >
> > One way to do this might be call javascript method from the form field
> > and write necessary code that you want to display as tooltip within the
> > method.
> > You can call javascript method by following manner :
> >
> > <field name="abc" event="onmouseover"
> > action="javascript:methodName();"/>
> >
> > Regards
> > --
> > Parimal Gain
> >
> >
> > On Fri, 2010-01-08 at 13:50 +0530, Raj Saini wrote:
> >> Hi,
> >>
> >> I want to show the tool tip for a form field on mouse over. All examples
> >> Various forms I found in OFBiz, render the tool tip as hint label. Is it
> >> possible to show the tool tip on mouse over on a form field?
> >>
> >> Thanks,
> >>
> >> Raj
> >
> >
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: How to show form field tool tip on mouse over

Bruno Busco
Hi Michael,
having a lookup that returns multiple selected values in a field is a
general enough task that should be addressed with a general purpose
tool.
It could be a different decorator from which exten the lookup
decorator (so for example we could have a multiLookupDecorator in
addition to the actual lookupDecorator).

In one project I have already done this, I need some time to see if
this was implemented in an enough general way to be reused.

-Bruno


2010/1/9 Michael Xu (xudong) <[hidden email]>:

> hi Bruno,
>
> However, such improvement needs to change the form widget schema and the
> render. I proposed another way to make form widget more flexible. For your
> reference, I pasted it here:
>
>>>>>
>
> hi all,
>
> In ofbiz form, we can use lookup controller for fields which link to
> entities. But the lookup controller only support to return single value. How
> to implement a multiple lookup?
>
> Looking into source code, it seems that we have to extend a new controller
> in form widget schema and implement it in the form render. Is it a correct
> way to go?
>
> BTW: In my opinion, it is not flexible to extend form widget in current
> design. (correct me if I am wrong). Let's take one example.
>
> <form name="AssignGlAccount" type="single"
> target="createGlAccountOrganization" title="" default-map-name="account"
>        header-row-style="header-row" default-table-style="basic-table">
>        <field name="glAccountId">
>            <drop-down>
>                <entity-options entity-name="GlAccount"
> description="${accountCode} - ${accountName} [${glAccountId}]">
>                    <entity-order-by field-name="accountCode"/>
>                </entity-options>
>            </drop-down>
>        </field>
> ...
> </form>
>
> Here, we have to use <drop-down> tag to tell system to render a HTML
> drop-down component. But what if a customized field? Then do we have to
> change form widget schema for that field? And then add the render logic in
> the long switch-cases?
>
> Maybe we can refactor the design, like this:
>
> <form name="AssignGlAccount" type="single"
> target="createGlAccountOrganization" title="" default-map-name="account"
>        header-row-style="header-row" default-table-style="basic-table">
>        <field name="glAccountId">
>            <controller name="drop-down">
>            <!--
>                for new non-standard controller, we can define like this:
> <controller name="org.ofbiz.FancyDropDown">
>             -->
>                <param key="entity-name" value="GLAccount"/>
>                <param key="description" value="...."/>
>                <param key="entity-order-by" value="accountCode"/>
>            <!--
>                for new non-standard controller, we can define new
> parameters
>             -->
>        </field>
> ...
> </form>
>
> with the new design, then we don't need to break the schema and change the
> core code of render logic. Instead, we just need to implement a new
> controller from a predefined controller interface. And then we can reuse it
> in all forms.
>
> (In here, due to the limitation of current form widget, we have to give up
> form and use FTL directly.)
>
> --
> Regards,
> Michael Xu (xudong)
> www.wizitsoft.com | Office: (8610) 6267 0615 ext 806 | Mobile: (86) 135 0135
> 9807 | Fax: (8610) 62670096
>
>
> On Sat, Jan 9, 2010 at 1:17 AM, Bruno Busco <[hidden email]> wrote:
>
>> Having a field widget property that renders to the title property to
>> the input field seems much simpler.
>> -Bruno
>>
>> 2010/1/8 Parimal Gain <[hidden email]>:
>> > Hello Raj,
>> >
>> > One way to do this might be call javascript method from the form field
>> > and write necessary code that you want to display as tooltip within the
>> > method.
>> > You can call javascript method by following manner :
>> >
>> > <field name="abc" event="onmouseover"
>> > action="javascript:methodName();"/>
>> >
>> > Regards
>> > --
>> > Parimal Gain
>> >
>> >
>> > On Fri, 2010-01-08 at 13:50 +0530, Raj Saini wrote:
>> >> Hi,
>> >>
>> >> I want to show the tool tip for a form field on mouse over. All examples
>> >> Various forms I found in OFBiz, render the tool tip as hint label. Is it
>> >> possible to show the tool tip on mouse over on a form field?
>> >>
>> >> Thanks,
>> >>
>> >> Raj
>> >
>> >
>> >
>> >
>>
>