⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fieldforms.java

📁 java 写的一个新闻发布系统
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
        html += "</td></tr>\n";        html += "<tr><td width\"20%\" valign=\"top\">\n";        html += "<input type=\"radio\" name=\"connect\" value=\"" + ConnectionTypes.DATASOURCE + "\" ";        if (theField.getConnectType() == ConnectionTypes.DATASOURCE) { html += "checked"; }        html += "></td><td width=\"80%\">\n";        html += "<input type=\"button\" value=\"Choose...\" ";        String selectDsUrl = SelectDataSource_Engine.getInstance().renderLink( jParams, theField );        html += "onClick=\"OpenJahiaWindow('" + selectDsUrl + "','selectdatasource',500,350)\">";        if (theField.getID() != 0) {            html += "<input type=\"button\" value=\"View ID\" ";            String viewIDUrl = ViewDataSourceID_Engine.getInstance().renderLink( jParams, theField );            html += "onClick=\"OpenJahiaWindow('" + viewIDUrl + "','viewdatasourceid',500,150)\">";        }        html += "<br><br>\n</td></tr></table></center>\n";        return html;    } // end drawBigtextForm    /***        * drawPageForm        * EV    10.09.2001        *        */    public String drawPageForm( ParamBean jParams, JahiaField theField, String fieldValue )    throws JahiaException    {        String html = "";        html += "<script language=\"javascript\" ";        html += "src=\"" + jParams.settings().getJsHttpPath() + "\"></script>";        html += "<center><table border=\"0\" width=\"90%\"><tr>\n";        html += "<td width=\"100%\" colspan=\"2\" bgcolor=\"#333333\">\n";        html += "<font face=\"arial\" size=\"2\">Enter page title :</font>\n";        html += "</td></tr>\n";        html += "<tr><td width\"10%\" valign=\"top\">&nbsp;</td>\n";        html += "<td width=\"80%\">";        html += "Page title : <input type=\"text\" name=\"fid" + theField.getID() + "\" size=\"20\" maxlength=\"250\"><br>\n";        html += "<br><br>\n</td></tr>\n";        html += "<td width=\"100%\" colspan=\"2\" bgcolor=\"#333333\">\n";        html += "<font face=\"arial\" size=\"2\">Enter template :</font>\n";        html += "</td></tr>\n";        html += "<tr><td width\"10%\" valign=\"top\">&nbsp;</td>\n";        html += "<td width=\"80%\">";        html += "Page template : <select name=\"templateid\">\n";        Enumeration templateList = ServicesRegistry.getInstance().getJahiaPageTemplateService().                getPageTemplates (jParams.getPage().getJahiaID(), true); //show only visible templates        while (templateList.hasMoreElements()) {            JahiaPageDefinition theTemplate = (JahiaPageDefinition) templateList.nextElement();            html += "<option value=\"" + theTemplate.getID() + "\"> " + theTemplate.getName() + "</option>\n";        }        html += "</select><br>\n";        if (DownloadTemplate_Engine.getInstance().authoriseRender(jParams)) {            html += "<p align=\"right\">";            html += "<input type=\"button\" value=\"Download...\" ";            String url = DownloadTemplate_Engine.getInstance().renderLink( jParams, null );            html += "onClick=\"OpenJahiaWindow('" + url + "','downloadtemplate',500,350)\">";            html += "</p>";        }        html += "</td></tr></table>\n";        return html;    } // end drawPageForm    /***        * drawApplicationForm        * EV    29.11.2000        *        */    public String drawApplicationForm( ParamBean jParams, JahiaField theField, String fieldValue )    throws JahiaException    {        int appID;        try {            appID = Integer.parseInt( (String)theField.getObject() );        } catch (NumberFormatException nfe) {            appID = -1;        }        String html = "";        Vector appList = ServicesRegistry.getInstance().getJahiaApplicationsPersistanceService(                            ).get_applications_list( jParams.getPage().getJahiaID() , true);        html += "<script language=\"javascript\" ";        html += "src=\"" + jParams.settings().getJsHttpPath() + "\"></script>";        html += "<center><table border=\"0\" width=\"90%\"><tr>\n";        html += "<td width=\"100%\" colspan=\"2\" bgcolor=\"#333333\">\n";        html += "<font face=\"arial\" size=\"2\">Enter data manually</font>\n";        html += "</td></tr>\n";        html += "<tr><td width\"20%\" valign=\"top\">\n";        html += "<input type=\"radio\" name=\"connect\" value=\"" + ConnectionTypes.LOCAL + "\" ";        if (theField.getConnectType() == ConnectionTypes.LOCAL) { html += "checked"; }        html += "></td>\n<td width=\"80%\">\n";        if (theField.getConnectType() == ConnectionTypes.LOCAL)        {            html += "<select name=\"fid" + theField.getID() + "\" size=\"3\">\n";            for (int i=0; i < appList.size(); i++) {                ApplicationBean appBean = (ApplicationBean) appList.elementAt(i);                html += "<option value=\"" + appBean.getID() + "\" ";                if ((appID == appBean.getID()) || ((appID == -1) && (i == 0))) {                    html += "selected";                }                html += "> " + appBean.getName() + "\n";            }            html += "</select>\n";        } else {            html += "- Manual input desactivated -<br>";            html += "<input type=\"button\" value=\"Activate\" onClick=\"ReloadEngine('localswitch" + EngineParams.VALUE_TOKEN + "yes');\">";        }        html += "<br><br>\n</td></tr>\n";        html += "<td width=\"100%\" colspan=\"2\" bgcolor=\"#333333\">\n";        html += "<font face=\"arial\" size=\"2\">Connect to DataSource</font>\n";        html += "</td></tr>\n";        html += "<tr><td width\"20%\" valign=\"top\">\n";        html += "<input type=\"radio\" name=\"connect\" value=\"" + ConnectionTypes.DATASOURCE + "\" ";        if (theField.getConnectType() == ConnectionTypes.DATASOURCE) { html += "checked"; }        html += "></td><td width=\"80%\">\n";        html += "<input type=\"button\" value=\"Choose...\" ";        String selectDsUrl = SelectDataSource_Engine.getInstance().renderLink( jParams, theField );        html += "onClick=\"OpenJahiaWindow('" + selectDsUrl + "','selectdatasource',500,350)\">";        if (theField.getID() != 0) {            html += "<input type=\"button\" value=\"View ID\" ";            String viewIDUrl = ViewDataSourceID_Engine.getInstance().renderLink( jParams, theField );            html += "onClick=\"OpenJahiaWindow('" + viewIDUrl + "','viewdatasourceid',500,150)\">";        }        html += "<br><br>\n</td></tr></table></center>\n";        return html;    } // end drawApplicationForm    /***        * drawFileSelectorForm         * NK    04.01.2001        *        */    public String drawFileSelectorForm( ParamBean jParams, JahiaField theField, String fieldValue )    throws JahiaException    {        int appID;        try {            appID = Integer.parseInt( (String)theField.getObject() );        } catch (NumberFormatException nfe) {            appID = -1;        }        String html = "";        Vector appList = ServicesRegistry.getInstance().getJahiaApplicationsPersistanceService(                            ).get_applications_list( jParams.getPage().getJahiaID() , true);        html += "<script language=\"javascript\" ";        html += "src=\"" + jParams.settings().getJsHttpPath() + "\"></script>";        html += "<center><table border=\"0\" width=\"90%\"><tr>\n";        html += "<td width=\"100%\" colspan=\"2\" bgcolor=\"#333333\">\n";        html += "<font face=\"arial\" size=\"2\">Enter data manually</font>\n";        html += "</td></tr>\n";        html += "<tr><td width\"20%\" valign=\"top\">\n";        html += "<input type=\"radio\" name=\"connect\" value=\"" + ConnectionTypes.LOCAL + "\" ";        if (theField.getConnectType() == ConnectionTypes.LOCAL) { html += "checked"; }        html += "></td>\n<td width=\"80%\">\n";        if (theField.getConnectType() == ConnectionTypes.LOCAL)        {            html += "<select name=\"fid" + theField.getID() + "\" size=\"3\">\n";            for (int i=0; i < appList.size(); i++) {                ApplicationBean appBean = (ApplicationBean) appList.elementAt(i);                html += "<option value=\"" + appBean.getID() + "\" ";                if ((appID == appBean.getID()) || ((appID == -1) && (i == 0))) {                    html += "selected";                }                html += "> " + appBean.getName() + "\n";            }            html += "</select>\n";        } else {            html += "- Manual input desactivated -<br>";            html += "<input type=\"button\" value=\"Activate\" onClick=\"ReloadEngine('localswitch" + EngineParams.VALUE_TOKEN + "yes');\">";        }        html += "<br><br>\n</td></tr>\n";        html += "<td width=\"100%\" colspan=\"2\" bgcolor=\"#333333\">\n";        html += "<font face=\"arial\" size=\"2\">Connect to DataSource</font>\n";        html += "</td></tr>\n";        html += "<tr><td width\"20%\" valign=\"top\">\n";        html += "<input type=\"radio\" name=\"connect\" value=\"" + ConnectionTypes.DATASOURCE + "\" ";        if (theField.getConnectType() == ConnectionTypes.DATASOURCE) { html += "checked"; }        html += "></td><td width=\"80%\">\n";        html += "<input type=\"button\" value=\"Choose...\" ";        String selectDsUrl = SelectDataSource_Engine.getInstance().renderLink( jParams, theField );        html += "onClick=\"OpenJahiaWindow('" + selectDsUrl + "','selectdatasource',500,350)\">";        if (theField.getID() != 0) {            html += "<input type=\"button\" value=\"View ID\" ";            String viewIDUrl = ViewDataSourceID_Engine.getInstance().renderLink( jParams, theField );            html += "onClick=\"OpenJahiaWindow('" + viewIDUrl + "','viewdatasourceid',500,150)\">";        }        html += "<br><br>\n</td></tr></table></center>\n";        return html;    } // end drawFileSelectorForm} // end FieldForms

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -