Well, just discovered that line separators are not an issue here.
The problem is that Tomahawk extensions filter looks for head/body to insert needed resources, such as the calendar js. In case of a Trinidad PPR response, no head - e.g. no js inclusion - thus calendar script will miss its class during PPR. A simple workaround is to include a hidden date field anyway, so that calendar js is included in the page head. This way future PPR will work.

-- Renzo

Renzo Tomaselli wrote:
Hi, I'm using a polimorphic input field which value is defined by a selection list.
The type of field changes according to the selection through PPR.
One type of input can by the Tomahawk inputDate which - unlike the equivalent Trinidad component - uses a popup for the calendar, instead of a dialog window. However when I select such date input, I get a PPR error in TrPage.handlePprResponseScript, which performs a window.eval() on the rendered script.
Things such as

window.eval("var splitty1_3Astack_3AdateValueCalendarVar=new org_apache_myfaces_PopupCalendar();\nsplitty1_3Astack...")

Firebug stops there for an error.
I guess the problem is due to the existence of literal '\n' inside the script, since other - single line - scripts are evaluated successfully.
The failing script (multiline) comes from Tomahawk inputDate.
No problems if I perform a full page rendering, only PPR responses show this error. I wonder if anybody can suggest where to look for such a newline issue to debug.
Trinidad is 1.0.3, Tomahawk 1.1.6

Thanks -- Renzo



Reply via email to