You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Brendan cheng <cc...@hotmail.com> on 2011/08/30 09:56:24 UTC
Property elements cannot have a namespace prefix
Hi,
I got the error message:
"Property elements cannot have a namespace prefix"
which I follow exactly from Stock tracker example. my code in bxml file is
<gui:iTagsWindow title="%itagswindow" maximized="true"
xmlns:bxml="http://pivot.apache.org/bxml"
xmlns:content="org.apache.pivot.wtk.content"
xmlns:gui="hk.itags.gui"
xmlns="org.apache.pivot.wtk">
</gui:itagsWindow>
why the complier give me this error?
Thanks in advance!
Brendan
Re: Property elements cannot have a namespace prefix
Posted by Chris Bartlett <cb...@gmail.com>.
Brendan,
http://pivot.apache.org/tutorials/bxml-primer.html
I think the problem is because the name of your custom class starts
with a lower case letter. BXMLSerializer will think 'iTagsWindow' is
a bean property.
If you change 'iTagsWindow' to 'ITagsWindow', then BXMLSerializer will
know to create an instance of that class (because it starts with a
capital letter).
(Also in the code you posted, the opening and closing tags don't match
- but that is probably just a typo in the email)
<gui:iTagsWindow>
...
</gui:itagsWindow>
Chris
2011/8/30 Brendan cheng <cc...@hotmail.com>:
> Hi,
> I got the error message:
> "Property elements cannot have a namespace prefix"
> which I follow exactly from Stock tracker example. my code in bxml file is
>
> <gui:iTagsWindow title="%itagswindow" maximized="true"
>
> xmlns:bxml="http://pivot.apache.org/bxml"
>
> xmlns:content="org.apache.pivot.wtk.content"
>
> xmlns:gui="hk.itags.gui"
>
> xmlns="org.apache.pivot.wtk">
>
> </gui:itagsWindow>
>
> why the complier give me this error?
>
> Thanks in advance!
>
> Brendan