Re: svn commit: r1338836 - in /ofbiz/branches/release12.04: ./ framework/base/dtd/ framework/base/src/org/ofbiz/base/util/ framework/common/config/ framework/webtools/src/org/ofbiz/webtools/labelmanager/

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

Re: CommonEmptyHeader

Adrian Crum-3
On 5/16/2012 11:44 AM, Christian Geisert wrote:

> What's the point of CommonEmptyHeader?
>
> It's definied in CommonUiLabels.xml as:
>
> <property key="CommonEmptyHeader">
>      <!-- do not  remove this! -->
>      <value xml:lang="en" xml:space="preserve">  </value>
> </property>
>
> It is just a simple space (0x20)
>
> It is used ~500 times in forms as a title in a field definition
>
> Example:
>
> <form name="EditPerson" type="single" target="updatePerson"
>    ...
>    <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}"
>
>      <hyperlink target="${donePage}" also-hidden="false"
>        description="${uiLabelMap.CommonCancelDone}">
>        <parameter param-name="partyId"/>
>      </hyperlink>
>    </field>
> </form>
>
>
> This is a button which should have no label, but if the title attribute
> is empty then the name attribute is used as label.
>
> Why not just put a space (" ") into the title attribute - still a hack,
> but exactly same result a using CommonEmptyHeader without the need using
> CommonEmptyHeader.
>
> The real solution is of course not to display a label if the title
> attribute is empty.

An empty title attribute is meant to be a shortcut, or a developer's
convenience - the widgets will use the field name to look up the correct
label.

Putting a space in the title attribute is the only way to turn off the
default behavior.

-Adrian

Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Christian Geisert
Adrian Crum schrieb:

> On 5/16/2012 11:44 AM, Christian Geisert wrote:
>> What's the point of CommonEmptyHeader?
>>
>> It's definied in CommonUiLabels.xml as:
>>
>> <property key="CommonEmptyHeader">
>>      <!-- do not  remove this! -->
>>      <value xml:lang="en" xml:space="preserve">  </value>
>> </property>
>>
>> It is just a simple space (0x20)
>>
>> It is used ~500 times in forms as a title in a field definition
>>
>> Example:
>>
>> <form name="EditPerson" type="single" target="updatePerson"
>>    ...
>>    <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}"
>>
>>      <hyperlink target="${donePage}" also-hidden="false"
>>        description="${uiLabelMap.CommonCancelDone}">
>>        <parameter param-name="partyId"/>
>>      </hyperlink>
>>    </field>
>> </form>
>>
>>
>> This is a button which should have no label, but if the title attribute
>> is empty then the name attribute is used as label.
>>
>> Why not just put a space (" ") into the title attribute - still a hack,
>> but exactly same result a using CommonEmptyHeader without the need using
>> CommonEmptyHeader.
>>
>> The real solution is of course not to display a label if the title
>> attribute is empty.
>
> An empty title attribute is meant to be a shortcut, or a developer's
> convenience - the widgets will use the field name to look up the correct
> label.

Ah, ok that's this FormFieldTitle_ stuff (which I don't like and use ;-)
 - IMHO it is bad for re-using labels...)

> Putting a space in the title attribute is the only way to turn off the
> default behavior.

Ok, so there is nothing against replacing
"${uiLabelMap.CommonEmptyHeader}" with " "?

Christian
Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Adrian Crum-3
On 5/16/2012 12:17 PM, Christian Geisert wrote:

> Adrian Crum schrieb:
>> On 5/16/2012 11:44 AM, Christian Geisert wrote:
>>> What's the point of CommonEmptyHeader?
>>>
>>> It's definied in CommonUiLabels.xml as:
>>>
>>> <property key="CommonEmptyHeader">
>>>       <!-- do not  remove this! -->
>>>       <value xml:lang="en" xml:space="preserve">   </value>
>>> </property>
>>>
>>> It is just a simple space (0x20)
>>>
>>> It is used ~500 times in forms as a title in a field definition
>>>
>>> Example:
>>>
>>> <form name="EditPerson" type="single" target="updatePerson"
>>>     ...
>>>     <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}"
>>>
>>>       <hyperlink target="${donePage}" also-hidden="false"
>>>         description="${uiLabelMap.CommonCancelDone}">
>>>         <parameter param-name="partyId"/>
>>>       </hyperlink>
>>>     </field>
>>> </form>
>>>
>>>
>>> This is a button which should have no label, but if the title attribute
>>> is empty then the name attribute is used as label.
>>>
>>> Why not just put a space (" ") into the title attribute - still a hack,
>>> but exactly same result a using CommonEmptyHeader without the need using
>>> CommonEmptyHeader.
>>>
>>> The real solution is of course not to display a label if the title
>>> attribute is empty.
>> An empty title attribute is meant to be a shortcut, or a developer's
>> convenience - the widgets will use the field name to look up the correct
>> label.
> Ah, ok that's this FormFieldTitle_ stuff (which I don't like and use ;-)
>   - IMHO it is bad for re-using labels...)
>
>> Putting a space in the title attribute is the only way to turn off the
>> default behavior.
> Ok, so there is nothing against replacing
> "${uiLabelMap.CommonEmptyHeader}" with " "?
>

That is what we would like to do - but it doesn't work. That is what
needs to be fixed.

-Adrian


Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Scott Gray-2
On 16/05/2012, at 11:21 PM, Adrian Crum wrote:

> On 5/16/2012 12:17 PM, Christian Geisert wrote:
>> Adrian Crum schrieb:
>>> On 5/16/2012 11:44 AM, Christian Geisert wrote:
>>>> What's the point of CommonEmptyHeader?
>>>>
>>>> It's definied in CommonUiLabels.xml as:
>>>>
>>>> <property key="CommonEmptyHeader">
>>>>      <!-- do not  remove this! -->
>>>>      <value xml:lang="en" xml:space="preserve">   </value>
>>>> </property>
>>>>
>>>> It is just a simple space (0x20)
>>>>
>>>> It is used ~500 times in forms as a title in a field definition
>>>>
>>>> Example:
>>>>
>>>> <form name="EditPerson" type="single" target="updatePerson"
>>>>    ...
>>>>    <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}"
>>>>
>>>>      <hyperlink target="${donePage}" also-hidden="false"
>>>>        description="${uiLabelMap.CommonCancelDone}">
>>>>        <parameter param-name="partyId"/>
>>>>      </hyperlink>
>>>>    </field>
>>>> </form>
>>>>
>>>>
>>>> This is a button which should have no label, but if the title attribute
>>>> is empty then the name attribute is used as label.
>>>>
>>>> Why not just put a space (" ") into the title attribute - still a hack,
>>>> but exactly same result a using CommonEmptyHeader without the need using
>>>> CommonEmptyHeader.
>>>>
>>>> The real solution is of course not to display a label if the title
>>>> attribute is empty.
>>> An empty title attribute is meant to be a shortcut, or a developer's
>>> convenience - the widgets will use the field name to look up the correct
>>> label.
>> Ah, ok that's this FormFieldTitle_ stuff (which I don't like and use ;-)
>>  - IMHO it is bad for re-using labels...)
>>
>>> Putting a space in the title attribute is the only way to turn off the
>>> default behavior.
>> Ok, so there is nothing against replacing
>> "${uiLabelMap.CommonEmptyHeader}" with " "?
>>
>
> That is what we would like to do - but it doesn't work. That is what needs to be fixed.
>
> -Adrian

Does element.hasAttribute really return false if an attribute exists with an empty value?  You'd think the javadoc would call that out since it defies common sense.

Regards
Scott
Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Scott Gray-2

On 16/05/2012, at 11:27 PM, Scott Gray wrote:

> On 16/05/2012, at 11:21 PM, Adrian Crum wrote:
>
>> On 5/16/2012 12:17 PM, Christian Geisert wrote:
>>> Adrian Crum schrieb:
>>>> On 5/16/2012 11:44 AM, Christian Geisert wrote:
>>>>> What's the point of CommonEmptyHeader?
>>>>>
>>>>> It's definied in CommonUiLabels.xml as:
>>>>>
>>>>> <property key="CommonEmptyHeader">
>>>>>     <!-- do not  remove this! -->
>>>>>     <value xml:lang="en" xml:space="preserve">   </value>
>>>>> </property>
>>>>>
>>>>> It is just a simple space (0x20)
>>>>>
>>>>> It is used ~500 times in forms as a title in a field definition
>>>>>
>>>>> Example:
>>>>>
>>>>> <form name="EditPerson" type="single" target="updatePerson"
>>>>>   ...
>>>>>   <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}"
>>>>>
>>>>>     <hyperlink target="${donePage}" also-hidden="false"
>>>>>       description="${uiLabelMap.CommonCancelDone}">
>>>>>       <parameter param-name="partyId"/>
>>>>>     </hyperlink>
>>>>>   </field>
>>>>> </form>
>>>>>
>>>>>
>>>>> This is a button which should have no label, but if the title attribute
>>>>> is empty then the name attribute is used as label.
>>>>>
>>>>> Why not just put a space (" ") into the title attribute - still a hack,
>>>>> but exactly same result a using CommonEmptyHeader without the need using
>>>>> CommonEmptyHeader.
>>>>>
>>>>> The real solution is of course not to display a label if the title
>>>>> attribute is empty.
>>>> An empty title attribute is meant to be a shortcut, or a developer's
>>>> convenience - the widgets will use the field name to look up the correct
>>>> label.
>>> Ah, ok that's this FormFieldTitle_ stuff (which I don't like and use ;-)
>>> - IMHO it is bad for re-using labels...)
>>>
>>>> Putting a space in the title attribute is the only way to turn off the
>>>> default behavior.
>>> Ok, so there is nothing against replacing
>>> "${uiLabelMap.CommonEmptyHeader}" with " "?
>>>
>>
>> That is what we would like to do - but it doesn't work. That is what needs to be fixed.
>>
>> -Adrian
>
> Does element.hasAttribute really return false if an attribute exists with an empty value?  You'd think the javadoc would call that out since it defies common sense.
>
> Regards
> Scott


If it does actually return true then we could just change this:
    if (UtilValidate.isNotEmpty(this.title)) return title.expandString(context);
to this:
    if (this.title != null) return title.expandString(context);



Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Christian Geisert
In reply to this post by Adrian Crum-3
Adrian Crum schrieb:

> On 5/16/2012 12:17 PM, Christian Geisert wrote:
>> Adrian Crum schrieb:
>>> On 5/16/2012 11:44 AM, Christian Geisert wrote:
>>>> What's the point of CommonEmptyHeader?
>>>>
>>>> It's definied in CommonUiLabels.xml as:
>>>>
>>>> <property key="CommonEmptyHeader">
>>>>       <!-- do not  remove this! -->
>>>>       <value xml:lang="en" xml:space="preserve">   </value>
>>>> </property>
>>>>
>>>> It is just a simple space (0x20)
>>>>
>>>> It is used ~500 times in forms as a title in a field definition
>>>>
>>>> Example:
>>>>
>>>> <form name="EditPerson" type="single" target="updatePerson"
>>>>     ...
>>>>     <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}"
>>>>
>>>>       <hyperlink target="${donePage}" also-hidden="false"
>>>>         description="${uiLabelMap.CommonCancelDone}">
>>>>         <parameter param-name="partyId"/>
>>>>       </hyperlink>
>>>>     </field>
>>>> </form>
>>>>
>>>>
>>>> This is a button which should have no label, but if the title attribute
>>>> is empty then the name attribute is used as label.
>>>>
>>>> Why not just put a space (" ") into the title attribute - still a hack,
>>>> but exactly same result a using CommonEmptyHeader without the need
>>>> using
>>>> CommonEmptyHeader.
>>>>
>>>> The real solution is of course not to display a label if the title
>>>> attribute is empty.
>>> An empty title attribute is meant to be a shortcut, or a developer's
>>> convenience - the widgets will use the field name to look up the correct
>>> label.
>> Ah, ok that's this FormFieldTitle_ stuff (which I don't like and use ;-)
>>   - IMHO it is bad for re-using labels...)
>>
>>> Putting a space in the title attribute is the only way to turn off the
>>> default behavior.
>> Ok, so there is nothing against replacing
>> "${uiLabelMap.CommonEmptyHeader}" with " "?
>>
>
> That is what we would like to do - but it doesn't work. That is what
> needs to be fixed.
But if I do this in the above mentioned example (see attached patch) it
seems to give the expected result (= no label). I'm a missing something?

Christian


Index: applications/party/widget/partymgr/PartyForms.xml
===================================================================
--- applications/party/widget/partymgr/PartyForms.xml (Revision 1339064)
+++ applications/party/widget/partymgr/PartyForms.xml (Arbeitskopie)
@@ -90,7 +90,7 @@
             </drop-down>
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonSave}"><submit button-type="button"/></field>
-        <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="smallSubmit">
+        <field name="cancelLink" title=" " widget-style="smallSubmit">
             <hyperlink target="${donePage}" also-hidden="false" description="${uiLabelMap.CommonCancelDone}">
                 <parameter param-name="partyId"/>
             </hyperlink>
Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Adrian Crum-3
On 5/16/2012 12:33 PM, Christian Geisert wrote:

> Adrian Crum schrieb:
>> On 5/16/2012 12:17 PM, Christian Geisert wrote:
>>> Adrian Crum schrieb:
>>>> On 5/16/2012 11:44 AM, Christian Geisert wrote:
>>>>> What's the point of CommonEmptyHeader?
>>>>>
>>>>> It's definied in CommonUiLabels.xml as:
>>>>>
>>>>> <property key="CommonEmptyHeader">
>>>>>        <!-- do not  remove this! -->
>>>>>        <value xml:lang="en" xml:space="preserve">    </value>
>>>>> </property>
>>>>>
>>>>> It is just a simple space (0x20)
>>>>>
>>>>> It is used ~500 times in forms as a title in a field definition
>>>>>
>>>>> Example:
>>>>>
>>>>> <form name="EditPerson" type="single" target="updatePerson"
>>>>>      ...
>>>>>      <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}"
>>>>>
>>>>>        <hyperlink target="${donePage}" also-hidden="false"
>>>>>          description="${uiLabelMap.CommonCancelDone}">
>>>>>          <parameter param-name="partyId"/>
>>>>>        </hyperlink>
>>>>>      </field>
>>>>> </form>
>>>>>
>>>>>
>>>>> This is a button which should have no label, but if the title attribute
>>>>> is empty then the name attribute is used as label.
>>>>>
>>>>> Why not just put a space (" ") into the title attribute - still a hack,
>>>>> but exactly same result a using CommonEmptyHeader without the need
>>>>> using
>>>>> CommonEmptyHeader.
>>>>>
>>>>> The real solution is of course not to display a label if the title
>>>>> attribute is empty.
>>>> An empty title attribute is meant to be a shortcut, or a developer's
>>>> convenience - the widgets will use the field name to look up the correct
>>>> label.
>>> Ah, ok that's this FormFieldTitle_ stuff (which I don't like and use ;-)
>>>    - IMHO it is bad for re-using labels...)
>>>
>>>> Putting a space in the title attribute is the only way to turn off the
>>>> default behavior.
>>> Ok, so there is nothing against replacing
>>> "${uiLabelMap.CommonEmptyHeader}" with " "?
>>>
>> That is what we would like to do - but it doesn't work. That is what
>> needs to be fixed.
> But if I do this in the above mentioned example (see attached patch) it
> seems to give the expected result (= no label). I'm a missing something?

Most likely I am missing something. The last time I checked it didn't
work - but that was a long time ago. Maybe it has been fixed since then.

-Adrian

Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Jacques Le Roux
Administrator
In reply to this post by Christian Geisert
From: "Christian Geisert" <[hidden email]>

> Adrian Crum schrieb:
>> On 5/16/2012 12:17 PM, Christian Geisert wrote:
>>> Adrian Crum schrieb:
>>>> On 5/16/2012 11:44 AM, Christian Geisert wrote:
>>>>> What's the point of CommonEmptyHeader?
>>>>>
>>>>> It's definied in CommonUiLabels.xml as:
>>>>>
>>>>> <property key="CommonEmptyHeader">
>>>>>       <!-- do not  remove this! -->
>>>>>       <value xml:lang="en" xml:space="preserve">   </value>
>>>>> </property>
>>>>>
>>>>> It is just a simple space (0x20)
>>>>>
>>>>> It is used ~500 times in forms as a title in a field definition
>>>>>
>>>>> Example:
>>>>>
>>>>> <form name="EditPerson" type="single" target="updatePerson"
>>>>>     ...
>>>>>     <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}"
>>>>>
>>>>>       <hyperlink target="${donePage}" also-hidden="false"
>>>>>         description="${uiLabelMap.CommonCancelDone}">
>>>>>         <parameter param-name="partyId"/>
>>>>>       </hyperlink>
>>>>>     </field>
>>>>> </form>
>>>>>
>>>>>
>>>>> This is a button which should have no label, but if the title attribute
>>>>> is empty then the name attribute is used as label.
>>>>>
>>>>> Why not just put a space (" ") into the title attribute - still a hack,
>>>>> but exactly same result a using CommonEmptyHeader without the need
>>>>> using
>>>>> CommonEmptyHeader.
>>>>>
>>>>> The real solution is of course not to display a label if the title
>>>>> attribute is empty.
>>>> An empty title attribute is meant to be a shortcut, or a developer's
>>>> convenience - the widgets will use the field name to look up the correct
>>>> label.
>>> Ah, ok that's this FormFieldTitle_ stuff (which I don't like and use ;-)
>>>   - IMHO it is bad for re-using labels...)
>>>
>>>> Putting a space in the title attribute is the only way to turn off the
>>>> default behavior.
>>> Ok, so there is nothing against replacing
>>> "${uiLabelMap.CommonEmptyHeader}" with " "?
>>>
>>
>> That is what we would like to do - but it doesn't work. That is what
>> needs to be fixed.
>
> But if I do this in the above mentioned example (see attached patch) it
> seems to give the expected result (= no label). I'm a missing something?
>
> Christian


Maybe something has changed and this works without Scott's suggested change (if it works) now?
BTW I checked, I thought I was using CommonEmptyHeader in another way, than simply form title ,in a custom project, but I was wrong.
So one of the solutions proposed is ok with me, the simpler the better

Jacques



--------------------------------------------------------------------------------


> Index: applications/party/widget/partymgr/PartyForms.xml
> ===================================================================
> --- applications/party/widget/partymgr/PartyForms.xml (Revision 1339064)
> +++ applications/party/widget/partymgr/PartyForms.xml (Arbeitskopie)
> @@ -90,7 +90,7 @@
>             </drop-down>
>         </field>
>         <field name="submitButton" title="${uiLabelMap.CommonSave}"><submit button-type="button"/></field>
> -        <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="smallSubmit">
> +        <field name="cancelLink" title=" " widget-style="smallSubmit">
>             <hyperlink target="${donePage}" also-hidden="false" description="${uiLabelMap.CommonCancelDone}">
>                 <parameter param-name="partyId"/>
>             </hyperlink>
>
Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Paul Foxworthy
In reply to this post by Adrian Crum-3
If the intention is to override the default behaviour, wouldn't it be clearer to add an attribute to the widget  along the lines of

showTitle="false"

or perhaps

useFieldNameForTitle="false"

instead of fighting with a fake title that's not really a title at all?

The default value out of the schema for the attribute would, of course, be "true".

What do people think?

Cheers

Paul Foxworthy

Adrian Crum-3 wrote
On 5/16/2012 11:44 AM, Christian Geisert wrote:
> What's the point of CommonEmptyHeader?
>
> It's definied in CommonUiLabels.xml as:
>
> <property key="CommonEmptyHeader">
>      
>      <value xml:lang="en" xml:space="preserve">  </value>
> </property>
>
> It is just a simple space (0x20)
>
> It is used ~500 times in forms as a title in a field definition
>
> Example:
>
> <form name="EditPerson" type="single" target="updatePerson"
>    ...
>    <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}"
>
>      <hyperlink target="${donePage}" also-hidden="false"
>        description="${uiLabelMap.CommonCancelDone}">
>        <parameter param-name="partyId"/>
>      </hyperlink>
>    </field>
> </form>
>
>
> This is a button which should have no label, but if the title attribute
> is empty then the name attribute is used as label.
>
> Why not just put a space (" ") into the title attribute - still a hack,
> but exactly same result a using CommonEmptyHeader without the need using
> CommonEmptyHeader.
>
> The real solution is of course not to display a label if the title
> attribute is empty.

An empty title attribute is meant to be a shortcut, or a developer's
convenience - the widgets will use the field name to look up the correct
label.

Putting a space in the title attribute is the only way to turn off the
default behavior.

-Adrian
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Christian Geisert
Paul Foxworthy schrieb:

> If the intention is to override the default behaviour, wouldn't it be clearer
> to add an attribute to the widget  along the lines of
>
> showTitle="false"
>
> or perhaps
>
> useFieldNameForTitle="false"
>
> instead of fighting with a fake title that's not really a title at all?
>
> The default value out of the schema for the attribute would, of course, be
> "true".
>
> What do people think?

It's a little bit less hackish, but still a workaround ;-)

Let's go another step back.

In all the cases I had a closer look the field with CommonEmptyHeader
was an additional button (Cancel/Delete) to the default Submit button
(Create/Save etc.). I guess this is modeled after HTML.

So I think the best thing would be to add a button as another field type
to Forms.

Christian


Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Paul Foxworthy
Hi Christian,

I see your point.

How about a rule that field won't display a prompt if its content is a single hyperlink, unless a title is explicitly defined? A little arbitrary, but easy to implement.

Cheers

Paul Foxworthy

Christian Geisert wrote
Paul Foxworthy schrieb:
> If the intention is to override the default behaviour, wouldn't it be clearer
> to add an attribute to the widget  along the lines of
>
> showTitle="false"
>
> or perhaps
>
> useFieldNameForTitle="false"
>
> instead of fighting with a fake title that's not really a title at all?
>
> The default value out of the schema for the attribute would, of course, be
> "true".
>
> What do people think?

It's a little bit less hackish, but still a workaround ;-)

Let's go another step back.

In all the cases I had a closer look the field with CommonEmptyHeader
was an additional button (Cancel/Delete) to the default Submit button
(Create/Save etc.). I guess this is modeled after HTML.

So I think the best thing would be to add a button as another field type
to Forms.

Christian
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Jacques Le Roux
Administrator
What about the few other cases where it's not button for a hyperlink?
Maybe there a simple title="" is enough though, I did not try

Of course I guess you noticed
http://svn.apache.org/viewvc?view=revision&revision=1340376
http://svn.apache.org/viewvc?view=revision&revision=1340374
Anyway still easy to change in a way or another by a S/R

Jacques

From: "Paul Foxworthy" <[hidden email]>

> Hi Christian,
>
> I see your point.
>
> How about a rule that field won't display a prompt if its content is a
> single hyperlink, unless a title is explicitly defined? A little arbitrary,
> but easy to implement.
>
> Cheers
>
> Paul Foxworthy
>
>
> Christian Geisert wrote
>>
>> Paul Foxworthy schrieb:
>>> If the intention is to override the default behaviour, wouldn't it be
>>> clearer
>>> to add an attribute to the widget  along the lines of
>>>
>>> showTitle="false"
>>>
>>> or perhaps
>>>
>>> useFieldNameForTitle="false"
>>>
>>> instead of fighting with a fake title that's not really a title at all?
>>>
>>> The default value out of the schema for the attribute would, of course,
>>> be
>>> "true".
>>>
>>> What do people think?
>>
>> It's a little bit less hackish, but still a workaround ;-)
>>
>> Let's go another step back.
>>
>> In all the cases I had a closer look the field with CommonEmptyHeader
>> was an additional button (Cancel/Delete) to the default Submit button
>> (Create/Save etc.). I guess this is modeled after HTML.
>>
>> So I think the best thing would be to add a button as another field type
>> to Forms.
>>
>> Christian
>>
>
>
> -----
> --
> Coherent Software Australia Pty Ltd
> http://www.cohsoft.com.au/
>
> Bonsai ERP, the all-inclusive ERP system
> http://www.bonsaierp.com.au/
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Re-svn-commit-r1338836-in-ofbiz-branches-release12-04-framework-base-dtd-framework-base-src-org-ofbi-tp4631741p4632477.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Paul Foxworthy
Hi Jacques,

If we reduce hundreds of uses to just a few, it's probably worthwhile. If there isn't a simple rule for what's left, I agree we can use title=" ".

Cheers

Paul Foxworthy

Jacques Le Roux wrote
What about the few other cases where it's not button for a hyperlink?
Maybe there a simple title="" is enough though, I did not try

Of course I guess you noticed
http://svn.apache.org/viewvc?view=revision&revision=1340376
http://svn.apache.org/viewvc?view=revision&revision=1340374
Anyway still easy to change in a way or another by a S/R

Jacques

From: "Paul Foxworthy" <[hidden email]>
> Hi Christian,
>
> I see your point.
>
> How about a rule that field won't display a prompt if its content is a
> single hyperlink, unless a title is explicitly defined? A little arbitrary,
> but easy to implement.
>
> Cheers
>
> Paul Foxworthy
>
>
> Christian Geisert wrote
>>
>> Paul Foxworthy schrieb:
>>> If the intention is to override the default behaviour, wouldn't it be
>>> clearer
>>> to add an attribute to the widget  along the lines of
>>>
>>> showTitle="false"
>>>
>>> or perhaps
>>>
>>> useFieldNameForTitle="false"
>>>
>>> instead of fighting with a fake title that's not really a title at all?
>>>
>>> The default value out of the schema for the attribute would, of course,
>>> be
>>> "true".
>>>
>>> What do people think?
>>
>> It's a little bit less hackish, but still a workaround ;-)
>>
>> Let's go another step back.
>>
>> In all the cases I had a closer look the field with CommonEmptyHeader
>> was an additional button (Cancel/Delete) to the default Submit button
>> (Create/Save etc.). I guess this is modeled after HTML.
>>
>> So I think the best thing would be to add a button as another field type
>> to Forms.
>>
>> Christian
>>
>
>
> -----
> --
> Coherent Software Australia Pty Ltd
> http://www.cohsoft.com.au/
>
> Bonsai ERP, the all-inclusive ERP system
> http://www.bonsaierp.com.au/
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Re-svn-commit-r1338836-in-ofbiz-branches-release12-04-framework-base-dtd-framework-base-src-org-ofbi-tp4631741p4632477.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

Re: CommonEmptyHeader

Jacques Le Roux
Administrator
OK, at revision: 1343016, I have replaced all remaining title="${uiLabelMap.CommonEmptyHeader}" by title=" ". I tested
https://localhost:8443/ordermgr/control/OrderPurchaseReportOptions for OrderByReferrer form

In ListPartyCommEvents I replaced
<set field="toComplete"
value="${bsh:&quot;COM_ROLE_READ&quot;.equals(roleStatusId)?&quot;PartyToComplete&quot;:&quot;CommonEmptyHeader&quot;}"/>
by
<set field="toComplete" value="${groovy: 'COM_ROLE_READ'.equals(roleStatusId) ? 'PartyToComplete' : ' '}"/>

I tried to test but it's a real pain to create a communication event from
https://localhost:8443/sfa/control/createCommunicationEvent. I always ended with  <<Column 'WORK_EFFORT_ID' cannot accept a NULL
value.)>> (due to  <<Service ECA [createCommunicationEventWorkEff]>>)

I guess it's ok anyway, chapter closed

Jacques

From: "Paul Foxworthy" <[hidden email]>

> Hi Jacques,
>
> If we reduce hundreds of uses to just a few, it's probably worthwhile. If
> there isn't a simple rule for what's left, I agree we can use title=" ".
>
> Cheers
>
> Paul Foxworthy
>
>
> Jacques Le Roux wrote
>>
>> What about the few other cases where it's not button for a hyperlink?
>> Maybe there a simple title="" is enough though, I did not try
>>
>> Of course I guess you noticed
>> http://svn.apache.org/viewvc?view=revision&revision=1340376
>> http://svn.apache.org/viewvc?view=revision&revision=1340374
>> Anyway still easy to change in a way or another by a S/R
>>
>> Jacques
>>
>> From: "Paul Foxworthy" &lt;paul@.com&gt;
>>> Hi Christian,
>>>
>>> I see your point.
>>>
>>> How about a rule that field won't display a prompt if its content is a
>>> single hyperlink, unless a title is explicitly defined? A little
>>> arbitrary,
>>> but easy to implement.
>>>
>>> Cheers
>>>
>>> Paul Foxworthy
>>>
>>>
>>> Christian Geisert wrote
>>>>
>>>> Paul Foxworthy schrieb:
>>>>> If the intention is to override the default behaviour, wouldn't it be
>>>>> clearer
>>>>> to add an attribute to the widget  along the lines of
>>>>>
>>>>> showTitle="false"
>>>>>
>>>>> or perhaps
>>>>>
>>>>> useFieldNameForTitle="false"
>>>>>
>>>>> instead of fighting with a fake title that's not really a title at all?
>>>>>
>>>>> The default value out of the schema for the attribute would, of course,
>>>>> be
>>>>> "true".
>>>>>
>>>>> What do people think?
>>>>
>>>> It's a little bit less hackish, but still a workaround ;-)
>>>>
>>>> Let's go another step back.
>>>>
>>>> In all the cases I had a closer look the field with CommonEmptyHeader
>>>> was an additional button (Cancel/Delete) to the default Submit button
>>>> (Create/Save etc.). I guess this is modeled after HTML.
>>>>
>>>> So I think the best thing would be to add a button as another field type
>>>> to Forms.
>>>>
>>>> Christian
>>>>
>>>
>>>
>>> -----
>>> --
>>> Coherent Software Australia Pty Ltd
>>> http://www.cohsoft.com.au/
>>>
>>> Bonsai ERP, the all-inclusive ERP system
>>> http://www.bonsaierp.com.au/
>>>
>>> --
>>> View this message in context:
>>> http://ofbiz.135035.n4.nabble.com/Re-svn-commit-r1338836-in-ofbiz-branches-release12-04-framework-base-dtd-framework-base-src-org-ofbi-tp4631741p4632477.html
>>> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>>
>
>
> -----
> --
> Coherent Software Australia Pty Ltd
> http://www.cohsoft.com.au/
>
> Bonsai ERP, the all-inclusive ERP system
> http://www.bonsaierp.com.au/
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Re-svn-commit-r1338836-in-ofbiz-branches-release12-04-framework-base-dtd-framework-base-src-org-ofbi-tp4631741p4632484.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
12