Aaron Evans wrote:
David,
I will take a look at that example for sure, however, I don't use
velocity in my portlets, so I'll have to figure out exactly what needs
doing for a portlet in general in order to join in the "doHeader"
phase.
This solution could be better designed to work with JSP or any other
dispatched template. In fact, I think it should be refactored and more
formalized to a complete doHeader phase in the portal itself.
I look at this as a prototype we came up with for a need. Now we need to
refine the solution and align it with the upcoming standard.
One question I have though is how we prevent multiple portlets from
including the same resources multiple times? (Eg. if 5 portlets in
the page all need dojo.js, then how do we prevent it from being
needlessly included 5 times).
The AbstractDojoVelocityPortlet uses the HeaderResource component to
ensure that any header resources added via addHeaderInfo or
addJavaScript or addStyleSheet are unique.
Perhaps this will become obvious when I look at the example, in which
case, disregard the question.
I use dojo heavily though, so I'm sure when I upgrade to 2.1, I'll
have a few things to figure out...
On 7/17/06, David Sean Taylor <[EMAIL PROTECTED]> wrote:
Hans Brattberg wrote:
> Hi!
> I'm struggeling trying to have a dynamic tree structure in a portlet.
> And I am realy not sure if I'm walking the rigth path.
>
> Is there anyone out there that has succeded in putting a tree structure
> in a portlet?
> What techs did u use?
>
> /Hans
>
Dojo also has a tree widget
You can use Dojo in any portlet running in Jetspeed, either in /desktop
or /portlet. Take a look at the SecurityPermissionsPortlet.java for an
example of how to do this (and its vm, view.vm)
Important:
SecurityPermissionsPortlet extends AbstractDojoVelocityPortlet
You will need to extend AbstractDojoVelocityPortlet (just add a dep to
the jetspeed-gems jar)
This is necessary to join in the "doHeader" phase of the portlet request
cycle. Currently there are two cycles for a portlet request:
1. action
2. render
With JSR-286, there will be 3 phases:
1. header
2. action
3. render
The AbstractDojoVelocityPortlet handles the header phase
There are two methods to override for your dojo imports:
1. includeDojoRequires
2. includeDojoWidgetRequires
See the SecurityPermissionPortlet for examples of including in dojo
imports into the <head> area
All of this will get sorted out with the new spec
I really don't like that we have to include dojo imports via java
It would be much better via a vm or jsp file
But, this is where its at right now...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
David Sean Taylor
Bluesunrise Software
[EMAIL PROTECTED]
[office] +01 707 773-4646
[mobile] +01 707 529 9194
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]