WebSphere Portal Server - Ajax components in RAD 7 - problem with Refresh request.

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > March 2007 > Ajax components in RAD 7 - problem with Refresh request.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Ajax components in RAD 7 - problem with Refresh request.

2007-03-21, 1:26 pm

I'm trying to use the new ajax components in RAD 7 within Portal 6 with JSF components to do a simple retrieval of a drop-down list content based on a value entered in a text box. I'm using hx:ajaxRefreshRequest with the text box id as the parameter, with
hx:behavior for onBlur event of the text box. The page with these components is included into another jsp.
Looking at logs, the parameter is submitted to the server correctly only the first time after a page load that an Ajax request is initiated. So, the first time I enter a value in the text box and tab out this value is submitted correctly and a correspondi
ng list is retrieved. Any time after that a request is being triggered and is transferred to the server, but the value is not updated and instead stays the same as entered initially.
I've replicated this behavior using the simple example (the first one in the article) outlined here: http://www-128.ibm.com/developerwor...205_kats_rad2/.

Any help is much appreciated.

Maria


yurykats

2007-03-22, 1:25 am

First thing to check: when deploying from RAD to Portal6 server, you need to make sure the classloader policy is set to PARENT_LAST, as described in RAD's README, which I quoted recently here: http://www-128.ibm.com/developerwor..._thread.jsp?mes
sage=13922736&cat=9&thread=152871&treeDisplayType=expandtree&forum=378#13922736

2007-03-22, 1:30 pm

Yury, thank you for your reply. The classloader policy on our server is already set to PARENT_LAST and its not making a difference.

Maria
yurykats

2007-03-22, 1:30 pm

Can you paste the source?

2007-03-22, 1:30 pm

This is the simple example:
(This jsp is included into a parent with a jsp:include)

<hx:viewFragment id="viewFragment1">
<hx:scriptCollector id="scriptCollector1">
<h:inputText id="txtAjax" styleClass="inputText">
<hx:behavior event="onblur" behaviorAction="get"
targetAction="group1"></hx:behavior>
</h:inputText>
<h:panelGroup id="group1" styleClass="panelGroup">
<h:outputText id="text2" styleClass="outputText" value="Hello, #{param.txtAjax}"></h:outputText>
</h:panelGroup>
<hx:ajaxRefreshRequest id="ajaxRefreshRequest1" target="group1" params="txtAjax">
</hx:ajaxRefreshRequest>
</hx:scriptCollector>
</hx:viewFragment>


yurykats

2007-03-22, 1:30 pm

There's nothing obviously wrong here. What's in the "master" page?
I wonder if this is because of an include... Could you try the same tags on a standalone page?

2007-03-23, 1:23 pm

I resolved the problem. It was related to the include though not directly caused by it. My included page contained hx:viewFragment and hx:scriptCollector tag and when I took those out, everything started working.
Yury, thank you very much for your quick response.

Maria
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com