I didn't say that the weather portlet was not working.  I can see the local 
weather with it just fine.  But the reason that it works is that the 
processAction methods sets "newZip" in the response parameters and then 
redirects to the view.  The view then uses the "newZip" parameter, and not the 
value from the preferences.  If there is no "newZip" parameter, then the 
weather in Miami shows, which is what is set in portlet.xml.

I have been digging through the code and have come to the conclusion that this 
problem is all related to a configuration setting.  That is, if the portlet is 
configured to treat preferences as read-only, it will ignore all changes.  Code 
in PortletPreferencesImpl.sotre():

if (prefs.isReadOnly() == false)
  | {
  |    PropertyChange[] changes = 
(PropertyChange[])updates.values().toArray(new PropertyChange[updates.size()]);
  |    prefs.update(changes);
  | }

But I have not yet found where the "isReadOnly()" value of "prefs" originates.  
Seems that every class is getting it from somewhere else.  Someone someplace 
must be setting the original value, but I haven't tracked it down yet.

This is not to be confused with the user not having write privileges on the 
preferences, in which case an exception gets thrown when the 
PortletPreferences.setvalue() method is called (such as when you are not logged 
into the portal).

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959369#3959369

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959369
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to