From: "Christian Geisert" <christian.geis...@isu-gmbh.de>
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 via email to