cancel
Showing results for 
Search instead for 
Did you mean: 

iBrowser update problem

Former Member
0 Kudos

Hi all

I have an iBrowser with the initial update set to false. When the page loads, the first applet (an iGrid) returns an actual result set, and based on this I feed the iBrowser applet (the one with the false initial update). I then update this iBrowser with the updateBrowser(true) command.

My problem is that this browser does not display the new data. I am running the latest version of Java and if I click on it (or setSelectedItem), it suddenly shows data (as if it is removing a cover which is over the applet). On an older version of Java, it does not help to click on it, however, if the page is opened the first time, it works. But if I refresh the page, it does not work.

They are running:

IE 7

SAP MII V 11.5.3 b66

Client PC's have either

Java 1.4.2_07 or

Java 1.6.0_13-b03 or

Java 1.6.0_04

Any help on this?

Regards

Edited by: Antoine Snyman on Jun 18, 2009 9:28 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

jamie_cawley
Advisor
Advisor
0 Kudos

Are you using a selection event on the igrid to populate the ibrowser? If you not, then why don't you modfiy the query of the ibrowser to provide the correct data from the start instead of trying to force feed it? This would provide a faster page load and a better user experience.

Jamie

Former Member
0 Kudos

Hi Jeremy

Nice to hear from you again. The client is using a third party application for the security model. Thus, I have to get the authorized "areas" first, and then populate the browser according to the auth awarded to him.

I have done this many times (even at this specific client), but this time it doesn't work for some strange reason.

Thought someone else might have experienced something similar.

Kishore, I am using UpdateEvent on the igrid to fire off the function which handles the browser update. FirstUpdateEvent doesn't work either. Neither does refresh or updating the browser 10 times in 1 function...

Regards

jamie_cawley
Advisor
Advisor
0 Kudos

Can you paste your code in?

Jamie

jcgood25
Active Contributor
0 Kudos

Hi Antoine (Jeremy this time, not my esteemed colleague Jamie)...

Sounds to me like a job perfect for wrapping the client side efforts of what you are doing today into a BLS transaction. Take the security query efforts from the iGrid and put them into a transaction that then uses the results to impact the iBrowser query, returning this resultset to the iBrowser applet as an Xacute Query.

By moving this onto the server side the iBrowser will be independent and in complete javascriptless control of its own destiny - don't forget to enable the initial update

Regards,

Jeremy

Former Member
0 Kudos

I have a firstLoad function which ensures that all applets are loaded. Once all applets are loaded, ValidateUser() will be called.

function ValidateUser()

{

var AuthorisedAreasGridObj = AuthorisedAreas.getGridObject();

var rAreas = "IN (";

for(var row = 1; row <= AuthorisedAreasGridObj.getRowCount(); row++)

{

if(row == 1)

{

rAreas = rAreas + "'" + AuthorisedAreasGridObj.getCellValue(row, 1) + "'";

}

else

{

rAreas = rAreas + ", " + "'" + AuthorisedAreasGridObj.getCellValue(row, 1) + "'";

}

}

rAreas = rAreas + ")";

Areas.getQueryObject().setParam(1, rAreas);

Areas.updateBrowser(true);

}

Applet Code:

<APPLET NAME="AuthorisedAreas" WIDTH="0" HEIGHT="0" CODE="iGrid" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>

<PARAM NAME="QueryTemplate" VALUE="MAC/xacQuery_insert_update_authorisedareas">

<PARAM NAME="DisplayTemplate" VALUE="MAC/iGrid">

<param name="Param.1" value="emea\{IllumLoginName}" />

<param name="UpdateEvent" value="firstLoad" />

</APPLET>

and...

<APPLET NAME="Areas" WIDTH="220" HEIGHT="150" ALIGN="absmiddle" CODE="iBrowser" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>

<PARAM NAME="QueryTemplate" VALUE="MAC/sqlQuery_areas">

<PARAM NAME="DisplayTemplate" VALUE="MAC/disiBrowser_areas">

<PARAM NAME="CreationEvent" VALUE="firstLoad">

<param name="InitialUpdate" value="false" />

<PARAM NAME="SelectionEvent" VALUE="UpdateStreams">

</APPLET>

Former Member
0 Kudos

Sorry Jamie. I must be getting old... I had your face in mind, but mistakenly wrote Jeremy's name.

Thanks, Jeremy, it sounds like a good way to do it, but why do I get the funny behaviour on the browser in the first place?

jcgood25
Active Contributor
0 Kudos

Tough to speculate merely based upon forum posts, but putting some alerts in the functions tied to your applet events would help you with some visibility as to what's going on, as well as temporarily adding the following lines to the involved applets (and monitoring the java console as things are executing on the page):

<PARAM NAME="Trace" VALUE="true">

Assuming you've used a similar approach in the past, or in other situations with this MAC project, the optimal solution is to really eliminate the applet dependencies you have strung together on the client side and make them execute on the server side. Then the applet just fires it's query and is good to go.

jamie_cawley
Advisor
Advisor
0 Kudos

You could be running into a timing issue, you could put an alert in your code for testing purposes to slow it down. I not sure what data is returned from your query but it appears that DataLinkMode makes a difference when doing this if your are returning mulitple columns. Try using a igrid instead of the ibrowser and see what happens.

As Jeremy mention this logic could easily be pur into a transaction.

Jamie

Former Member
0 Kudos

Alert does not help. The browser is also not in datalink mode.

Former Member
0 Kudos

Hi,

May I know on which event you are making updateBrowser(true)?

Is it with the FirstUpdateEvent or with the UpdateEvent?

Hope with these events it works fine. Firstupdate event calls the funtion only once when the applet is initialized where as the update event calls whenever the data is updated.

just play around with those functions you can get you exact result.

I checked this in 11.5 build 3 with the java 1.4.2_15. It works fine for me. May be i have created some simplest queries for the same if you expalin the exact scenario, I can check it out here.

Regards,

Kishore