OK, try it with the latest build and let me know if you run into any problems.

On Sep 21, 2010, at 4:16 PM, Olivier Dutrieux wrote:

> remove completely startDate.label from json file 
> 
> Duto
> 
> Le 21/09/2010 18:18, Greg Brown a écrit :
>> 
>> I don't see this problem. If I change "label" to "foo" in Test.json, the 
>> application starts and I see "startDate.label" in the UI. Can you provide a 
>> specific code sample that demonstrates the issue?
>> 
>> Thanks,
>> Greg
>> 
>> On Sep 21, 2010, at 11:51 AM, Olivier Dutrieux wrote:
>> 
>>> Hello,
>>> 
>>> I fact the problem is when the caller missing the nested property on the 
>>> json file, If he missing a no nested property (like %startdate) the 
>>> application start, but if he missing the nested property (like 
>>> %startdate.label) the application fail with my previous error message.
>>> 
>>> I would like to know if it's not possible to obtain no error (like no 
>>> nested property) with the
>>> nested property?
>>> 
>>> Best regards
>>> 
>>> Duto
>>> 
>>> Le 21/09/2010 17:42, Greg Brown a écrit :
>>>> 
>>>> Yes, you should be able to use nested property names in attribute values - 
>>>> see attached.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Sep 20, 2010, at 9:48 AM, Duto wrote:
>>>> 
>>>>> Hello,
>>>>> 
>>>>> I use the Localizationvia Json file and I use composed key like this :
>>>>> 
>>>>> "startDate": {
>>>>>  "header":"Start",
>>>>>  "label":"Start date"
>>>>> }
>>>>> 
>>>>> <Label Form.label="%startDate.label" value="2010.09.01"/>
>>>>> 
>>>>> If I forget my composed key on my file, the application don't start with
>>>>> this Exception :
>>>>> java.lang.IllegalArgumentException
>>>>>   at org.apache.pivot.beans.BeanAdapter.<init>(BeanAdapter.java:178)
>>>>>   at org.apache.pivot.beans.BeanAdapter.<init>(BeanAdapter.java:167)
>>>>>   at org.apache.pivot.json.JSON.containsKey(JSON.java:221)
>>>>>   at
>>>>> org.apache.pivot.beans.BXMLSerializer.processAttributes(BXMLSerializer.java:1037)
>>>>>   at
>>>>> org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:801)
>>>>>   at
>>>>> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:435)
>>>>>   at
>>>>> org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:883)
>>>>>   at
>>>>> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:435)
>>>>>   at
>>>>> org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:883)
>>>>>   at
>>>>> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:435)
>>>>>   at
>>>>> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:614)
>>>>>   at
>>>>> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:568)
>>>>>   at fr.pasteur.infoIp.views.InfoIp.startup(InfoIp.java:21)
>>>>>   at
>>>>> org.apache.pivot.wtk.DesktopApplicationContext$2.run(DesktopApplicationContext.java:594)
>>>>>   at
>>>>> org.apache.pivot.wtk.ApplicationContext$QueuedCallback.run(ApplicationContext.java:1423)
>>>>>   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
>>>>>   at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>>>>>   at
>>>>> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>>>>>   at
>>>>> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>>>>>   at
>>>>> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>>>>>   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>>>>>   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>>>>>   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>>>>> java.lang.IllegalArgumentException: Modal dialogs must have an owner.
>>>>>   at org.apache.pivot.wtk.Dialog.open(Dialog.java:180)
>>>>>   at org.apache.pivot.wtk.Dialog.open(Dialog.java:132)
>>>>>   at org.apache.pivot.wtk.Window.open(Window.java:571)
>>>>>   at
>>>>> org.apache.pivot.wtk.DesktopApplicationContext.displayException(DesktopApplicationContext.java:677)
>>>>>   at
>>>>> org.apache.pivot.wtk.DesktopApplicationContext.access$400(DesktopApplicationContext.java:45)
>>>>>   at
>>>>> org.apache.pivot.wtk.DesktopApplicationContext$2.run(DesktopApplicationContext.java:597)
>>>>>   at
>>>>> org.apache.pivot.wtk.ApplicationContext$QueuedCallback.run(ApplicationContext.java:1423)
>>>>>   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
>>>>>   at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>>>>>   at
>>>>> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>>>>>   at
>>>>> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>>>>>   at
>>>>> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>>>>>   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>>>>>   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>>>>>   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>>>>> 
>>>>> But if my key is not composed, the application start with name of the 
>>>>> key. I
>>>>> would like to know if it's not possible to obtain the same thinks with the
>>>>> composed key ?
>>>>> 
>>>>> Best regards
>>>>> 
>>>>> Duto
>>>>> 
>>>>> 
>>>>> 
>>>>> -- 
>>>>> View this message in context: 
>>>>> http://apache-pivot-users.399431.n3.nabble.com/composed-key-on-Localization-tp1529066p1529066.html
>>>>> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>> 
> 
> -- 
> Olivier Dutrieux
> Études et Projets Informatiques (Tél : 31 62)

Reply via email to