private CmsContextMenuEntry createMenuEntryForTemplateContext(
        final String cookieName,
        final String value,
        String label,
        boolean isActive,
        I_CmsContextMenuHandler handler,
        CmsUUID structureId) {

        CmsContextMenuEntry menuEntry = new CmsContextMenuEntry(handler, structureId, new I_CmsContextMenuCommand() {

            public void execute(
                CmsUUID innerStructureId,
                I_CmsContextMenuHandler innerHandler,
                CmsContextMenuEntryBean bean) {

                changeTemplateContextManually(cookieName, value);
            }

            public A_CmsContextMenuItem getItemWidget(
                CmsUUID innerStructureId,
                I_CmsContextMenuHandler innerHandler,
                CmsContextMenuEntryBean bean) {

                return null;
            }

            public boolean hasItemWidget() {

                return false;
            }
        });
        CmsContextMenuEntryBean bean = new CmsContextMenuEntryBean();
        bean.setLabel(label);

        I_CmsInputCss inputCss = I_CmsInputLayoutBundle.INSTANCE.inputCss();
        bean.setIconClass(isActive ? inputCss.checkBoxImageChecked() : "");
        bean.setActive(true);
        bean.setVisible(true);
        menuEntry.setBean(bean);
        return menuEntry;

    }
private CmsContextMenuEntry createMenuEntryForTemplateContext ( final String cookieName , final String value , String label , boolean isActive , I_CmsContextMenuHandler handler , CmsUUID structureId ) { CmsContextMenuEntry menuEntry = new CmsContextMenuEntry ( handler , structureId , new I_CmsContextMenuCommand ( ) { public void execute ( CmsUUID innerStructureId , I_CmsContextMenuHandler innerHandler , CmsContextMenuEntryBean bean ) { changeTemplateContextManually ( cookieName , value ) ; } public A_CmsContextMenuItem getItemWidget ( CmsUUID innerStructureId , I_CmsContextMenuHandler innerHandler , CmsContextMenuEntryBean bean ) { return null ; } public boolean hasItemWidget ( ) { return false ; } } ) ; CmsContextMenuEntryBean bean = new CmsContextMenuEntryBean ( ) ; bean . setLabel ( label ) ; I_CmsInputCss inputCss = I_CmsInputLayoutBundle . INSTANCE . inputCss ( ) ; bean . setIconClass ( isActive ? inputCss . checkBoxImageChecked ( ) : "" ) ; bean . setActive ( true ) ; bean . setVisible ( true ) ; menuEntry . setBean ( bean ) ; return menuEntry ; }
Creates a context menu entry for selecting a template context.<p>

@param cookieName the name of the cookie
@param value the value of the cookie
@param label the text for the menu entry
@param isActive true if context is currently active
@param handler the context menu handler
@param structureId the current page's structure id

@return the created context menu entry