How to send a param to another page

Values can be passed to another page in 2 ways, POST or GET:

GET (modal, pop up, _self, ...)

The values are send in the URL with "&"; Example: www.igrp.cv/w?m=value&p_ip=2

POST (submit modal, submit pop up, submit, ...)

All the submits actions like, submit modal, submit, submit ajax, sends the values in POST in body

Send a param value in a table (GET or POST-submit)

In a table, you can define a param in the UI settings (see fig.) checking the is Key checkbox.

After checking the is Key, now when you press a context button it will concatenate this param to the URL (GET) or added to the body (POST)

Send a param value in a method actionXXX() (for table, use the is Key in above aproach Fig.1)

  • Specific param - this.addQueryString("p_id", 12);

  • Load all params to send - this.loadQueryString();

  • Button - view.btn_gravar.addParameter("id", 20).addParameter("name", "yma"); or view.btn_button.setLink("save&p_id="+id);

Than must have redirect or forward with (,this.queryString())

Read a param sended

  • String id = Core.getParam("p_id");

  • Integer id = Core.getParamInt("p_id");

PS:

redirect is always a GET

Last updated