Products
About Guided Tour Online Demo Trial Version Requirements
Resources
Documents Configuration examples TagLib Reference Useful Links
Customer Support
Updates Forums Contact Services
Sales
Licensing Sales FAQ Buy Online
 
 
 
buy online   |   about us   |   german version  

» 5. Configuration of the ListControl within the JSP-Page

In order to use the ListControl-tag on a JSP page, the corresponding tag library must be declared at the start of the page. Then, the Common-Controls can be used with the prefix <ctrl:tagname />. [In addition, the tag libraries must be included in the Deployment descriptor, the WEB-INF/web.xml file]

<%@ taglib uri="/WEB-INF/tlds/cc-controls.tld" prefix="ctrl" %>

<ctrl:list
    id="userlist1"
    action="sample101/userBrowse"
    name="users"
    title="User List"
    width="500"
    rows="15"
    refreshButton="true"
    createButton="true">

    <ctrl:columndrilldown
        title="Id"
        property="userId"
        width="65"/>

    <ctrl:columntext
        title="Name"
        property="name"
        width="350"/>

    <ctrl:columntext
        title="Role"
        property="role.value"
        width="150"/>

    <ctrl:columnedit
        title="Edit"/>

    <ctrl:columndelete
        title="Delete"/>

</ctrl:list>

All the necessary steps for using the ListControl are thus complete.

  • The scrolling mechanism does not have to be self-implemented, since it is already made available by the ListControl.
  • In the JSP-Page, we have determined that the ListControl should draw a maximum of 15 lines or rows. When more lines are available, the buttons for scrolling forward and back are displayed automatically.
  • A click on the forward button results in a Server roundtrip and the display of the next page. The refreshing is then taken care of by the presentation framework. No additional code has to be implemented.

back   |   continue

Impressum | This product includes software developed by the Java Apache Project
Tours
ListControl TreeControl TreeListControl TabSetControl Form Tags MenuControl Print version Live Demo Configuration