Examples of HelpForm


Examples of com.adito.navigation.forms.HelpForm

     *      javax.servlet.http.HttpServletResponse)
     */
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
                    HttpServletResponse response) throws Exception {
        String source = request.getParameter("source");
        HelpForm helpForm = (HelpForm)form;
        if(source == null) {
            throw new Exception("Help action requires a source parameter.");
        }
        if(source.equalsIgnoreCase("property")) {
            String name = request.getParameter("name");
            if(name == null) {
                throw new Exception("Help for property source requires a name parameter.");
            }
            String propertyClassName = request.getParameter("propertyClass");
            if(propertyClassName == null) {
                throw new Exception("Help for property source requires a propertyClass parameter.");
            }
            PropertyClass propertyClass = PropertyClassManager.getInstance().getPropertyClass(propertyClassName);
            if(propertyClass == null) {
                throw new Exception("Invalid property class.");
            }
            PropertyDefinition def = propertyClass.getDefinition(name);
            if(def == null) {
                throw new Exception("No property definition with name of " + name);
            }
            else{
                // set the label and description from the messages resources if they have any.
                // If there are Application resources for the definition then set the label and description
                String label = CoreUtil.getMessage(request, def.getMessageResourcesKey(), def.getNameMessageResourceKey());
                if (label != null){
                    def.setLabel(label);
                }
//                String description = messageResources == null ? null : messageResources.getMessage(def.getDescriptionMessageResourceKey());
                String description = CoreUtil.getMessage(request, def.getMessageResourcesKey(), def.getDescriptionMessageResourceKey());
                if (description != null){
                    def.setDescription(description);
                }
            }
            request.setAttribute(Constants.REQ_ATTR_PROPERTY_DEFINITION, def);
            return mapping.findForward("property");
        }
        else if(source.equalsIgnoreCase("help")) {
            // load the documentation context menu
            SessionInfo info = LogonControllerFactory.getInstance().getSessionInfo(request);
            helpForm.setMenu(NavigationManager.getMenuTree(CoreMenuTree.MENU_ITEM_MENU_TREE).rebuildMenus(SessionInfo.HELP_CONTEXT,
                info,
                request,
                Util.getOriginalRequest(request)));
            return mapping.findForward("help");
        }
View Full Code Here

Examples of com.substanceofcode.rssreader.presentation.HelpForm

        if(m_getHelp) {
      m_getHelp = false;
      try {
        /* Loading help... */
        m_midlet.initializeLoadingFormRsc("text.l.h", this);
        final HelpForm helpForm = new HelpForm(m_midlet, this);
        helpForm.appendRsc("text.set.help");
        helpForm.appendItemHelpRsc(m_useTextBox, "text.stxt.help");
        //#ifdef DMIDP20
        helpForm.appendItemHelpRsc(m_pageEnabled, "text.spg.help");
        helpForm.appendItemHelpRsc(m_fontSize, "text.sfs.help");
        //#endif
        m_midlet.setCurrent(helpForm);
            } catch(Throwable e) {
        /* Internal error.:\n */
        m_midlet.recordExcFormFinRsc("exc.int.err", e);
View Full Code Here

Examples of com.substanceofcode.rssreader.presentation.HelpForm

          (Item)pageImpl,
          midlet);
      pform.createGauge(Common.PAGE_POS_ACTUAL, view.getPercPosition());
    //#ifdef DTEST
    } else if (aCmd == cmdInfo) {
      final HelpForm helpForm = new HelpForm(midlet, (Item)pageImpl);
      helpForm.append("lastWidth=" + lastWidth + "\n");
      helpForm.append("lastHeight=" + lastHeight + "\n");
      helpForm.append("labelPageHeight=" + labelPageHeight + "\n");
      helpForm.append("mainPageHeight=" + mainPageHeight + "\n");
      helpForm.append("prefViewHeight=" + prefViewHeight + "\n");
      helpForm.append("viewScrollBar=" + viewScrollBar + "\n");
      helpForm.append("initialized=" + initialized + "\n");
      helpForm.append("resize=" + resize + "\n");
      helpForm.append("paintDone=" + paintDone + "\n");
      helpForm.append("RenderedWord.heightFont=" + RenderedWord.heightFont + "\n");
      helpForm.append("label=" + label + "\n");
      helpForm.append("page=" + (page != null) + "\n");
      helpForm.append("text=" + (text != null) + "\n");
      helpForm.append("view=" + view.getClass().getName() + "\n");
      if (view instanceof HtmlView) {
        HtmlView hview = (HtmlView)view;
        int hvlen = hview.getRenderedWordsLen();
        helpForm.append("hview.getRenderedWordsLen()=" + hvlen + "\n");
      } else if (view instanceof View) {
        View vview = (View)view;
        int vvlen = vview.getScreenSize();
        helpForm.append("vview.getScreenSize()=" + vvlen + "\n");
      }
      helpForm.append("messageFont.getHeight()=" + messageFont.getHeight() + "\n");
      display.setCurrent(helpForm);
    //#endif
    } else if (aCmd == cmdHelp) {
      final HelpForm helpForm = new HelpForm(midlet, (Item)pageImpl);
      /*Press \1 to go back to the previous screen. */
      appendKeyHelp(helpForm, BACK_ACTION, Common.TEXT_B_KEY);
      /*Press \1 to go to open the link. */
      appendKeyHelp(helpForm, SELECT_ACTION, Common.TEXT_SEL_KEY);
      if (!scrollThread.canRun()) {
View Full Code Here

Examples of com.substanceofcode.rssreader.presentation.HelpForm

        //#ifndef DSMALLMEM
        else if (m_getHelp) {
          m_getHelp = false;
          m_midlet.initializeLoadingFormRsc("text.l.h", this);
          m_midlet.setCurrent( m_loadForm );
          final HelpForm helpForm = new HelpForm(m_midlet, this);
          helpForm.appendRsc("text.abmc.help");
          helpForm.appendItemHelpRsc(m_importOvrGroup, "text.oimp.help");
          helpForm.appendItemHelpRsc(m_importFormatGroup,
              "text.fimp.help");
          helpForm.appendCmdHelpRsc(m_importAddCmd, "text.aimp.help");
          helpForm.appendCmdHelpRsc(m_importAppndCmd, "text.pimp.help");
          m_midlet.setCurrent( helpForm );
        }
        //#endif

        lngStart = System.currentTimeMillis();
View Full Code Here

Examples of com.substanceofcode.rssreader.presentation.HelpForm

      PositionForm pform = new PositionForm("page.pos.head", view,
          (Item)pageImpl,
          midlet);
      pform.createGauge("page.pos.actual", view.getPercPosition());
    } else if (aCmd == cmdHelp) {
      final HelpForm helpForm = new HelpForm(midlet, (Item)pageImpl);
      appendKeyHelp(helpForm, Canvas.GAME_D, "text.b.key");
      if (!scrollThread.canRun()) {
        /* Page forward. */
        appendKeyHelp(helpForm, Canvas.DOWN, "text.pf.key");
        /* Page backward. */
 
View Full Code Here

Examples of com.substanceofcode.rssreader.presentation.HelpForm

        //#ifndef DSMALLMEM
        else if (m_getHelp) {
          m_getHelp = false;
          m_midlet.initializeLoadingFormRsc("text.l.h", this);
          m_midlet.setCurrent( m_loadForm );
          final HelpForm helpForm = new HelpForm(m_midlet, this);
          helpForm.appendRsc("text.abmc.help");
          helpForm.appendItemHelpRsc(m_importOvrGroup, "text.oimp.help");
          helpForm.appendItemHelpRsc(m_importFormatGroup,
              "text.fimp.help");
          helpForm.appendCmdHelpRsc(m_importAddCmd, "text.aimp.help");
          helpForm.appendCmdHelpRsc(m_importAppndCmd, "text.pimp.help");
          m_midlet.setCurrent( helpForm );
        }
        //#endif

        lngStart = System.currentTimeMillis();
View Full Code Here

Examples of com.substanceofcode.rssreader.presentation.HelpForm

        if(m_getHelp) {
      m_getHelp = false;
      try {
        /* Loading help... */
        m_midlet.initializeLoadingFormRsc("text.l.h", this);
        final HelpForm helpForm = new HelpForm(m_midlet, this);
        helpForm.appendRsc("text.set.help");
        helpForm.appendItemHelpRsc(m_useTextBox, "text.stxt.help");
        //#ifdef DMIDP20
        helpForm.appendItemHelpRsc(m_pageEnabled, "text.spg.help");
        helpForm.appendItemHelpRsc(m_fontSize, "text.sfs.help");
        //#endif
        m_midlet.setCurrent(helpForm);
            } catch(Throwable e) {
        /* Internal error.:\n */
        m_midlet.recordExcFormFinRsc("exc.int.err", e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.