portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 5688] - Clicking "Close" on portlet means portlet is lost for good
Date Thu, 10 Jan 2002 13:40:38 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5688>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5688

Clicking "Close" on portlet means portlet is lost for good





------- Additional Comments From kimptoc_mail@yahoo.com  2002-01-10 05:40 -------
The PortletConfig.getPosition always seems to return -1, is this the correct 
method to call.

The code in BasePortletSet generally adds the portlet with position -1, unless 
it is specified.  This is the underlying method, with my proposed mod to ensure 
that the position always has a value..

    /**
    Add a portlet to this set.It updates its config to modify the current set
    */
    public void addPortlet(Portlet portlet, PortletSet.Constraints constraints, 
int position)
    {
        Log.info("BasePortletSet::addPortlet, position = "+position);
        synchronized (portlets)
        {
            portlets.addElement(portlet);
            PortletConfig pc=portlet.getPortletConfig();
            if (pc!=null)
            {
                pc.setPortletSet(this);
                if (constraints!=null) pc.setConstraints(constraints);
                if (position >=0)
                {
                    pc.setPosition(position);
                    if (position < portlets.size()-1) this.dirty = true;
                }
                // START OF NEW BIT
                else
                {
                    pc.setPosition(size()-1);
                    this.dirty = true;
                }
                // END OF NEW BIT
            }
        }
    }

Does this sounds reasonable?

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message