Retreiving data from a data structure and displaying it.

I have a screen where there are more than 40 fields. I want to collect the all the values from these fields by using a path procedure and then displaying on the screen. In order to save the data from these 40 fields I need add 40 attributes in order to store the values.

The problem is adding 40 attributes is not so easy. It can also be more than 40. Can you please tell how can this be done in a easy manner?

I tried to create a data structure by selecting all the fields of the selected screen, do a right click and then create a data structure. Now I added this data structure in the output of the procedure and also mapped the fields of the screen to the data structure by using screen mapper. When I debug the path I also get the correct output. The problem is how can I retrieve the data(in the .java file) from this structure and then set it into desired fields using getTagsAccesor().setTagContent.

Please help.


Please see in the ApplinX help : Combining Data from Multiple Host screens' (part of ApplinX Web Application Development Guide’)

Quoting from there:

  1.  Create a Path Procedure which includes outputs.
  2.  Associate the procedure with a procedure group.
  3.  Generate a procedure client from the procedure group.
  4.  In the JSP/ASPX file, add controls to match the procedure output:

o Text output values placed within any gx:control, with an identical ID as the output attributes name.

o Text array output values, placed within any gx:control with an ID structure such as outputname_oxx.

o Data structure arrays, only possible to apply them to gx:tables, with a similar structure, and identical IDs.

  1.  Override the gx_fillForm method. Run the parent class gx_fillForm method, and then execute the procedure using the procedure client you generated previously. Run the gx_fillForm(<procedureResponse>). Refer to 

To combine data from multiple host screens (JSP):

Create a Web page (JSP) for the first screen of the collection path, containing fields representing the fields appearing in all accumulated host screens, for example:

In the page’s code behind (located at \WEB-INF\classes\contexts), override the function gx_fillForm, executing the collection path and filling the page with the path’s output:

public void gx_fillForm(){
ProcedureClientMethodRequest req = new ProcedureClientMethodRequest();
ProcedureClientMethodResponse res = (ProcedureClientMethodResponse)getGXSession().executeProcedure(req);

When performing the 1st step (`Create a Path Procedure which includes outputs’) you would get the output fields while recording (by marking those fields). The result is a list of fields in the path procedure output mapped and ready to use (instead of the datastructure you described. That would be very useful had you wanted to fill a table: an array of that datastructure would be the thing to fill the gx:table with).

Hope it helps.