Although gx_updatePagePart(panelId) works well (refer to my previous post), it seems that transformations are not possible.
Is this assumption correct?
For example (in UserCompletionTransform1):
public void onComplete (GXRenderEvent event)
{
GXITag tag = event.getScreenTagModel().getTags();
for (int i=0; i<tag.length; i++)
{
tag[i].setAttribute("style", "color: red");
}
Hi Ohad,
I am trying to apply a transformation on the first host screen after login. The transform must be applied only once.
In GXInstantLogicContext, I have the following:
public void gx_onInit()
{
super.gx_onInit();
getGXAppConfig().setIsInstant(true);
GXRenderConfig instantConfig = getGXAppConfig().getInstantConfig();
if (getSession().getAttribute("fromLogin").equals("yes"))
{
instantConfig.addCompletionListener(new transforms.UserCompletionTransform1());
}
}
public void gx_preRender()
{
super.gx_preRender();
registerInstantTransforms();
}
public void registerInstantTransforms()
{
GXRenderConfig instantConfig = getGXAppConfig().getInstantConfig();
if (getSession().getAttribute("fromLogin").equals("yes"))
{
getSession().setAttribute("fromLogin", "no");
}
else
{
instantConfig.removeAllListeners();
}
}
…and then my code in UserCompletionTransform1.
I have System.out.println in UserCompletionTransform1 to verify that the code is being executed.
The transform however is not applied.
I have another application where user tranforms are being applied without problem. This application does not use AJAX (gx_updatePagePart).
This is why I though that gx_updatePagePart may be the problem.
Are you testing using gx_updatePagePart(PanelId) / supportPartialPageRendering=true?
Will somebody please confirm that transformations fuunction correctly under the conditions mentioned in my last post (i.e. using gx_updatePagePart(PanelId) / supportPartialPageRendering=true).
Yes, I used gx_updatePagePart(PanelId) / supportPartialPageRendering=true.
It works OK. the transformation is being executed.
However, placing the addCompletionListener in the gx_onInit method could cause the problem. I would recommend handling the logic of adding/removing transformations from inside the registerInstantTransforms method.
1) When using instant pages/gx_updatePagePart(), the cursor, tab-key and autotab functionality does not work. You have to place the cursor with the mouse, etc. Is there a way to fix this?
2) Is it possible to change the style attribute of gx_ScreenArea? I need to ensure that the div height is constant (say 480px).
3) The following code in a transform (using instant pages/gx_updatePagePart()):
sets buffer to null.
Note that the required GXWebAppConfig has been done in GXBasicContext. Also I have ticked ‘Return content of hidden fields’ in Screen Content properties of the Applinx application. Is this to be expected?
I’ve tested this feature with the gx_updatePagePart() and it works fine for me. The Cursor is placed in the correct place and the autotab works as it should. Check the web application configuration and see if “Tab on input fields only” and “Automatic skip for all input fields” are turned on.
The gx_screenArea height attribute is set in runtime and cannot be changed. However, you can set the height of the object (TD, DIV…) containing the gx_screenArea.
By default, the baseObject doesn’t return the screen buffer (for performance reasons). In order to return the screen buffer, open the GXBasicContext.java and add the following code to the gx_initSessionConfig method: