For anyone interested: I've got the struts mailreader demo basically running
as a portlet in J2.
Form processing, action error handling and even logon/logoff is working now.

But, I've encountered a strange effect when viewing the tour page of the
example (which is plain html).
When I navigate to the tour page I get it displayed ABOVE my portlet (any
portlet that is on the page).
Once,  I even got my portlet window mixed in within the tour page html
content: the first part of the tour html content was rendered above my
portlet, the remainder of the content was correctly rendered within the
window.
Very strange.
Possibly this is a side-effect of the custom request wrapping I do for my
struts portlet but I really haven't a clue. Maybe someone with more
knowledge of the rendering side has a hint?

Another issue I encountered is that the deployer won't allow me to include a
doctype in the web.xml of my portlets but now that I defined taglibs Tomcat
won't load it without it.
So after a clean deployment I have to manually add the doctype in the
web.xml before starting Tomcat again (Tomcat 4.1.29).
Anyone with knowledge of the deployer who can help me out here (just a hint
what to fix/where to look would be great; I haven't much time to delve into
that one myself right now).

The Struts Portlet framework is certainly not finished yet and I will have
to do a few things more before I'm ready for a first submit but it sure looks
promising now.

I also don't know yet how I should submit this package. I like to submit it at least
for review to you jetspeed-2 guys. If or when its acceptable for general use within 
jetspeed I  like to hand it over to jetspeed under the apache license (splitting it 
into
two packages: one for jetspeed-2, one for struts seems to be a lot more work and
could be done later on if needed right?).
For all this I would like some pointers how to proceed: whom should I submit it to,
what copyright statement should I put in (should be apache in the end but during
review maybe not yet), how should I package it, etc.
Any help/info is much appreciated.

A last note for David Sean Taylor:
I've noticed you just checked in several changes for PortletURL and
NavigationState processing (haven't checked them out yet, just looked at the
cvs logs).
To get my portlet framework running I needed access to the renderparameters
on the RenderRequest which is currently not yet working. 
To get  it working I modified
o.a.j.engine.servlet.ServletRequestImpl.getParameterMap() as follows:

    public Map getParameterMap() {
        //get control params
        if (portletParameters == null) {

            portletParameters = new HashMap();

            JetspeedRequestContext context = (JetspeedRequestContext)
                  getAttribute("org.apache.jetspeed.request.RequestContext");
            if (context != null) {
                NavigationalState navState = context.getNavigationalState();
                Iterator iter = navState.getRenderParamNames(portletWindow);
                while (iter.hasNext()) {
                    String name = (String) iter.next();
                    String[] values = navState.getRenderParamValues(
                            portletWindow, name);
                    portletParameters.put(name, values);

                }
            }

            //get request params
            for (Enumeration parameters = super.getParameterNames(); 
                parameters.hasMoreElements();) {
                String paramName = (String) parameters.nextElement();
                String[] paramValues = (String[]) super
                        .getParameterValues(paramName);
                String[] values = (String[]) portletParameters.get(paramName);

                if (values != null) {
                    String[] temp = new String[paramValues.length
                            + values.length];
                    System.arraycopy(paramValues, 0, temp, 0,
                            paramValues.length);
                    System.arraycopy(values, 0, temp, paramValues.length,
                            values.length);
                    paramValues = temp;
                }
                portletParameters.put(paramName, paramValues);
            }
        }

        return Collections.unmodifiableMap(portletParameters);
        // return Collections.unmodifiableMap(super.getParameterMap().keySet());
    }

I don't know if this temporary hack is anywhere near what you had in mind
but it does the trick for me right now.

Thanks, Ate


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to