On 7/11/11 2:57 PM, "Jasha Joachimsthal" <[email protected]> wrote:
>On 11 July 2011 20:17, Franklin, Matthew B. <[email protected]> wrote: > >> On 6/30/11 10:26 AM, "[email protected]" <[email protected]> wrote: >> >> >Author: jasha >> >Date: Thu Jun 30 14:26:19 2011 >> >New Revision: 1141550 >> > >> >URL: http://svn.apache.org/viewvc?rev=1141550&view=rev >> >Log: >> >RAVE-45 Portal host/ip configuration (Non-localhost support) >> > >> >Added: >> > >> >>>incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/ut >>>il >> >/OpenSocialEnvironment.java >> >> I just noticed that this got placed in the org.apache.rave.portal.util. >> If we want to continue down the path of having a modular widget provider >> model, I would recommend not adding provider specific implementations to >> the org.apache.rave.x packages. I would recommend moving it to >> org.apache.rave.opensocial.x and creating either a tag that renders all >> the widget provider specific script includes, or start looking at a >> lifecycle that we can hook in the widget providers to do the same. This >> would leave our view implementations generic and not tied to a >>particular >> set of widget providers. >> > >Good point. I'll move it to o.a.rave.provider.opensocial.x (x being util >or >config?). That makes me think we will probably need something like header >contributions like in Apache Wicket [1] to insert scripts & css based on >deeper level blocks on the page (i.e. only if there is some OpenSocial I think having a similar bean that manages what gets written out to the section where we are putting the scripts at the bottom would probably work. We can then autowire it into anything that needs to add a script section and create a tag that just iterates the list of registered blocks. This would also allow us to move the call to the render-widget tag back up to the first loop in the JSP. Having that call in that loop will be important when we start to inline widgets. The opensocial widget renderer could just add a new script block for every widget to be rendered by common container at the bottom of the page, without having to iterate twice. The only problem with this is order... We will need to have some way of ensuring that dependencies are registered before the script block that uses them. >gadget, then include the OpenSocial scripts). At this moment we're still >using a single controller for the whole page so it will be included anyway >but we can't solve all issues at the same time. > >[1] >http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-wi >th-behaviors/ > > >Jasha
