label with value as zero length string reading issue

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

label with value as zero length string reading issue

rrlakhera
Hi All,

If we use a label with value as zero length string then I think it should be display the empty string while these label goes to use.
But currently its return the key name same as in case of key does not exist in label file.So current result does not make sense even label key is exist.

If this behavior is not expected then I will happy to create JIRA issue.

For ex:
<property key="EmptyLabelA">
    <value xml:lang="en"></value>
</property>
<property key="EmptyLabelB">
    <value xml:lang="en"/>
</property>

I am attaching the patch for this issue with this mail.

Regards
Ritu Raj Lkhera

Ritu
Reply | Threaded
Open this post in threaded view
|

Re: label with value as zero length string reading issue

Adrian Crum-3
That is the normal behavior. If you want to display an empty string, use
" " instead of a property key.

-Adrian

On 6/4/2012 7:22 AM, Ritu Raj Lakhera wrote:

> Hi All,
>
> If we use a label with value as zero length string then I think it
> should be display the empty string while these label goes to use.
> But currently its return the key name same as in case of key does not
> exist in label file.So current result does not make sense even label
> key is exist.
>
> If this behavior is not expected then I will happy to create JIRA issue.
>
> For ex:
> <property key="EmptyLabelA">
> <value xml:lang="en"></value>
> </property>
> <property key="EmptyLabelB">
> <value xml:lang="en"/>
> </property>
>
> I am attaching the patch for this issue with this mail.
>
> Regards
> Ritu Raj Lkhera
>
Reply | Threaded
Open this post in threaded view
|

Re: label with value as zero length string reading issue

rrlakhera
Hi Adrian,

Thank for your reply. I know this is the normal behavior but it is quite
ambiguous even a property key and value node is exist.
I attached a patch with JIRA issue so you can better understand the my
question .Please take a look on below JIRA issue.
https://issues.apache.org/jira/browse/OFBIZ-4924.

Regards
Ritu

On Mon, Jun 4, 2012 at 3:31 PM, Adrian Crum <
[hidden email]> wrote:

> That is the normal behavior. If you want to display an empty string, use "
> " instead of a property key.
>
> -Adrian
>
>
> On 6/4/2012 7:22 AM, Ritu Raj Lakhera wrote:
>
>> Hi All,
>>
>> If we use a label with value as zero length string then I think it should
>> be display the empty string while these label goes to use.
>> But currently its return the key name same as in case of key does not
>> exist in label file.So current result does not make sense even label key is
>> exist.
>>
>> If this behavior is not expected then I will happy to create JIRA issue.
>>
>> For ex:
>> <property key="EmptyLabelA">
>> <value xml:lang="en"></value>
>> </property>
>> <property key="EmptyLabelB">
>> <value xml:lang="en"/>
>> </property>
>>
>> I am attaching the patch for this issue with this mail.
>>
>> Regards
>> Ritu Raj Lkhera
>>
>>
Ritu