Package org.vfny.geoserver.form.data

Examples of org.vfny.geoserver.form.data.DataDataStoresSelectForm


public class DataDataStoresSelectAction extends ConfigAction {
    public ActionForward execute(ActionMapping mapping,
        ActionForm incomingForm, UserContainer user, HttpServletRequest request,
        HttpServletResponse response) throws IOException, ServletException {

        DataDataStoresSelectForm form = (DataDataStoresSelectForm) incomingForm;

        String buttonAction = form.getButtonAction();

        DataConfig dataConfig = (DataConfig) getDataConfig();
        DataStoreConfig dsConfig = null;
       
        Locale locale = (Locale) request.getLocale();
        MessageResources messages = servlet.getResources();

        String editLabel = messages.getMessage(locale, "label.edit");
        String deleteLabel = messages.getMessage(locale, "label.delete");

    if (editLabel.equals(buttonAction)) {
            dsConfig = (DataStoreConfig) dataConfig.getDataStore(form
                    .getSelectedDataStoreId());
          
            getUserContainer(request).setDataStoreConfig(dsConfig);

            return mapping.findForward("config.data.store.editor");
        } else if (deleteLabel.equals(buttonAction)) {
            dataConfig.removeDataStore(form.getSelectedDataStoreId());
            getUserContainer(request).setDataStoreConfig(null);

            form.reset(mapping, request);

            return mapping.findForward("config.data.store");
        }
       
        throw new ServletException(
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.form.data.DataDataStoresSelectForm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.