I just committed a means to keep the namespace synchronized with the 
workspace anytime the workspace changes.

It uses an ajax call to update the namespace drop down, and the 
namespace dropdown is disabled to void manual changes.
The odd thing is the "onchange" event for the workspace dropdown doesn't 
seem to be triggered if you select a different workspace with the 
up/down arrow keys instead of using the mouse...

any idea what event should I listen for to cover that case?

code is something like:
wsDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange") {
             private static final long serialVersionUID = 1L;

             @Override
             protected void onUpdate(AjaxRequestTarget target) {
                 WorkspaceInfo ws = (WorkspaceInfo) 
wsDropDown.getModelObject();
                 String prefix = ws.getName();
                 NamespaceInfo namespaceInfo = 
getCatalog().getNamespaceByPrefix(prefix);
                 IModel nsModel = new Model(namespaceInfo);
                 DropDownChoice nsDropDown = 
namespacePanel.getFormComponent();
                 nsDropDown.setModel(nsModel);
                 target.addComponent(nsDropDown);
             }
         });

Gabriel Roldan wrote:
>> - http://jira.codehaus.org/browse/GEOS-3149, groldan
>>    Ensuring namespace param always in sync with workspace
> I'm putting hands on right away. Gonna report back when it's ready.
> 
> 


-- 
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to