Announcement Announcement Module
Collapse
No announcement yet.
Roo 1.1.0 chapter 2 tutorial code Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo 1.1.0 chapter 2 tutorial code

    Section 2.10. Securing the Application, shows the following sample code:
    ....
    <div xmlns:sec="http://www.springframework.org/security/tags" ...>
    <jsp:output omit-xml-declaration="yes"/>
    <ul id="roo_menu">
    <sec:authorize ifAllGranted="ROLE_ADMIN">
    <li id="web_mvc_jsp_topping_category">
    ...
    </li>
    </sec:authorize>
    <li id="web_mvc_jsp_pizzaorder_category">
    ...
    </li>
    </div>


    Actual code for Roo 1.1.0:

    ?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <div xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:menu="urn:jsptagdir:/WEB-INF/tags/menu" id="menu" version="2.0">
    <jsp:output omit-xml-declaration="yes"/>

    <menu:menu id="_menu" z="nZaf43BjUg1iM0v70HJVEsXDopc=">
    <menu:category id="c_pizza" z="mXqKC1ELexS039/pkkCrZVcSry0=">
    <menu:item id="i_pizza_new" messageCode="global_menu_new" url="/pizzas?form" z="FJyKGGTINgIyGIqDihlwLSFEytE="/>
    <menu:item id="i_pizza_list" messageCode="global_menu_list" url="/pizzas?page=${empty param.page ? 1 : param.page}&amp;size=${empty param.size ? 10 : param.size}" z="eRmUYsQ0pxI7VQxH8UAF9Gp7JtI="/>
    </menu:category>
    <menu:category id="c_pizzaorder" z="gBYiBODEJrzQe3q+el5ktXISc4U=">
    <menu:item id="i_pizzaorder_new" messageCode="global_menu_new" url="/pizzaorders?form" z="eJBfkbMzVFL1bT/LrdQHD4m+qtg="/>
    <menu:item id="i_pizzaorder_list" messageCode="global_menu_list" url="/pizzaorders?page=${empty param.page ? 1 : param.page}&amp;size=${empty param.size ? 10 : param.size}" z="d3NxpciiCE72PTZgHNx/BdLigk4="/>
    </menu:category>
    <menu:category id="c_base" z="yTpmmNMm/hWoy3yf+aPcdUX2At8=">
    <menu:item id="i_base_new" messageCode="global_menu_new" url="/bases?form" z="+i6N/uFq65rRQkyN9G93ZSDxIec="/>
    <menu:item id="i_base_list" messageCode="global_menu_list" url="/bases?page=${empty param.page ? 1 : param.page}&amp;size=${empty param.size ? 10 : param.size}" z="bztucYGCX6rDQ5LBvLu8c5Mn8mM="/>
    </menu:category>
    <menu:category id="c_topping" z="Xm13w68rCIyzL6WIzqBtcpfiNQU=">
    <menu:item id="i_topping_new" messageCode="global_menu_new" url="/toppings?form" z="e1a5iGUXU+AnmE3TsSiRG0anau4="/>
    <menu:item id="i_topping_list" messageCode="global_menu_list" url="/toppings?page=${empty param.page ? 1 : param.page}&amp;size=${empty param.size ? 10 : param.size}" z="6PPggjZdPiNA9TA99B29FqbliZI="/>
    </menu:category>
    </menu:menu>
    </div>


    What might the reason for the large code differences?
    How do I adapt the code for Roo 1.1.0?

    Regards,
    lchong2

  • #2
    I have the same problem with the Roo 1.1.2
    Could anybody to post the link to the source code of the menu.jspx ?

    Comment


    • #3
      I find the Spring Security - Tutorial (http://bit.ly/ic0LpU). The solution is in the "The Spring Security JSP Tag Library" section.

      Comment


      • #4
        My code is changed in this way:

        <?xml version="1.0" encoding="UTF-8" standalone="no"?>
        <div xmlns:sec="http://www.springframework.org/security/tags" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:menu="urn:jsptagdir:/WEB-INF/tags/menu" id="menu" version="2.0">
        <jsp:directive.page contentType="text/html;charset=UTF-8"/>
        <jsp:output omit-xml-declaration="yes"/>
        <menu:menu id="_menu" z="nZaf43BjUg1iM0v70HJVEsXDopc=">
        <sec:authorize ifAllGranted="ROLE_ADMIN">
        <menu:category id="c_pizza" z="mXqKC1ELexS039/pkkCrZVcSry0=">
        <menu:item id="i_pizza_new" messageCode="global_menu_new" url="/pizzas?form" z="FJyKGGTINgIyGIqDihlwLSFEytE="/>
        <menu:item id="i_pizza_list" messageCode="global_menu_list" url="/pizzas?page=1&amp;size=${empty param.size ? 10 : param.size}" z="xeipeDE0x1I+04qwdIrWrLg/6lc="/>
        </menu:category>
        <menu:category id="c_base" z="yTpmmNMm/hWoy3yf+aPcdUX2At8=">
        <menu:item id="i_base_new" messageCode="global_menu_new" url="/bases?form" z="+i6N/uFq65rRQkyN9G93ZSDxIec="/>
        <menu:item id="i_base_list" messageCode="global_menu_list" url="/bases?page=1&amp;size=${empty param.size ? 10 : param.size}" z="IjVNhoTFsVL/VpAHVFlKm0YDCNs="/>
        </menu:category>
        <menu:category id="c_topping" z="Xm13w68rCIyzL6WIzqBtcpfiNQU=">
        <menu:item id="i_topping_new" messageCode="global_menu_new" url="/toppings?form" z="e1a5iGUXU+AnmE3TsSiRG0anau4="/>
        <menu:item id="i_topping_list" messageCode="global_menu_list" url="/toppings?page=1&amp;size=${empty param.size ? 10 : param.size}" z="XzlIdR9bro/F4JpeR+A0AAJ/u7g="/>
        </menu:category>
        </sec:authorize>
        <menu:category id="c_pizzaorder" z="gBYiBODEJrzQe3q+el5ktXISc4U=">
        <menu:item id="i_pizzaorder_new" messageCode="global_menu_new" url="/pizzaorders?form" z="eJBfkbMzVFL1bT/LrdQHD4m+qtg="/>
        <menu:item id="i_pizzaorder_list" messageCode="global_menu_list" url="/pizzaorders?page=1&amp;size=${empty param.size ? 10 : param.size}" z="/lz0rZsZXixy10fiHWPaso3II90="/>
        </menu:category>
        </menu:menu>
        </div>


        But someone need to update the tutorial page.
        Thanks

        Comment

        Working...
        X