public void actionMoveElement() throws JspException {

        // set editor values from request
        try {
            setEditorValues(getElementLocale());
        } catch (CmsXmlException e) {
            // an error occurred while trying to set the values, stop action
            showErrorPage(e);
            return;
        }
        // get the necessary parameters to move the element
        int index = 0;
        try {
            index = Integer.parseInt(getParamElementIndex());
        } catch (Exception e) {
            // ignore, should not happen
        }

        // get the value to move
        I_CmsXmlContentValue value = m_content.getValue(getParamElementName(), getElementLocale(), index);

        if (getAction() == ACTION_ELEMENT_MOVE_DOWN) {
            // move down the value
            value.moveDown();
        } else {
            // move up the value
            value.moveUp();
        }
        if (getValidationHandler().hasWarnings(getElementLocale())) {
            // there were warnings for the edited content, reset validation handler to avoid display issues
            resetErrorHandler();
        }
        try {
            // write the modified content to the temporary file
            writeContent();
        } catch (CmsException e) {
            // an error occurred while trying to save
            showErrorPage(e);
        }
    }
public void actionMoveElement ( ) throws JspException { try { setEditorValues ( getElementLocale ( ) ) ; } catch ( CmsXmlException e ) { showErrorPage ( e ) ; return ; } int index = 0 ; try { index = Integer . parseInt ( getParamElementIndex ( ) ) ; } catch ( Exception e ) { } I_CmsXmlContentValue value = m_content . getValue ( getParamElementName ( ) , getElementLocale ( ) , index ) ; if ( getAction ( ) == ACTION_ELEMENT_MOVE_DOWN ) { value . moveDown ( ) ; } else { value . moveUp ( ) ; } if ( getValidationHandler ( ) . hasWarnings ( getElementLocale ( ) ) ) { resetErrorHandler ( ) ; } try { writeContent ( ) ; } catch ( CmsException e ) { showErrorPage ( e ) ; } }
Moves an element in the xml content either up or down.<p>

Depends on the given action value.<p>

@throws JspException if including the error page fails