Announcement Announcement Module
Collapse
No announcement yet.
wedding tutorial on 1.1.0 m1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • wedding tutorial on 1.1.0 m1

    hi, the code generated for 1.1.0 m1 is slightly changed . i'm trying tutorial at
    http://blog.springsource.com/2009/05/27/roo-part-2/

    but for part

    Next copy src/main/webapp/WEB-INF/views/rsvp/create.jspx to src/main/webapp/WEB-INF/views/publicrsvp.jspx. This page should then be edited. You can safely delete the "code" and "confirmed" sections, as both are taken care of by the PublicRsvpController. You should also change the "form_url" variable assignment to <c:url value="/publicrsvp" var="form_url"/>.

    there is no 'form_url' inside create.jspx . can someone guide on this?

  • #2
    I will update the wedding RSVP application tutorial blog once Roo 1.1.0 goes final, as the new JSPX tags are likely to continue to change in the interim.

    Comment


    • #3
      I would appreciate a lot if you could update the wedding tutorial now that Roo 1.1.0 is final.

      I got stuck here at the "last step" :
      The very last step is to edit src/main/webapp/WEB-INF/urlrewrite.xml and change the URL rewrite rule for /. The /app/index should be modified to /app/publicrsvp/, which indicates to perform a GET of the new PublicRsvpController by default
      There's no urlrewrite.xml with Roo 1.1.1 generated files, so I tried by renaming "index" with "publicrsvp" in webmvc-config.xml like this :

      <!-- selects a static view for rendering without the need for an explicit controller -->
      <mvc:view-controller path="/login"/>
      <mvc:view-controller path="/" view-name="publicrsvp"/>
      <mvc:view-controller path="/uncaughtException"/>
      <mvc:view-controller path="/resourceNotFound"/>
      <mvc:view-controller path="/dataAccessFailure"/>

      I din't know what was the right this to do here, but it was not enough : publicrsvp.jspx gets rendered without going first to PublicRsvpController.java where rsvp gets set, generate then this error.

      SEVERE: Servlet.service() for servlet jsp threw exception
      java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'rsvp' available as request attribute
      at org.springframework.web.servlet.support.BindStatus .<init>(BindStatus.java:141)
      at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getBindStatus(AbstractData BoundFormElementTag.java:174)
      at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getPropertyPath(AbstractDa taBoundFormElementTag.java:194)
      at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getName(AbstractDataBoundF ormElementTag.java:160)
      at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.writeDefaultAttributes(Abs tractDataBoundFormElementTag.java:123)
      at org.springframework.web.servlet.tags.form.Abstract HtmlElementTag.writeDefaultAttributes(AbstractHtml ElementTag.java:408)
      at org.springframework.web.servlet.tags.form.InputTag .writeTagContent(InputTag.java:140)
      at org.springframework.web.servlet.tags.form.Abstract FormTag.doStartTagInternal(AbstractFormTag.java:10 2)
      at org.springframework.web.servlet.tags.RequestContex tAwareTag.doStartTag(RequestContextAwareTag.java:7 9)
      at org.apache.jsp.tag.web.form.fields.input_tagx._jsp x_meth_form_005finput_005f0(input_tagx.java:1131)
      at org.apache.jsp.tag.web.form.fields.input_tagx._jsp x_meth_c_005fotherwise_005f2(input_tagx.java:1101)
      at org.apache.jsp.tag.web.form.fields.input_tagx._jsp x_meth_c_005fchoose_005f2(input_tagx.java:1019)
      at org.apache.jsp.tag.web.form.fields.input_tagx.doTa g(input_tagx.java:361)
      at org.apache.jsp.WEB_002dINF.views.publicrsvp_jspx._ jspx_meth_field_005finput_005f0(publicrsvp_jspx.ja va:120)
      at org.apache.jsp.WEB_002dINF.views.publicrsvp_jspx.a ccess$0(publicrsvp_jspx.java:105)
      at org.apache.jsp.WEB_002dINF.views.publicrsvp_jspx$H elper.invoke0(publicrsvp_jspx.java:196)
      at org.apache.jsp.WEB_002dINF.views.publicrsvp_jspx$H elper.invoke(publicrsvp_jspx.java:217)
      at org.apache.jsp.tag.web.form.create_tagx$Helper.inv oke0(create_tagx.java:617)
      at org.apache.jsp.tag.web.form.create_tagx$Helper.inv oke(create_tagx.java:658)
      at org.apache.jsp.tag.web.util.panel_tagx._jspx_meth_ c_005fif_005f0(panel_tagx.java:184)
      at org.apache.jsp.tag.web.util.panel_tagx.doTag(panel _tagx.java:130)
      at org.apache.jsp.tag.web.form.create_tagx.doTag(crea te_tagx.java:233)


      I found a solution later by changing the @RequestMapping in PublicRsvpController.java to this :
      @RequestMapping(value = {"/publicrsvp/**", "/"})

      It's probably trivial to many, but I am getting up to speed with Roo, but it took me more than a day to understand what
      s going on and what's the problem.

      Thanks got this tutorial, it's a nice example of customizing an Roo app so I really wanted to get it done.

      Comment

      Working...
      X