Hello Richard

I did something similar. I wanted a way to connect  forms to a groovy
scripts, so I could create generic tasks that can be configured by
users at runtime. What I did:

1 Create a vaadin app. This is pretty much a standalone thing.
2 Add the vaadin jar and the vaadin servlet at Configuration > server
> filters > servlets (see attachment)
3 create a link in the adminInterface module > config > menu > tools
menu to the app (in an iframe to the right) (see attachment)

hopes this helps

regards,

-- 
Ernst Bunders
Ontwikkelaar VPRO

 modules/extensions for Magnolia –
> nothing really CMS related, more things to interface with our customer’s
> existing IT.
>
>
>
> To avoid having to rewrite everything in a few months for magnolia 5, we
> would like to implement the GUIs in Vaadin from the start.
>
>
>
> The question is: how?
>
>
>
> I’ve looked at Vaadin, done some tutorials, and have my GUI working outside
> of Magnolia.
>
> I’ve looked at the new magnolia-module-admincentral-vaadin.
>
>
>
> So I have 2 Questions:
>
>
>
> 1)      What’s the right way to integrate new Vaadin-based GUI components?
>
>
>
> What I’m doing would have been implemented as a “page” in the old
> adminCentral. Am I correct in assuming that I would extend
> info.magnolia.module.admincentral.components.MagnoliaBaseComponent  to
> create my gui-component, and then simply configure a menu-item with
> view=myviewclassname to provide access to my view from adminCentral’s menu?
>
> Do I need to do any special magnolia-related init() or cleanup work in the
> Vaadin component?
>
>
>
> 2)      I don’t want to run the experimental Vaadin-AdminCentral in
> production yet. Can I use Vaadin from within the old adminCentral?
>
>
>
> My problem is that I don’t want to run Vaadin-Admincentral in production at
> the moment, it’s not ready. I’d still like to offer my vaadin-based GUI.
>
>
>
> I see the MagnoliaBaseComponent class depends upon prior initialization of
> the AdminCentralVaadinApplication class, and uses the application’s layout
> (“mainComponent”).
>
>
>
> I think one approach might be to directly extend CustomComponent for the
> moment, and use my own Vaadin Application class for the moment. By
> initializing it similarily to AdminCentralVaadinApplication I should be able
> to use the existing magnolia-vaadin-theme.
>
> Changing the class to extend MagnoliaBaseComponent should then be fairly
> easy when Magnolia 5.0 comes.
>
>
>
> Now one question remains: how add the Vaadin Servlet to the old adminCentral
> – would it be sufficient to create a new servlet mapping under
> config->filters->servlets, say mapped to the URI
> “/.magnolia/vaadinpreview/*” ?
>
>
>
> Thanks for your thoughts and feedback!
>
>
>
> Regards from Vienna,
>
> Richard
>
>
>
>
>
> ________________________________
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
>



-- 
Ernst Bunders
Ontwikkelaar VPRO


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="gui-script" xmlns:sv="http://www.jcp.org/jcr/sv/1.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <sv:property sv:name="jcr:primaryType" sv:type="Name">
    <sv:value>mgnl:contentNode</sv:value>
  </sv:property>
  <sv:property sv:name="jcr:uuid" sv:type="String">
    <sv:value>b25e339a-a610-4a36-b2c6-30a545ae5f92</sv:value>
  </sv:property>
  <sv:property sv:name="icon" sv:type="String">
    <sv:value>/.resources/groovyshell/icons/groovy-small.png</sv:value>
  </sv:property>
  <sv:property sv:name="label" sv:type="String">
    <sv:value>VPRO Gui Scripts</sv:value>
  </sv:property>
  <sv:property sv:name="onclick" sv:type="String">
    <sv:value>MgnlAdminCentral.showContent('/.vaadin/guiscript/');</sv:value>
  </sv:property>
  <sv:node sv:name="MetaData">
    <sv:property sv:name="jcr:primaryType" sv:type="Name">
      <sv:value>mgnl:metaData</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:Data" sv:type="String">
      <sv:value>MetaData</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:activated" sv:type="Boolean">
      <sv:value>false</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:activatorid" sv:type="String">
      <sv:value>superuser</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:authorid" sv:type="String">
      <sv:value>superuser</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:creationdate" sv:type="Date">
      <sv:value>2005-05-16T20:46:43.549+02:00</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:lastaction" sv:type="Date">
      <sv:value>2006-05-08T18:35:45.356+09:00</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
      <sv:value>2010-09-28T11:27:14.167+02:00</sv:value>
    </sv:property>
  </sv:node>
</sv:node>
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="Vaadin-gui-script" xmlns:sv="http://www.jcp.org/jcr/sv/1.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <sv:property sv:name="jcr:primaryType" sv:type="Name">
    <sv:value>mgnl:contentNode</sv:value>
  </sv:property>
  <sv:property sv:name="jcr:mixinTypes" sv:type="Name">
    <sv:value>mix:lockable</sv:value>
  </sv:property>
  <sv:property sv:name="jcr:uuid" sv:type="String">
    <sv:value>c49f6627-a6aa-4aa6-9ca9-aadbfb8085de</sv:value>
  </sv:property>
  <sv:property sv:name="class" sv:type="String">
    <sv:value>info.magnolia.cms.filters.ServletDispatchingFilter</sv:value>
  </sv:property>
  <sv:property sv:name="comment" sv:type="String">
    <sv:value>the vaadin application servlet</sv:value>
  </sv:property>
  <sv:property sv:name="enabled" sv:type="Boolean">
    <sv:value>true</sv:value>
  </sv:property>
  <sv:property sv:name="servletClass" sv:type="String">
    <sv:value>com.vaadin.terminal.gwt.server.ApplicationServlet</sv:value>
  </sv:property>
  <sv:property sv:name="servletName" sv:type="String">
    <sv:value>vaadin-gui-script</sv:value>
  </sv:property>
  <sv:node sv:name="MetaData">
    <sv:property sv:name="jcr:primaryType" sv:type="Name">
      <sv:value>mgnl:metaData</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:activated" sv:type="Boolean">
      <sv:value>false</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:authorid" sv:type="String">
      <sv:value>superuser</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:creationdate" sv:type="Date">
      <sv:value>2010-09-03T16:57:00.465+02:00</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
      <sv:value>2010-09-27T11:22:42.790+02:00</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:title" sv:type="String">
      <sv:value/>
    </sv:property>
  </sv:node>
  <sv:node sv:name="mappings">
    <sv:property sv:name="jcr:primaryType" sv:type="Name">
      <sv:value>mgnl:contentNode</sv:value>
    </sv:property>
    <sv:property sv:name="jcr:mixinTypes" sv:type="Name">
      <sv:value>mix:lockable</sv:value>
    </sv:property>
    <sv:property sv:name="jcr:uuid" sv:type="String">
      <sv:value>2f7c6336-fbd7-4561-ba25-77bc35ec9d8d</sv:value>
    </sv:property>
    <sv:node sv:name="MetaData">
      <sv:property sv:name="jcr:primaryType" sv:type="Name">
        <sv:value>mgnl:metaData</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:activated" sv:type="Boolean">
        <sv:value>false</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:authorid" sv:type="String">
        <sv:value>anonymous</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:creationdate" sv:type="Date">
        <sv:value>2010-09-03T16:57:00.467+02:00</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
        <sv:value>2010-09-22T16:54:57.936+02:00</sv:value>
      </sv:property>
    </sv:node>
    <sv:node sv:name="--vaadin--">
      <sv:property sv:name="jcr:primaryType" sv:type="Name">
        <sv:value>mgnl:contentNode</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:mixinTypes" sv:type="Name">
        <sv:value>mix:lockable</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:uuid" sv:type="String">
        <sv:value>8ab184c4-0af6-4641-b66b-3a249f00089b</sv:value>
      </sv:property>
      <sv:property sv:name="pattern" sv:type="String">
        <sv:value>/.vaadin/guiscript/*</sv:value>
      </sv:property>
      <sv:node sv:name="MetaData">
        <sv:property sv:name="jcr:primaryType" sv:type="Name">
          <sv:value>mgnl:metaData</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:activated" sv:type="Boolean">
          <sv:value>false</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:authorid" sv:type="String">
          <sv:value>superuser</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:creationdate" sv:type="Date">
          <sv:value>2010-09-03T16:57:00.468+02:00</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
          <sv:value>2010-09-22T17:39:03.462+02:00</sv:value>
        </sv:property>
      </sv:node>
    </sv:node>
    <sv:node sv:name="--vaadin-static-content--">
      <sv:property sv:name="jcr:primaryType" sv:type="Name">
        <sv:value>mgnl:contentNode</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:mixinTypes" sv:type="Name">
        <sv:value>mix:lockable</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:uuid" sv:type="String">
        <sv:value>dd7b7d3a-e33a-4ee5-8bdd-a139d63ddb44</sv:value>
      </sv:property>
      <sv:property sv:name="pattern" sv:type="String">
        <sv:value>/VAADIN/*</sv:value>
      </sv:property>
      <sv:node sv:name="MetaData">
        <sv:property sv:name="jcr:primaryType" sv:type="Name">
          <sv:value>mgnl:metaData</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:activated" sv:type="Boolean">
          <sv:value>false</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:authorid" sv:type="String">
          <sv:value>superuser</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:creationdate" sv:type="Date">
          <sv:value>2010-09-03T16:57:00.468+02:00</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
          <sv:value>2010-09-28T15:55:40.406+02:00</sv:value>
        </sv:property>
      </sv:node>
    </sv:node>
  </sv:node>
  <sv:node sv:name="parameters">
    <sv:property sv:name="jcr:primaryType" sv:type="Name">
      <sv:value>mgnl:contentNode</sv:value>
    </sv:property>
    <sv:property sv:name="jcr:mixinTypes" sv:type="Name">
      <sv:value>mix:lockable</sv:value>
    </sv:property>
    <sv:property sv:name="jcr:uuid" sv:type="String">
      <sv:value>071391f4-3881-4620-ab52-ae644e674bfe</sv:value>
    </sv:property>
    <sv:property sv:name="application" sv:type="String">
      <sv:value>nl.vpro.magnolia.module.guiScript.GuiScriptVaadinApplication</sv:value>
    </sv:property>
    <sv:node sv:name="MetaData">
      <sv:property sv:name="jcr:primaryType" sv:type="Name">
        <sv:value>mgnl:metaData</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:activated" sv:type="Boolean">
        <sv:value>false</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:authorid" sv:type="String">
        <sv:value>superuser</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:creationdate" sv:type="Date">
        <sv:value>2010-09-03T16:57:00.469+02:00</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
        <sv:value>2010-09-27T16:16:02.044+02:00</sv:value>
      </sv:property>
    </sv:node>
  </sv:node>
</sv:node>

Reply via email to