Announcement Announcement Module
Collapse
No announcement yet.
Listen for executions of JspMetadataListener Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Listen for executions of JspMetadataListener

    Hi

    I'm playing around with a small addon for roo. What I would like to do is:

    1. new command to use in the shell - OK
    2. Add annotation to entity and create new methods on entity- OK
    3. Create calls from controller to methods, done via a new ITD - OK
    4. Add buttons in update.jspx file - NOT OK

    Everything works fine until I try to change the update.jspx-file. I've tried making the changes when creating the ITD in my MetadataProvider and from a listener. But in both instances i seems like the file is changed by JspMetadataListener.

    Is it possible to do the changes to update.jspx after JspMetataDataListener has finished? In other words listen for executions fo JspMetadataListener.

  • #2
    Your work seems quite interesting in that you take advantage of a lot of Roo's infrastructure (using ITDs to add new functionalities to entities and controllers) in your addon. However, managing view artifacts such as create.jspx, update.jspx, list.jspx and show.jspx is currently not possible because Roo is not (yet) round-tripping these artifacts. If you take a look at the JspMetadataListener you will notice that we generate an in-memory model of these files and compare it with the existing artifacts in the file system. If they don't match we replace them with the generated DOM model. Unfortunately, the JspMetadataListener is currently not aware of external addons and will therefore replace your additions to these files with the default contents.

    We are aware of this (see ROO-8 and related Jira tickets) and will address it with the upcoming Roo 1.1 releases. I am working on prototypes which will round-trip the aforementioned files (rather then replace them) and therefore making it possible for third party addon developers (you) to add functionality to these files. That way JspMetadataListener can still do it's work (which will actually much simplified) while honouring your changes in the file.

    So, in short, currently you cannot change a Roo generated update.jspx. However, I am hoping to get started on this issue so that you can soon see the first milestone release of Roo 1.1 which will make your addon work.

    Comment

    Working...
    X