# gx\_updatePagePart(panelId) with Transforms

**URL:** <https://techcommunity.softwareag.com/t/gx-updatepagepart-panelid-with-transforms/93802>\
**Category:** Forum\
**Tags:** Mainframe-Integration, ApplinX\
**Created:** [June 9, 2010, 4:50pm UTC](https://techcommunity.softwareag.com/t/gx-updatepagepart-panelid-with-transforms/93802 "2010-06-09T16:50:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cquaj](https://avatars.discourse-cdn.com/v4/letter/c/dec6dc/32.png) [@cquaj](https://techcommunity.softwareag.com/u/cquaj)\
**Post date:** [June 9, 2010, 4:50pm UTC](https://techcommunity.softwareag.com/t/gx-updatepagepart-panelid-with-transforms/93802/1 "2010-06-09T16:50:52Z")

</div>

Hi Ohad,

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");	
}

```

}

This has no effect on the rendered output.

Is there a way to apply transforms in this case?

Regards…

---

<div class="post-metadata">

**Author:** ![Ohad\_M](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@Ohad\_M](https://techcommunity.softwareag.com/u/Ohad_M)\
**Post date:** [June 9, 2010, 5:06pm UTC](https://techcommunity.softwareag.com/t/gx-updatepagepart-panelid-with-transforms/93802/2 "2010-06-09T17:06:39Z")

</div>

Hi Cquaj,

It works fine for me. Look up the registerInstantTransforms method in the GXInstantLogicContext.java and check if the following line is uncommented:

```auto
instantConfig.addCompletionListener(new transforms.UserCompletionTransform1());
```

My guess is it’s commented.  
Let me know if this helps,  
Regards,  
Ohad

---

<div class="post-metadata">

**Author:** ![cquaj](https://avatars.discourse-cdn.com/v4/letter/c/dec6dc/32.png) [@cquaj](https://techcommunity.softwareag.com/u/cquaj)\
**Post date:** [June 10, 2010, 1:16pm UTC](https://techcommunity.softwareag.com/t/gx-updatepagepart-panelid-with-transforms/93802/3 "2010-06-10T13:16:27Z")

</div>

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:

```auto

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?

Regards…

---

<div class="post-metadata">

**Author:** ![cquaj](https://avatars.discourse-cdn.com/v4/letter/c/dec6dc/32.png) [@cquaj](https://techcommunity.softwareag.com/u/cquaj)\
**Post date:** [June 17, 2010, 2:20pm UTC](https://techcommunity.softwareag.com/t/gx-updatepagepart-panelid-with-transforms/93802/4 "2010-06-17T14:20:02Z")

</div>

Hi,

Will somebody please confirm that transformations fuunction correctly under the conditions mentioned in my last post (i.e. using gx\_updatePagePart(PanelId) / supportPartialPageRendering=true).

Regards…

---

<div class="post-metadata">

**Author:** ![Ohad\_M](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@Ohad\_M](https://techcommunity.softwareag.com/u/Ohad_M)\
**Post date:** [June 17, 2010, 2:54pm UTC](https://techcommunity.softwareag.com/t/gx-updatepagepart-panelid-with-transforms/93802/5 "2010-06-17T14:54:54Z")

</div>

Hi Cquaj,

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.

Let me know if that helps,  
Best regards,  
Ohad

---

<div class="post-metadata">

**Author:** ![cquaj](https://avatars.discourse-cdn.com/v4/letter/c/dec6dc/32.png) [@cquaj](https://techcommunity.softwareag.com/u/cquaj)\
**Post date:** [June 24, 2010, 10:49pm UTC](https://techcommunity.softwareag.com/t/gx-updatepagepart-panelid-with-transforms/93802/6 "2010-06-24T22:49:55Z")

</div>

Thanks Ohad,

Three further issues:

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()):

```auto

GXScreenBuffers scrBuffer = event.getHostScreen().getBuffers(false);
String buffer = scrBuffer.getScreenBuffer();
```

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?

By the way I’m using Applinx 8.1.2.0000.0005.

Regards…

---

<div class="post-metadata">

**Author:** ![Ohad\_M](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@Ohad\_M](https://techcommunity.softwareag.com/u/Ohad_M)\
**Post date:** [June 29, 2010, 12:31pm UTC](https://techcommunity.softwareag.com/t/gx-updatepagepart-panelid-with-transforms/93802/7 "2010-06-29T12:31:55Z")

</div>

Hi Cquaj,

1. 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.

2. 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.

3. 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:

```auto
GXWebAppConfig gx_appConfig = getGXAppConfig();
gx_appConfig.getSessionConfig().addVariable(GXBaseObjectConstants.GX_VAR_RETURN_SCREEN_BUFFERS, GXBaseObjectConstants.GX_VAR_VAL_BUFFERS_SCREEN_DATA);
```

NOTE:  
This may result in some performance overhead, since the screen buffer will now return everytime a new screen arrives.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:58pm UTC](https://techcommunity.softwareag.com/t/gx-updatepagepart-panelid-with-transforms/93802/8 "2021-04-02T14:58:36Z")

</div>

Closed on April 2, 2021, 2:58pm UTC


