Just an example to demonstrate my personal opinion:

<form name="name" type="single" target="createGlAccountOrganization"
title="" default-map-name="account">

   <field name="field1">

           <!-- if no controller element, then default controller will be
used based on field type from entity metadata -->
           <controller name="xxx.extend.Flex.RealTimePricing">
                <!-- parameters can be added in such style. Not like current
design that we have to put attributes or sub elements -->
                <param name="style" value="bluelight"/>
           </controller>


           <visbility>
                <!-- here ofbiz can define a set of default implementation.
Also, developers can implement new ones based on interface -->
                <!-- Maybe it is even better to introduce AND and OR to
combine multiple conditions together -->
                <condition
implementation="org.ofbiz.core.condition.NonEmptyField"/>
           </visbility>

           <!-- Ofbiz can use appropripate validation java implementaiton if
the validation is on server side or can render javascript if on
clientside.-->
           <validity>
               <And>
                  <!-- client side validitor sample -->
                  <validitor name="org.ofbiz.core.ClientSide.NotEmpty"/>
                  <!-- server side validitor sample -->
                  <validitor name="org.ofbiz.core.ServerSide.BetweenOf">
                       <param name="startValue" value="1"/>
                       <param name="endValue" value="5"/>
                  </validitor>
               </And>
           </validity>

           <!-- ofbiz can use different css style for editable and non
editable context -->
           <editability>
               <condidtions>
                    <Or>
                        <condition
implementaiton="org.ofbiz.core.condition.hasPermission">
                            <param name="permission" value="admin"/>
                        </condition>
                        <condition implementaiton="xxx.extension.blabla">
                        </condition>
                    </Or>
               </conditions>
           </editablity>
      </field>
   </field>

</form>

BTW: In order to keep back compatible, we can use a new tag <ofbizForm> or
something and then implement a new form render.

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


On Tue, Jan 12, 2010 at 5:43 PM, Michael Xu (xudong)
<dong...@wizitsoft.com>wrote:

> hi Jacques,
>
> So you mean you agree the solution that a new attribute should be added,
> right?
>
> I still doubt it. I don't think it is the best idea to add attributes for
> such requirements. Such creep changes without an elegant overall solution is
> kind of dangerous. Maybe it is time to refactor our design to allow
> customization without changing core schema.
>
> Just my personal opinion. Look forward to more comments.
>
> --
> Regards,
> Michael Xu (xudong)
> www.wizitsoft.com | Office: (8610) 6267 0615 ext 806 | Mobile: (86) 135
> 0135 9807 | Fax: (8610) 62670096
>
>
> On Tue, Jan 12, 2010 at 4:55 PM, Jacques Le Roux <
> jacques.le.r...@les7arts.com> wrote:
>
>> Hi,
>>
>> I agree with Hans and Raj on this.
>>
>> There has been a related discussion on this subject in the past.
>> http://markmail.org/message/ed4l4trj3cotnuvv
>> From this thread, I collected some ideas here
>>
>> http://cwiki.apache.org/confluence/display/OFBADMIN/New+Features+Roadmap+-+Living+Document#NewFeaturesRoadmap-LivingDocument-Quickeranintuitiveaccesstobasicfunctionnalities(creation,etc
>> .)
>>
>> I'd suggest to create an umbrella Jira issue and to create a subtask for
>> the "Small help icon next the form field title" idea
>>
>> Thanks
>>
>> Jacques
>>
>> From: "Hans Bakker" <mailingl...@antwebsystems.com>
>>
>>  I would think that:
>>>
>>> help: description of the field and the purpose within the system.
>>> tooltip: some other info: "optional/required" or "empty for new number"
>>>
>>> Regards,
>>> Hans
>>>
>>> On Tue, 2010-01-12 at 16:27 +0800, Michael Xu (xudong) wrote:
>>>
>>>> hi Raj,
>>>>
>>>> What's the difference between 'help' and 'tooltip'? Help is a more
>>>> complicated tooltip.
>>>>
>>>> In order to keep UI consistent, I would like to propose to embed the
>>>> "help"
>>>> (Maybe as "more information") within the tooltip.
>>>>
>>>> --
>>>> Regards,
>>>> Michael Xu (xudong)
>>>> www.wizitsoft.com | Office: (8610) 6267 0615 ext 806 | Mobile: (86) 135
>>>> 0135
>>>> 9807 | Fax: (8610) 62670096
>>>>
>>>>
>>>> On Tue, Jan 12, 2010 at 3:47 PM, Raj Saini <rajsa...@gmail.com> wrote:
>>>>
>>>> > Thanks Michael,
>>>> >
>>>> > Tool tips are used for other purposes and user may need both of them.
>>>> Would
>>>> > it not be okay add another attribute say "help" attribute to the form
>>>> > element?
>>>> >
>>>> > What does other in the community think of it as I want to go for this
>>>> > extension.
>>>> >
>>>> > Thanks,
>>>> >
>>>> >
>>>> > Raj
>>>> >
>>>> > Michael Xu (xudong) wrote:
>>>> >
>>>> >> hi Raj,
>>>> >>
>>>> >> You can use tooltip feature for this requirement plus the following
>>>> >> customizations:
>>>> >>
>>>> >> 1) customize form render to show tooltip right after label instead of
>>>> >> controller.
>>>> >> 2) customize theme to show tooltip as "?" and a new message layer
>>>> will be
>>>> >> popped up if user clicks it.
>>>> >>
>>>> >> --
>>>> >> Regards,
>>>> >> Michael Xu (xudong)
>>>> >> www.wizitsoft.com | Office: (8610) 6267 0615 ext 806 | Mobile: (86)
>>>> 135
>>>> >> 0135
>>>> >> 9807 | Fax: (8610) 62670096
>>>> >>
>>>> >>
>>>> >> On Fri, Jan 8, 2010 at 3:32 PM, Raj Saini <rajsa...@gmail.com>
>>>> wrote:
>>>> >>
>>>> >>
>>>> >>
>>>> >>> Hi,
>>>> >>>
>>>> >>> I want to show a small help icon (?) next to the form field title.
>>>> >>> Clicking
>>>> >>> on the icon should open a pop up describing the function of the
>>>> field. I
>>>> >>> searched around and could not find if it is possible with the form
>>>> >>> widget.
>>>> >>>
>>>> >>> Thanks,
>>>> >>>
>>>> >>> Raj
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>>
>>> --
>>> Antwebsystems.com: Quality OFBiz services for competitive rates
>>>
>>>
>>
>>
>

Reply via email to