dsp:go allows you set up a form in a WML page that accepts user inputs, which are saved as component properties. The methods associated with form operations process JSP tags into forms, validate user-entered data, and manage errors. This tag provides the functionality accomplished by dsp:form to the wireless context.

To learn more about how forms are designed for wireless pages, see the FormHandlinginWMLPages section of the WirelessApplicationsandDynamo chapter in ATG Programming Guide.

Attributes

FormName:href(Required)

The href attribute designates the WML page to display on form submission, if others are not supplied in URLSuccess and URLFailure properties. Often, this attribute points to the form page that supplies it.

DataOperation:method(Required)

The method attribute specifies the HTTP method the ATG platform should perform when sending data associated with the dsp:postfield tags to the server. The most common methods are get and post:

LockingaComponent:synchronized

The synchronized attribute ensures that the form handler component you want to update is unavailable for other processes. If your form uses a form handler that is global or session scoped, new data might overwrite your data before it is saved to the database. The synchronized attribute accepts the Nucleus path and component name that is blocked from submissions initiated by a form other than the one containing this designation. See Synchronizing Form Submissions for more information.

Example
<dsp:go href='<%= request.getContextPath() +"login.jsp"%>' method="post">
  <dsp:postfield bean="ProfileFormHandler.value.login" value="$login" />
  <dsp:postfield bean="ProfileFormHandler.value.password"
   value="$password" />
  <dsp:postfield bean="ProfileFormHandler.login" value=" " />
  <dsp:postfield bean="ProfileFormHandler.loginSuccessURL"
   value="FormSuccess.jsp/>
</dsp:go>

This example describes a page that handles login information. The first line specifies the default page to display on form submission. The form page, called login.jsp, is located in the same context as the current page. To do this, the context path provided in the request object is prepended to the path preceding the page name.

The remaining tags handle login, validation, and success actions. The next two tags save login and password values held in WML variables to the ProfileFormHandler so when the login handler method is invoked, (specified in the next line of code) the ATG platform verifies the login/password pair against those already in existence. Successful login diverts users to the page provided by the ProfileFormHandlerloginSuccessURL property, which is set to FormSuccess.jsp.

 
loading table of contents...