Announcement Announcement Module
Collapse
No announcement yet.
user-configured controller paths dows not work with more than one path element Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • user-configured controller paths dows 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, 03:02 PM. Reason: typo

  • #2
    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.

    Comment


    • #3
      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".

      Comment


      • #4
        I have just created two seperate bug reports:
        https://jira.springsource.org/browse/ROO-290
        https://jira.springsource.org/browse/ROO-291

        Comment


        • #5
          Thanks for logging the bug reports; we'll address them as a priority.

          Comment

          Working...
          X