Form APIThe Form APIs allow developers access to the specialized types of form submission (e.g. partial, full, single) and processing (clear, reset) provided by ICEfaces. The following Form APIs are available:
ice.ace.clearForm(form)Accepts a form element ID or the form node itself. By calling this function, all ACE, MOBI and standard components in the form will have their values cleared. This means that text entry components will simply contain the empty string; radio controls and checkboxes will be unchecked; selection components will return to an unselected state; ace:dateTimeEntry will have its date selection removed, if any; ace:fileEntry will return to a state where no file has been specified; ace:sliderEntry will be set to its minimum value; and mobi:flipswitch will be set to off. Note that for mobi:dateSpinner and mobi:timeSpinner, the values in the text boxes will be cleared but the values in the spinner controls will be left where they were.
Usage: ice.ace.clearForm(form); Parameters:
ice.ace.resetForm(form)Accepts a form element ID or the form node itself. By calling this function, all ACE and MOBI components in the form will have their values reverted to the values they had when they were first loaded on the page. Standard components will have their values reset, as when calling the native reset() function, which simply sets the components to the value that is hard-coded in the markup. If the markup changes or is updated, the reset value might change as well for these components.
Usage: ice.ace.resetForm(form); Parameters:
ice.se(event, element) and ice.ser(event, element)These functions submit a single element rather than all the elements of the form. This kind of submission reduces the elements serialization overhead and also increases the communication efficiency with the server. Usage: ice.se sends javax.faces.partial.execute=@this and javax.faces.partial.render=@all along with the serialized element and event. ice.se(myEvent, theSubmittingElement); ice.ser sends javax.faces.partial.execute=@this and javax.faces.partial.render=@this along with the serialized element and event. ice.ser(myEvent, theSubmittingElement); Parameters:
ice.submit(event, element) or ice.s(event, element)This is the full submit function that behaves much like a traditional form submission where all form items are posted to the request. Usage: ice.s sends javax.faces.partial.execute=@all and javax.faces.partial.render=@all along with the serialized elements and event. ice.submit(myEvent, theSubmittingElement); Parameters:
|
Form API
© Copyright 2021 ICEsoft Technologies Canada Corp.