T
tciot
Guest
Mark, I just tried this on my environment and it works well. The key principles: è You create some html elements with well known IDs to easily access them via jquery è Javascript makes Ajax call to retrieve the values based on objectId and list of fields you need to retrieve è On Ajax completion callback, use jquery to find the html elements to which you want to dynamically add the retrieved values I hope this works well for you too, the details are below. I’m curious though on the use case. Why do you have so many “singletons”? Thierry. Here are the steps: 1) Take note of: a. The object id of your object (click on your object and use the id at the end of the url, for example: main.jsp?pageId=41601&tabId=41689&id=43901 b. The link to the edit page 2) Create a generic page and add a section 3) In section add html component (See content below) 4) In section add javascript component with this (See content below) HTML for step 3 : replace the link with your own link to edit object h3 This is one Record from Object1 List /h3 p Int 1 Field: span id="item1Id" /span br / Int 2 Field: span id="item2Id" /span /p p /p p a href="http://localhost:8080/prod1/m/main.jsp?id=41739&pageId=40262&view" Edit /a /p p /p JavaScript for Step 4 : replace with your actual objectId and your fields of interest. script function my_callback(objName, objId, values) { var int1 = values['intFieldOne']; var int2 = values['intFieldTwo']; console.log("int1: " + int1 + " - int2: "+int2); $("#item1Id").text(int1); $("#item2Id").text(int2); } // debugger; var x = rbf_getFields("Object1", 41739, "intFieldOne,intFieldTwo", my_callback); console.log("Ajax call made"); /script Here is the object on my system in the grid: it’s called o1 and has 2 int fields Here the generic page output: From: Thierry Ciot Sent: Friday, May 29, 2015 1:26 PM To: TU.General@community.progress.com Subject: RE: [Community Groups - General] Rollbase: Design This Page List's Sure, I will provide you with an example later on. I have a couple of things to attend to. From: MarkT [ mailto:bounce-MarkT@community.progress.com ] Sent: Friday, May 29, 2015 12:10 PM To: TU.General@community.progress.com Subject: RE: [Community Groups - General] Rollbase: Design This Page List's RE: Rollbase: Design This Page List's Reply by MarkT Hi tciot, Do you have any examples on how you'd render a generic page with the data you get back from rbf_getFields? I'm used to the {!fieldName} replacements - but obviously you wouldn't be able to do that sort of thing in this case. Would I need to write some JQuery that dynamically built up the screen - or something along those lines? Thanks! Stop receiving emails on this subject. Flag this post as spam/abuse.
Continue reading...
Continue reading...