"exceeding the limit of 255 words" on GWT 2.4 but not on 2.3

109 views
Skip to first unread message

mma

unread,
Dec 15, 2011, 7:29:42 AM12/15/11
to google-we...@googlegroups.com
Hi there.

I get the following error message when compiling UiBinder template in GWT 2.4 but not in 2.3:

ERROR] Errors in 'generated://C5AF780801F58242DB0EE69038CD0828/com/racios/appoint/client/widgets/weekcalendar/WeekCalendarDesktop_WeekCalendarDesktopUiBinderImpl.java'

[ERROR] Line 16: Too many parameters, parameter arg254 is exceeding the limit of 255 words eligible for method parameters

[ERROR] Unable to find type 'com.racios.appoint.client.widgets.weekcalendar.WeekCalendarDesktop_WeekCalendarDesktopUiBinderImpl.Template'

Anyone has clue of why that happens?

Thanks,
Marco.

Thomas Broyer

unread,
Dec 15, 2011, 8:55:46 AM12/15/11
to google-we...@googlegroups.com
AFAICT, UiBinder in GWT 2.4 generates a SafeHtmlTemplates (instead of building an HTML string by appending to a StringBuilder, as was done in previous versions). This means that everywhere you have a "replaceable" part (e.g. {foo} in an attribute, or a widget or <ui:msg>) it will generate a placeholder in the @Template and an argument to the template method. It seems like you have more than 255 such "replaceable part".

Maybe you could pass -gen to the Compiler and look at the generated code? It might be worth filing a bug, attaching your UiBinder template (or any template that would reproduce the issue).

As a workaround, you can throw an HTMLPanel in place of a few HTML elements, to reduce the size of the template (if I correctly guessed, that would split the template in several small templates, one for each HTMLPanel)

mma

unread,
Dec 15, 2011, 9:37:28 AM12/15/11
to google-we...@googlegroups.com
Hi Thomas. 

The template is basically a table representing a 7-day calendar which has:
  • Different styling for each 0-30 and 30-60 minute slot interval of each hour
  • Different styling for each odd and even "hour" row
  • Different styling for each day "column"
As you can imagine, just the minutes slot styling generates 336 arguments (7*24*2 of "...class='{style.name}'..." entries).

I would really be very nice if I could maintain the actual structure of the ui template.

Do you have any thoughts on this?

Thank you,
Marco.

Reply all
Reply to author
Forward
0 new messages