欢迎使用普元产品知识库,本知识库包含普元应用开发平台EOSPlatform,流程平台BPS,企业服务总线ESB,微服务平台Microservice,运维管理平台Devops,数据集成平台DI

页面树结构

欢迎使用普元文档库

Skip to end of metadata
Go to start of metadata

【需求】

Platform 7.6 自行扩展了一个jsp控件,需要把控件添加到jsp页面编辑器里(如下图),实现和产品自带的控件效果一样,每个jsp页面都可从Palette面板里拖拽控件,生成代码

【方案】

方案描述详见:Jsp编辑器可拖拽控件扩展实现完整版.docx 

方案中涉及的文件:方案所需文件.zip

关键点说明:test.vm是自定义页面控件的示例模板,拖动生成的控件,会生成一个按钮控件,若项目中有其他需求,请自行扩展.vm文件

test.vm实现:

<a  class="nui-button" onclick="" iconCls="icon-edit">     Button </a>

方案效果:拖动自定义的SLOF1控件,生成了一个Button按钮

 

附:使用方案过程中遇到的问题:

1、本地环境,在“8、测试”,打开调试studio时,开发控件的studio控制台出现了如下异常:

!ENTRY org.eclipse.ui.workbench 4 2 2018-01-05 14:50:41.560
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object
 at org.eclipse.core.internal.registry.RegistryObjectManager.basicGetObject(RegistryObjectManager.java:273)
 at org.eclipse.core.internal.registry.RegistryObjectManager.getObject(RegistryObjectManager.java:263)
 at org.eclipse.core.internal.registry.ConfigurationElementHandle.getConfigurationElement(ConfigurationElementHandle.java:26)
 at org.eclipse.core.internal.registry.ConfigurationElementHandle.getAttribute(ConfigurationElementHandle.java:34)

分析:后经测试,没有影响自定义控件的使用