On Tuesday, April 6, 2004, at 03:06 PM, Ate Douma wrote:


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.


I look forward to seeing that!

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.
That doesn't sound good.
Could be a buffering issue...

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).


If you want to look at it see o.a.j.tools.pamanager.DeployUtilities
Otherwise could you log a bug on that, it needs to be fixed

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.


Yes it does sound very promising indeed!

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?).
That sounds fine

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.


Just see any of the source files for the copyright and paste it in.
Best to get the copyright right away.
Send it as a patch to this list. You can create patches against the J2 or Struts CVS head with Eclipse.
As for packaging, if you mean package name, perhaps org.apache.jetspeed.frameworks.struts



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).

Nothing should have changed functionally yet.
Still decoupling the single implementation of URLs and state to make it pluggable


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();

Just replace this with


PortalURL url = context.getPortalURL();
url.getRenderParamNames(...

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.


I'll have a look at it and try to get it committed soon


-- 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]



Reply via email to