Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to bug when using SVGImage with ui:binder #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MauroGomez
Copy link

In the original version the following ui:binder code doesn’t work

<svg:SVGImage ui:field="fbutton" resource="{commonRes.iconF}" width="32px"/>

since it seems that gwt, on ui creation, tries to set width before setting the resource, which triggers a null pointer exception. By declaring the constructor using @UIConstructor tag, gwt sets the specified resource on construction, which is before setting the other attributes specified in the ui:binder tag (in the example, the attribute ‘width’).

In the original version the following ui:binder code doesn’t work

<svg:SVGImage ui:field="fbutton" resource="{commonRes.iconF}" width="32px"/>

since it seems that gwt, on ui creation, tries to set width before setting the resource, which triggers a null pointer exception. By declaring the constructor using @UIConstructor tag, gwt sets the specified resource on construction, which is before setting the other attributes specified in the ui:binder tag (in the example, the attribute ‘width’).
@laaglu
Copy link
Owner

laaglu commented Mar 13, 2015

I propose we continue this discussion here #15 as this seems to be the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants