Home| Printable Version
WebMaker provides different binding options to ease the development process. This is achieved using the Page Structure tab and the Data Bindings tab within FormMaker. All bindings in WebMaker occur between HTML page elements and a server-side XML structure. The type of binding you use will depend on the type of page you are building and also the type of operation you are performing from the page. There are two categories of bindings, Page Bindings and Action Bindings. Page bindings occur when a page is supplied by the server Controller and sent to the browser for display. This process involves binding data from an XML structure on the server to the HTML elements on the page. The XML structure is always referring to the structure of the data within the server Controller at runtime. Page Display Bindings As you drag and drop controls from the palette and the various design helpers on the right hand panel of the Page Structure tab during the design process, WebMaker will generate default binding structures for you. By default, controls within the palette will reside within the <formData> tag. Any structured data dragged from the right-hand panel will generate a structure that is similar to the original data structure. You can view the generated documents within the right-hand side panel of the Data Bindings tab. Please note that the generated documents are initial assumptions and you can modify the generated XML instances to more closely resemble your runtime XML data structure. For example, if your server data will contain a composite document resulting from two service calls then your binding instance will contain the response fragments from two responses in a container element of your choice. You can manually change the instance document from the Data Bindings tab. To return to our task of binding XML data from the Controller to the HTML page elements, you can visit the Data Bindings tab. On the Data Bindings tab you will see two tabs on the left hand side. The Bindings tab should be selected by default. This tab contains the page elements. The centre section also contains two tabs, one for the Page Display Bindings and one for the Action Submission Bindings. In this scenario we are interested in the page bindings. The right hand panel will display the instance document that was generated by default during the page creation stages. You can change individual bindings by dragging-and-dropping the XML elements on the right to the Page Display Bindings tab in the middle. This binding represents the binding of the server XML element on the right hand side to the page element on the left hand side via the XPath shown on the Page Display Bindings tab in the middle. Data Bindings Tab Please note that most of the bindings will be completed already. This is performed when you drag and drop the schema structure to create the page in the first instance within the Page Structure tab. You can manually change the elements that are incorrectly bound by selecting the page field on the left and dragging and dropping the elements on the right into the Page Display Bindings tab in the middle. Using these bindings WebMaker will ensure runtime data contained in an XML structure within the Controller is bound to the correct fields on the page.
Calling Remote Services from the Server Binding Form Fields (HTML) to Server Data (XML)