32.3. The Goto event

This diagram shows the interaction between the Controller object, the GotoEvent object and all the other actors that are used to process this navigation event.

32.3.1. Steps

  • The Controller servlet calls the GotoEvent's processEvent method.

  • The GotoEvent object parses the position string and build a FieldValues data structure representing the values of the fields decoded from that position. The position string uses the following format:

      field(0).id : field(0).length : field(0).value - ... - field(n).id : field(n).length : field(n).value

    and contains data for all the fields of the current table. It calls table.mapChildFieldValues if the event was generated by a parent-child table; else calls table.getFieldValues.

    Note: the Table's mapChildFieldValues method is used to build a new FieldValues object that inherits the fields' names from the child table and the fields' values from the parent table.

  • Having the FieldValues data for the input position, the GotoEvent object try to build the key position string. It uses the same format as position string:

      field(0).id : field(0).length : field(0).value - ... - field(n).id : field(n).length : field(n).value

    but contains data only for the fields that define the key set for the current table.

  • The GotoEvent object gets the DataSourceList instance and remove the DataSourceFactory associated to the current table and to the current the current request URI from its internal list. (the current request URI example value: /bookstore_v1_1_x_20030819/tests/testAUTHOR_list.jsp?AUTHOR)

  • The GotoEvent object instantiates a new DataSourceFactory object and stores it into the DataSourceList

  • The GotoEvent object calls the DataSourceFactory.getCurrent method passing to it the key position string to return a new ResultSetVector object to the Controller