Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

HTML Composer I recently found out about the ability to crea...


Jess Hines

Recommended Posts

HTML Composer

I recently found out about the ability to create a control and use the Values are procedures/HTML files (in the Settings panel).

This is great as it would allow me to remove a bunch of custom JavaScript having to do with modifying the XML for the request, which has given us problems every time weve upgraded versions.

However, I cant figure out how to also pass parameters to a procedure that runs in this manner. All Ive done is swap out the way the procedure is called so that the Request/Action that runs when I click the button is Procedures from Control.

But if I print out all the amper variables (by putting - &) in the proc, they are all the default values, and are no longer getting passed by the HTML page.

Has anyone managed to send parameters from the HTML controls (bound to parameters) over to a procedure thats run in this way

Link to comment
Share on other sites

Hi Jess

Welcome to the myibi forum! I hope you find it helpful for getting answers to your development questions.

What version of WebFOCUS are you using I have never used the option Values are procedures/HTML files before but I did find an entry on techsupport that may be helpful. Also in trying to follow your steps I see an option Run Procedures/HTML from Control but not a Procedures from Control. I am using version 8.2.06-15 but this case below was for version 8.2.01

Explanation

This is a New Feature Request for the checkbox, Values are procedures/html files, when the control is dynamically populate. Currently this option only exists for static population.

Reproduction

 

Create an HTML page in App Studio and add a control, such as a listbox. 2. Set the control to dynamically populate. Note that there is no option to say that the values are prcoedures/HTML files. Business Justification: This option is currently available when using static population. A workaround exists, but requires an extra control and JavaScript processing. The extra control + JS code should not be required.

 

Workaround

Information provided by customer: added a dropdown component, which contains the html filename values, and then create a task to load the frame from the dropdown. the values in the dropdown are added by checking on the static setting tab 'values are procedure/html files. In addition, this workaround requires adding the following javascript: //Begin function reportlist_onchange function reportlist_onchange(event) { var eventObject = event event : window.event; var ctrl = eventObject.target eventObject.target : eventObject.srcElement; // TODO: Add your event handler code here IbComposer_setCurrentSelection(combobox1,ctrl.value,false); IbComposer_triggerExecution(task2,1); } //End function reportlist_onchange It should not be necessary to create an extra control, and code javascript simply to populate a frame with an html file based on the dynamic population of a control.

Link to comment
Share on other sites

Im on 8207.

The problem isnt populating the control (which I am doing dynamically), nor even on it running the procedure. The problem is that since its not represented as a report on the HTML page, it is apparently not sending along any parameters from the HTML form. I thought I may be doing something wrong, but if it can only run procedures that dont need any parameters, then in its current state the feature is of no use to me.

I currently have a case open on this; well see if theres any resolution.

Link to comment
Share on other sites

We do this for many pages, although the listboxes are static, not dynamic, but I have several of them on different tabs of the same page along with other parameter controls. Each fex in the listbox needs to also be represented in the Requests and Data Sources along with the parameters that should be passed to it. The task is attached to a Submit button and is set to Procedures from Control/controlname, e.g. listbox1
Link to comment
Share on other sites

Huh, I would not have figured that out on my own. But I think you may have hit the solution. I added a couple of the procedures to Requests and Data Sources, and it looks like it worked. I have about 50-70 total, so well see if that has any deleterious effects on performance, but I wouldnt think so since its all static until a report is run.

EDIT: I take it back; Its still not working. If I have the task run a procedure by name, it gets the parameters. But when I have the task run a procedure from the listbox, even if I have the procedure in Requests and Data Sources, the procedure runs, but doesnt get any of the parameters!

@charles.morris: So youre saying youre running a procedure from a listbox, that procedure needs parameters from the HTML page, and its getting them correctly

Ive added my procedures to the Requests panel, and in one of them just added - & right after my DEFAULT statements and then -EXIT and its showing that none of my parameters are going through, even though when I view the parameters in the Requests and Data Sources, they all have the little gold box icon, indicating that parameters are hooked up.

Link to comment
Share on other sites

Yes, everything regarding the chaining works from the form, and if I have a task run one of the requests directly, parameters are passed.

In fact, in the task, I can have both Run request and Procedures from Control, doing the first in a new window and the second in a frame, the report that runs from the request gets parameters from the page, and the one from the control does not.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...