Results 1 to 5 of 5

Thread: user-configured controller paths dows not work with more than one path element

  1. #1
    Join Date
    Aug 2009
    Location
    Paderborn
    Posts
    9

    Default user-configured controller path does not work with more than one path element

    I have tried the new RC2 feature "user-configured controller paths".
    But it does not seem to work for paths with more than one element.

    My commands are:
    Code:
    controller scaffold --name ~.web.MyEntityController --entity ~.model.MyEntity --path admin/myentity
    controller scaffold --name ~.web.MyOtherEntityController --entity ~.model.MyOtherEntity --path /admin/myotherentity/
    This is the generated view code:
    HTML Code:
    <li id="web_mvc_jsp_create_admin/myentity_menu_item">
        <c:url value="/admin/myentity/form" var="web_mvc_jsp_create_admin/myentity_menu_item_url"/>
        <a href="${web_mvc_jsp_create_admin/myentity_menu_item_url}">
            <spring:message arguments="MyEntity" code="global.menu.new"/>
        </a>
    </li>
    ...
    <li id="web_mvc_jsp_create_admin/myotherentity/_menu_item">
        <c:url value="/admin/myotherentity//form" var="web_mvc_jsp_create_admin/myotherentity/_menu_item_url"/>
        <a href="${web_mvc_jsp_create_admin/myotherentity/_menu_item_url}">
            <spring:message arguments="MyOtherEntity" code="global.menu.new"/>
        </a>
    </li>
    And this is the result:
    HTML Code:
    <a href="0">Create new MyEntity</a>
    ...
    <a href="NaN">Create new MyOtherEntity</a>
    It seems that the variable generation strategy produces invalid expressions.

    Cheers
    Tim
    Last edited by tisch; Oct 12th, 2009 at 03:02 PM. Reason: typo

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    Would you please log this as a bug in our Jira at https://jira.springsource.org/browse/ROO and we'll take a look. Thanks.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  3. #3
    Join Date
    Sep 2009
    Posts
    101

    Default

    Similarly, I noticed that the "Show Object" icon in the generated list view does not use the custom controller path. E.g., if I create a controller with:

    Code:
    controller scaffold --name ~.web.home.TaskController --entity ~.domain.Task --path appuser/task
    And then navigate to /myapp/appuser/task, I get a list of tasks. Perfect. But the "show task" icon for each task row is mapped to the wrong url, e.g.:

    Code:
    <form id="command" action="/myapp/task/23" method="GET">
    Note that the "action" in this case should be "/myapp/appuser/task/23".

  4. #4
    Join Date
    Aug 2009
    Location
    Paderborn
    Posts
    9

  5. #5
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    Thanks for logging the bug reports; we'll address them as a priority.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •