Form Widget: Two Thumbs Up

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

Form Widget: Two Thumbs Up

Vinay Agarwal
Hello,

 

I just did a somewhat complex screen using form widget and I am impressed by
its capabilities.  One thing not clear from the available documentation
(Wiki and cookbook) is that the "single" form can be as easily  used with
multiple entities, just specify the entity name as map-name as part of the
field.

 

The only additional feature I would have wanted is capability to put more
than one field in the same output table cell. Position attribute has
slightly different effect as it aligns all same positions in the form.

 

Thanks to everyone involved with this great effort.

 

Regards,

Vinay Agarwal

 

Reply | Threaded
Open this post in threaded view
|

Re: Form Widget: Two Thumbs Up

Si Chen-2
Can you give an example of using a single-form with multiple entities?


On Jul 6, 2006, at 10:33 AM, Vinay Agarwal wrote:

> field.

Reply | Threaded
Open this post in threaded view
|

RE: Form Widget: Two Thumbs Up

Vinay Agarwal
Si,
Here's the simplified version.

Regards,
Vinay Agarwal

<form name="membersEdit" type="single" target="membersEdit" title=""
    default-title-style="tableheadtext" default-widget-style="inputBox"
default-tooltip-style="tabletext">
    <field map-name="personUserLogin" name="partyId"><hidden/></field>
    <field map-name="personUserLogin" name="firstName"
title="${uiLabelMap.PartyFirstName}*"><text size="20"/></field>
    <field map-name="personUserLogin" name="lastName"
title="${uiLabelMap.PartyLastName}*"><text size="20"/></field>
    <field name="space1" title=" " widget-style="tabletext"><display
description=" " also-hidden="false"/></field>

    <field map-name="contactMechEmail" name="email" entry-name="infoString"
title="${uiLabelMap.PartyEmailAddress}*"><text size="40"/></field>

    <field name="labelCountryCode" title=" " position="1"
widget-style="tabletext"><display
description="${uiLabelMap.PartyCountryCode}" also-hidden="false"/></field>
    <field name="labelAreaCode" title=" " position="2"
widget-style="tabletext"><display description="${uiLabelMap.PartyAreaCode}"
also-hidden="false"/></field>
    <field name="labelPhoneNumber" title=" " position="3"
widget-style="tabletext"><display
description="${uiLabelMap.PartyPhoneNumber}" also-hidden="false"/></field>
    <field map-name="phoneHome" name="countryCodeHome"
entry-name="countryCode" title="${uiLabelMap.PartyHomePhone}"><text size="4"
maxlength="10"/></field>
    <field map-name="phoneHome" name="areaCodeHome" entry-name="areaCode"
title=" " position="2"><text size="4" maxlength="10"/></field>
    <field map-name="phoneHome" name="phoneNumberHome"
entry-name="contactNumber" title=" " position="3"><text size="15"
maxlength="15"/></field>
    <field name="space4" title=" " widget-style="tabletext"><display
description=" " also-hidden="false"/></field>

    <field map-name="contactMechAddress" name="chooseAddress"
entry-name="contactMechId" title="${uiLabelMap.GZChooseAddress}*"
widget-style="radioButton">
        <radio>
            <list-options list-name="contactMechAddresses"
key-name="contactMechId" description="${address1} ${address2}, ${city},
${stateProvinceGeoId} ${postalCode}, ${countryGeoId}"/>
        </radio>
    </field>
    <field name="space" title=" " widget-style="tabletext"><display
description=" " also-hidden="false"/></field>
    <field name="labelRequired" title="*" widget-style="tabletext"><display
description="Required fields" also-hidden="false"/></field>
    <field name="submitButton" title="${uiLabelMap.CommonUpdate}"
widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
Reply | Threaded
Open this post in threaded view
|

Re: Form Widget: Two Thumbs Up

Si Chen-2
In reply to this post by Si Chen-2
Interesting...and how did you pass the Maps into this form?


On Jul 6, 2006, at 12:39 PM, Vinay Agarwal wrote:

> Si,
> Here's the simplified version.
>
> Regards,
> Vinay Agarwal
>
> <form name="membersEdit" type="single" target="membersEdit" title=""
>     default-title-style="tableheadtext" default-widget-
> style="inputBox"
> default-tooltip-style="tabletext">
>     <field map-name="personUserLogin" name="partyId"><hidden/></field>
>     <field map-name="personUserLogin" name="firstName"
> title="${uiLabelMap.PartyFirstName}*"><text size="20"/></field>
>     <field map-name="personUserLogin" name="lastName"
> title="${uiLabelMap.PartyLastName}*"><text size="20"/></field>
>     <field name="space1" title=" " widget-style="tabletext"><display
> description=" " also-hidden="false"/></field>
>
>     <field map-name="contactMechEmail" name="email" entry-
> name="infoString"
> title="${uiLabelMap.PartyEmailAddress}*"><text size="40"/></field>
>
>     <field name="labelCountryCode" title=" " position="1"
> widget-style="tabletext"><display
> description="${uiLabelMap.PartyCountryCode}" also-hidden="false"/></
> field>
>     <field name="labelAreaCode" title=" " position="2"
> widget-style="tabletext"><display description="$
> {uiLabelMap.PartyAreaCode}"
> also-hidden="false"/></field>
>     <field name="labelPhoneNumber" title=" " position="3"
> widget-style="tabletext"><display
> description="${uiLabelMap.PartyPhoneNumber}" also-hidden="false"/></
> field>
>     <field map-name="phoneHome" name="countryCodeHome"
> entry-name="countryCode" title="${uiLabelMap.PartyHomePhone}"><text  
> size="4"
> maxlength="10"/></field>
>     <field map-name="phoneHome" name="areaCodeHome" entry-
> name="areaCode"
> title=" " position="2"><text size="4" maxlength="10"/></field>
>     <field map-name="phoneHome" name="phoneNumberHome"
> entry-name="contactNumber" title=" " position="3"><text size="15"
> maxlength="15"/></field>
>     <field name="space4" title=" " widget-style="tabletext"><display
> description=" " also-hidden="false"/></field>
>
>     <field map-name="contactMechAddress" name="chooseAddress"
> entry-name="contactMechId" title="${uiLabelMap.GZChooseAddress}*"
> widget-style="radioButton">
>         <radio>
>             <list-options list-name="contactMechAddresses"
> key-name="contactMechId" description="${address1} ${address2}, $
> {city},
> ${stateProvinceGeoId} ${postalCode}, ${countryGeoId}"/>
>         </radio>
>     </field>
>     <field name="space" title=" " widget-style="tabletext"><display
> description=" " also-hidden="false"/></field>
>     <field name="labelRequired" title="*" widget-
> style="tabletext"><display
> description="Required fields" also-hidden="false"/></field>
>     <field name="submitButton" title="${uiLabelMap.CommonUpdate}"
> widget-style="smallSubmit"><submit button-type="button"/></field>
> </form>

Reply | Threaded
Open this post in threaded view
|

RE: Form Widget: Two Thumbs Up

Vinay Agarwal
The maps are in "context" as usual.

Regards,
Vinay Agarwal


-----Original Message-----
From: Si Chen [mailto:[hidden email]]
Sent: Thursday, July 06, 2006 4:09 PM
To: [hidden email]
Subject: Re: Form Widget: Two Thumbs Up

Interesting...and how did you pass the Maps into this form?


Reply | Threaded
Open this post in threaded view
|

Re: Form Widget: Two Thumbs Up

Si Chen-2
In reply to this post by Si Chen-2
Like

context.put("map1", ...);
context.put("map2", ...);

in a .bsh?


On Jul 6, 2006, at 4:52 PM, Vinay Agarwal wrote:

> The maps are in "context" as usual.
>
> Regards,
> Vinay Agarwal
>
>
> -----Original Message-----
> From: Si Chen [mailto:[hidden email]]
> Sent: Thursday, July 06, 2006 4:09 PM
> To: [hidden email]
> Subject: Re: Form Widget: Two Thumbs Up
>
> Interesting...and how did you pass the Maps into this form?
>

Reply | Threaded
Open this post in threaded view
|

RE: Form Widget: Two Thumbs Up

Vinay Agarwal
From the form in my previous email,
 
context.put("personUserLogin", ...);
context.put("contactMechEmail", ...);
context.put("phoneHome", ...);
context.put("contactMechAddress", ...);

Bsh would work although I used Java. That way I can put the "getter" method
(for the screen widget) right next to the "setter" method (event handler)
and share the code between the two.

Regards,
Vinay Agarwal


-----Original Message-----
From: Si Chen [mailto:[hidden email]]
Sent: Thursday, July 06, 2006 5:00 PM
To: [hidden email]
Subject: Re: Form Widget: Two Thumbs Up

Like

context.put("map1", ...);
context.put("map2", ...);

in a .bsh?


On Jul 6, 2006, at 4:52 PM, Vinay Agarwal wrote:

> The maps are in "context" as usual.
>
> Regards,
> Vinay Agarwal
>
>
> -----Original Message-----
> From: Si Chen [mailto:[hidden email]]
> Sent: Thursday, July 06, 2006 4:09 PM
> To: [hidden email]
> Subject: Re: Form Widget: Two Thumbs Up
>
> Interesting...and how did you pass the Maps into this form?
>