Hi BJ,
thank you for your help.
I apologize not sure to have well understood.

In the example you give, all fields are taken from the form's
default-entity.

I am looking for a way to put fields in a form widget that are not defined
as fields of an entity and neither as parameters of a serivice.
The service the form widget targets to should receive the fields in a map
and being able to iterate through these.

-Bruno

2008/11/2 BJ Freeman <[EMAIL PROTECTED]>

> in ofbiz forms are fixed, like most you see in widgets and ftls.
> you have a entity and/or context that stores the info, like in maps.
> you then use the widget/ftl form to display the data in the entity or
> context.
> the ItemsToShow would be a map.
> you would then iterate the map. you can see many examples of this.
> you then set a field on the selection
> here is an example you can find it in the blllingaccountsform.xml
>    <form name="ListBillingAccounts" type="list"
> list-name="billingAccounts" paginate-target="FindBillingAccount"
> default-entity-name="BillingAccount"
>        odd-row-style="alternate-row" default-table-style="basic-table
> hover-bar">
>        <field name="billingAccountId" widget-style="buttontext">
>            <hyperlink description="${billingAccountId}"
> target="EditBillingAccount?billingAccountId=${billingAccountId}"/>
>        </field>
> this would got thru the contorller that would call
> setPortalPortletAttributes then return to a view request.
>
>
> Bruno Busco sent the following on 11/2/2008 2:05 AM:
> > Hi devs,
> > I need your help.
> >
> > I am trying to complete the Portal/Portlet stuff adding the possibility
> to
> > set some attributes specific to a Portlet instance.
> >
> > The idea is that when a portlet is defined, a form is defined also and
> > linked in the PortalPortlet entity with something similar to this:
> >     <PortalPortlet portalPortletId="LOGIN" portletName="Login"
> > description="Login form"
> >                    screenName="loginPortlet"
> > screenLocation="component://common/widget/PortletScreens.xml"
> >                    editFormName="LoginPortletEdit"
> > editFormLocation="component://common/widget/PortletEditForms.xml" />
> >
> > The form is needed to edit a particular Portlet instance attributes. This
> > extends from a common frame defined in the framework like this:
> >     <form name="CommonPortletEdit" type="single"
> > target="setPortalPortletAttributes" title=""
> > default-map-name="PortalPortletAttributeMap">
> >         <field name="portalPageId"><hidden/></field>
> >         <field name="portalPortletId"><hidden/></field>
> >         <field name="portletSeqId"><hidden/></field>
> >         <field name="submitButton"
> title="${uiLabelMap.CommonEdit}"><submit
> > button-type="button"/></field>
> >     </form>
> >
> > Using this method an example of a specific portlet attribute editing form
> > could be:
> >     <form name="LoginPortletEdit" extends="CommonPortletEdit"
> > extends-resource="component://common/widget/CommonForms.xml">
> >         <field name="ItemsToShow">
> >             <drop-down allow-empty="false">
> >                 <option key="5"/>
> >                 <option key="15"/>
> >                 <option key="20"/>
> >                 <option key="25"/>
> >                 <option key="30"/>
> >                 <option key="35"/>
> >             </drop-down>
> >         </field>
> >     </form>
> >
> > In this example I supposed that the portlet has an attribute
> "ItemsToShow"
> > that tells the portlet how many items to show.
> >
> > When the user submits one of the portlet attributes editing forms, the
> > setPortalPortletAttributes service is triggered.
> >
> > My problem is now how to make this service able to retrieve from the
> > submitted form the list of fields so that the Attribute entities can be
> > created/updated.
> >
> > Is there an example of this in OFBiz?
> > How can the service receive a map of fields that is not constant to
> iterate
> > on?
> >
> > Many thanks for your help!
> > -Bruno
> >
>

Reply via email to