Expand my Community achievements bar.

"Generic HTTP Submit button"

Avatar

Former Community Member
So, my problem is really simple, but I don't know how to solve it.



According my needs, I wrote a simple component/service able to generate an URL (based on our businesss framework) to call a jsp page.



My problem is, I really don't know how to exectute that URL on the client side.

So I was thinking to dynamicly generate the mandatory URL for the HTPP Submit button.



First, is it possible ?

Second, Do u have an idea to do that ?



Thx in advnce
5 Replies

Avatar

Former Community Member
Hi,

I've the same problem, but I don't know how to solve it. Any idea??



thank's!!

Avatar

Level 10
You can set a hidden field on the form to contain the url created by your custom component using a SetValue



Then have the submit button use the hidden field's value (the URL) to do the submission.



Jasmin

Avatar

Former Community Member
Thx for your answer.

I understand well the idea, but I don't know how to reference the hidden field to the URL of the HTTP Submit button.



Could you let me know how to do.

Thx in advance.

Avatar

Level 10
You can use the following JavaScript to change the value of the target for your submit button:



xfa.resolveNode("Button1.#event.#submit").target = "http://newtest.html";



Button1 is the name of my button. You'll need to change that.



Jasmin

Avatar

Former Community Member
Thx a lot,

It works :-).



I have an additional question.

Where can I found a code sample for the SetValue.



I would like to set the value of my hidden text in java directly in my component who build the url.



Thx in advance.