Skip to main content
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

Uniface 9: DSP Generated page modification after full load

DSP Generated page modification after full load

Author: richard.gill@agfa.com (richard.gill)

Hi

In our current work of making use of new Uniface RIA possibilities, we're faced to some technical needs. Even if we have solutions, some techniques seem difficult to implement without control on the client side (the browser), with the help of javascript. Now the details :-) :

For various reasons, we want to make direct ajax calls (in fact ajah/ajaj, with HTML or Json replacing xml). Not a difficult task in itself, but the problem is to assign elements with their ID : the page is loaded, any document.ready/onload and so on are called, and then dojo makes its voodoo to alter the page and map Uniface stuff. In the same vein, if I load through Ajax an url targeting a DSP, the map is not done, because I removed full page tags from the hts. So what I need is simple :

How to enable function calls after dojo made its page adjustments (so we can be sure we work on the final content), and how to manually force a mapping to occur when loading a DSP, knowing the content will be put in the current page (in a div), which already contains all dojo/uniface scripts ?

Thanks for interest,
Richard

 

17 replies

Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

DSP Generated page modification after full load

Author: richard.gill@agfa.com (richard.gill)

Hi

In our current work of making use of new Uniface RIA possibilities, we're faced to some technical needs. Even if we have solutions, some techniques seem difficult to implement without control on the client side (the browser), with the help of javascript. Now the details :-) :

For various reasons, we want to make direct ajax calls (in fact ajah/ajaj, with HTML or Json replacing xml). Not a difficult task in itself, but the problem is to assign elements with their ID : the page is loaded, any document.ready/onload and so on are called, and then dojo makes its voodoo to alter the page and map Uniface stuff. In the same vein, if I load through Ajax an url targeting a DSP, the map is not done, because I removed full page tags from the hts. So what I need is simple :

How to enable function calls after dojo made its page adjustments (so we can be sure we work on the final content), and how to manually force a mapping to occur when loading a DSP, knowing the content will be put in the current page (in a div), which already contains all dojo/uniface scripts ?

Thanks for interest,
Richard

 

Hi Ghan

Sorry, I forgot to check the anwsers monitoring :)

Cool for the js library sample, I'll try that, hoping I'll don't have to include both your helper library and jQuery, used for other simple tasks.

Thanks again for reply.

Best regards,
Richard


Author: richard.gill (richard.gill@agfa.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

DSP Generated page modification after full load

Author: richard.gill@agfa.com (richard.gill)

Hi

In our current work of making use of new Uniface RIA possibilities, we're faced to some technical needs. Even if we have solutions, some techniques seem difficult to implement without control on the client side (the browser), with the help of javascript. Now the details :-) :

For various reasons, we want to make direct ajax calls (in fact ajah/ajaj, with HTML or Json replacing xml). Not a difficult task in itself, but the problem is to assign elements with their ID : the page is loaded, any document.ready/onload and so on are called, and then dojo makes its voodoo to alter the page and map Uniface stuff. In the same vein, if I load through Ajax an url targeting a DSP, the map is not done, because I removed full page tags from the hts. So what I need is simple :

How to enable function calls after dojo made its page adjustments (so we can be sure we work on the final content), and how to manually force a mapping to occur when loading a DSP, knowing the content will be put in the current page (in a div), which already contains all dojo/uniface scripts ?

Thanks for interest,
Richard

 

Hi there both of you ;D

 

Richard, I did a example on how to solve this with GHANIFIED! after your comment. Maybe this will work for you!

 

Cheers,

-GHAN-


Author: -GHAN- (hansen@ahp-gmbh.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

DSP Generated page modification after full load

Author: richard.gill@agfa.com (richard.gill)

Hi

In our current work of making use of new Uniface RIA possibilities, we're faced to some technical needs. Even if we have solutions, some techniques seem difficult to implement without control on the client side (the browser), with the help of javascript. Now the details :-) :

For various reasons, we want to make direct ajax calls (in fact ajah/ajaj, with HTML or Json replacing xml). Not a difficult task in itself, but the problem is to assign elements with their ID : the page is loaded, any document.ready/onload and so on are called, and then dojo makes its voodoo to alter the page and map Uniface stuff. In the same vein, if I load through Ajax an url targeting a DSP, the map is not done, because I removed full page tags from the hts. So what I need is simple :

How to enable function calls after dojo made its page adjustments (so we can be sure we work on the final content), and how to manually force a mapping to occur when loading a DSP, knowing the content will be put in the current page (in a div), which already contains all dojo/uniface scripts ?

Thanks for interest,
Richard

 

Hi Thomas

I found a way to better explain what I want, describing what appends on the browser side and what I would want.

|- whole DSP page load
|    * the browser loads the not mapped DSP and all referenced medias (css, js, images, etc..)
|- page load finished
|    * javascipt's ready document events fire
|    * Uniface/dojo start their voodoo work : load other medias and map widgets
|- finished mapping
|    * the busy indicator is hidden and page is fully available
|
|- click on a link which calls javascript to load another page via ajax
|    * page loaded, embedded in a div from the container page,
|      so the embeded page should not contain html/head/body tags
|      if this page is a DSP, dojo onload events are not fired

From the final line above, I would want :

  • To enable dojo onload events to be fired for the embedded page
  • To be enable to call arbitrary javascript when dojo has finished its job

Best regards,
Richard

 


Author: richard.gill (richard.gill@agfa.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

DSP Generated page modification after full load

Author: richard.gill@agfa.com (richard.gill)

Hi

In our current work of making use of new Uniface RIA possibilities, we're faced to some technical needs. Even if we have solutions, some techniques seem difficult to implement without control on the client side (the browser), with the help of javascript. Now the details :-) :

For various reasons, we want to make direct ajax calls (in fact ajah/ajaj, with HTML or Json replacing xml). Not a difficult task in itself, but the problem is to assign elements with their ID : the page is loaded, any document.ready/onload and so on are called, and then dojo makes its voodoo to alter the page and map Uniface stuff. In the same vein, if I load through Ajax an url targeting a DSP, the map is not done, because I removed full page tags from the hts. So what I need is simple :

How to enable function calls after dojo made its page adjustments (so we can be sure we work on the final content), and how to manually force a mapping to occur when loading a DSP, knowing the content will be put in the current page (in a div), which already contains all dojo/uniface scripts ?

Thanks for interest,
Richard

 

Hi Richard,

 

Before I try to come up with an answer, just checking this: is what you're trying to achieve is to embed a dsp into some other (non-dsp) page, where the other page has already finished loading, e.g. the various onload events have already been fired ?

 

Cheers, Thomas


Author: tstlwk (thomas@t-en-c.nl)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

DSP Generated page modification after full load

Author: richard.gill@agfa.com (richard.gill)

Hi

In our current work of making use of new Uniface RIA possibilities, we're faced to some technical needs. Even if we have solutions, some techniques seem difficult to implement without control on the client side (the browser), with the help of javascript. Now the details :-) :

For various reasons, we want to make direct ajax calls (in fact ajah/ajaj, with HTML or Json replacing xml). Not a difficult task in itself, but the problem is to assign elements with their ID : the page is loaded, any document.ready/onload and so on are called, and then dojo makes its voodoo to alter the page and map Uniface stuff. In the same vein, if I load through Ajax an url targeting a DSP, the map is not done, because I removed full page tags from the hts. So what I need is simple :

How to enable function calls after dojo made its page adjustments (so we can be sure we work on the final content), and how to manually force a mapping to occur when loading a DSP, knowing the content will be put in the current page (in a div), which already contains all dojo/uniface scripts ?

Thanks for interest,
Richard

 

Hi Richard,

don't mind, that's why the community is more powerful:

while one is trying to find a bug for hours, another walks by and see the causing line immediately:
my favourite one are wrong parameter sequences in PUTlist... and GETlist.... like: getitem/id p_target,p_key,p_list

One more reason why we should have more communication like this one here.

Success, Uli


Author: ulrich-merkel (ulrichmerkel@web.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

DSP Generated page modification after full load

Author: richard.gill@agfa.com (richard.gill)

Hi

In our current work of making use of new Uniface RIA possibilities, we're faced to some technical needs. Even if we have solutions, some techniques seem difficult to implement without control on the client side (the browser), with the help of javascript. Now the details :-) :

For various reasons, we want to make direct ajax calls (in fact ajah/ajaj, with HTML or Json replacing xml). Not a difficult task in itself, but the problem is to assign elements with their ID : the page is loaded, any document.ready/onload and so on are called, and then dojo makes its voodoo to alter the page and map Uniface stuff. In the same vein, if I load through Ajax an url targeting a DSP, the map is not done, because I removed full page tags from the hts. So what I need is simple :

How to enable function calls after dojo made its page adjustments (so we can be sure we work on the final content), and how to manually force a mapping to occur when loading a DSP, knowing the content will be put in the current page (in a div), which already contains all dojo/uniface scripts ?

Thanks for interest,
Richard

 

Hi Uli

I don't know how I could miss that :)

Best regards,
Richard


Author: richard.gill (richard.gill@agfa.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

DSP Generated page modification after full load

Author: richard.gill@agfa.com (richard.gill)

Hi

In our current work of making use of new Uniface RIA possibilities, we're faced to some technical needs. Even if we have solutions, some techniques seem difficult to implement without control on the client side (the browser), with the help of javascript. Now the details :-) :

For various reasons, we want to make direct ajax calls (in fact ajah/ajaj, with HTML or Json replacing xml). Not a difficult task in itself, but the problem is to assign elements with their ID : the page is loaded, any document.ready/onload and so on are called, and then dojo makes its voodoo to alter the page and map Uniface stuff. In the same vein, if I load through Ajax an url targeting a DSP, the map is not done, because I removed full page tags from the hts. So what I need is simple :

How to enable function calls after dojo made its page adjustments (so we can be sure we work on the final content), and how to manually force a mapping to occur when loading a DSP, knowing the content will be put in the current page (in a div), which already contains all dojo/uniface scripts ?

Thanks for interest,
Richard

 

Hi Richard,

Just to avoid ambigouus field names.
the .1 at the end of the binding expresses the OCCURENCE of the entity in the DSP.

So you can calculate from your DSP information the complete ID of the DIV.

Success, Uli

 

 


Author: ulrich-merkel (ulrichmerkel@web.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

DSP Generated page modification after full load

Author: richard.gill@agfa.com (richard.gill)

Hi

In our current work of making use of new Uniface RIA possibilities, we're faced to some technical needs. Even if we have solutions, some techniques seem difficult to implement without control on the client side (the browser), with the help of javascript. Now the details :-) :

For various reasons, we want to make direct ajax calls (in fact ajah/ajaj, with HTML or Json replacing xml). Not a difficult task in itself, but the problem is to assign elements with their ID : the page is loaded, any document.ready/onload and so on are called, and then dojo makes its voodoo to alter the page and map Uniface stuff. In the same vein, if I load through Ajax an url targeting a DSP, the map is not done, because I removed full page tags from the hts. So what I need is simple :

How to enable function calls after dojo made its page adjustments (so we can be sure we work on the final content), and how to manually force a mapping to occur when loading a DSP, knowing the content will be put in the current page (in a div), which already contains all dojo/uniface scripts ?

Thanks for interest,
Richard

 

That's a good start, but still not work, because dojo.addOnLoad() callbacks are executed after all 'require' are satisfied, so after the page load, but before mapping is done (the field does not exist yet).

I'm considering taking contact with Compuware to have guidelines on what to do, because only them know what's done (except if I browse the uniface javascript code, but I don't have time for that).

Thanks for help
Richard


Author: richard.gill (richard.gill@agfa.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

DSP Generated page modification after full load

Author: richard.gill@agfa.com (richard.gill)

Hi

In our current work of making use of new Uniface RIA possibilities, we're faced to some technical needs. Even if we have solutions, some techniques seem difficult to implement without control on the client side (the browser), with the help of javascript. Now the details :-) :

For various reasons, we want to make direct ajax calls (in fact ajah/ajaj, with HTML or Json replacing xml). Not a difficult task in itself, but the problem is to assign elements with their ID : the page is loaded, any document.ready/onload and so on are called, and then dojo makes its voodoo to alter the page and map Uniface stuff. In the same vein, if I load through Ajax an url targeting a DSP, the map is not done, because I removed full page tags from the hts. So what I need is simple :

How to enable function calls after dojo made its page adjustments (so we can be sure we work on the final content), and how to manually force a mapping to occur when loading a DSP, knowing the content will be put in the current page (in a div), which already contains all dojo/uniface scripts ?

Thanks for interest,
Richard

 

hmmm ... i see ... what about this then:

http://docs.dojocampus.org/dojo/addOnLoad

followed by :

http://docs.dojocampus.org/quickstart/events

 

 further notes are in your MAIL :)


Author: -GHAN- (hansen@ahp-gmbh.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

DSP Generated page modification after full load

Author: richard.gill@agfa.com (richard.gill)

Hi

In our current work of making use of new Uniface RIA possibilities, we're faced to some technical needs. Even if we have solutions, some techniques seem difficult to implement without control on the client side (the browser), with the help of javascript. Now the details :-) :

For various reasons, we want to make direct ajax calls (in fact ajah/ajaj, with HTML or Json replacing xml). Not a difficult task in itself, but the problem is to assign elements with their ID : the page is loaded, any document.ready/onload and so on are called, and then dojo makes its voodoo to alter the page and map Uniface stuff. In the same vein, if I load through Ajax an url targeting a DSP, the map is not done, because I removed full page tags from the hts. So what I need is simple :

How to enable function calls after dojo made its page adjustments (so we can be sure we work on the final content), and how to manually force a mapping to occur when loading a DSP, knowing the content will be put in the current page (in a div), which already contains all dojo/uniface scripts ?

Thanks for interest,
Richard

 

Hi Richard,

perhaps you can publish your findings and demo-set in this forum here as well.

So all members here have direct access to your work.

Success, Uli


Author: ulrich-merkel (ulrichmerkel@web.de)