Openbravo Smartclient 使用总结(1) - Summary
来源:互联网 发布:意大利脱欧 知乎 编辑:程序博客网 时间:2024/06/07 15:08
- Define a class.
1. You should create your own class by using define class function: isc.ClassFactory.defineClass('className', ParentClass):
isc.ClassFactory.defineClass('SIMF_MassFollowupForm',isc.DynamicForm);
2. Addinitial properties for this new class: addProperties({})
isc.SIMF_MassFollowupForm.addProperties({ numCols: 16, width: '100%', height: '30%', sampleTypeFieldProperties: null, sampleTypeListAddForm: null, //"initWidget()" is a function called when this instance created. initWidget: function() { this.Super("initWidget",arguments); },});
- Register in Openbravo.
For a normal screen, we could to create a layout or form, in which we can create the class we just mentioned in this layout "initWidgt()" function.
1.Create a Java Class extended class "org.openbravo.client.kernel.BaseComponentProvider".
package com.sim.fashion.erpCommon.actionHandler;import java.util.ArrayList;import java.util.Collections;import java.util.List;import java.util.Map;import org.openbravo.client.kernel.BaseComponentProvider;import org.openbravo.client.kernel.Component;public class MassOrderFollowupComponent extends BaseComponentProvider {@Overridepublic Component getComponent(String componentId, Map<String, Object> parameters) {throw new IllegalArgumentException("Component id " + componentId + " not supported.");/* * in this howto we only need to return static resources so there is no * need to return anything here */}@Overridepublic List<ComponentResource> getGlobalComponentResources() {final List<ComponentResource> globalResources = new ArrayList<ComponentResource>();globalResources.add(createStaticResource("web/com.sim.fashion/js/mass-followup-grid.js", false));globalResources.add(createStaticResource("web/com.sim.fashion/js/mass-followup-form.js", false));globalResources.add(createStaticResource("web/com.sim.fashion/js/add-samples-view.js", false));globalResources.add(createStaticResource("web/com.sim.fashion/js/modify-samples-view.js", false));return globalResources;}@Overridepublic List<String> getTestResources() {return Collections.emptyList();}}
After added class, you have to execute command “ant smartbuild” or ”ant compile.complete”
2. Log in as "System Administrator", create a new record in "Application Dictionary|| User Interface|| View Implementation"
图1
Name: className, only the displayed view(Layout or Form) need to create as a view implementation.
3.Create a menu to display:
图2
Action:choose “Open View in MDI”, then “View Implementation” shows.
ViewImplementation: choose the created view implementation you just created.
In Openbravo:
You can use openbravo created class as you want without importing or any reference.
-Openbravo JS Path:
org.openbravo.client.application\web\org.openbravo.client.application\js
-DataSource Path:
org.openbravo.service.datasource\web\org.openbravo.service.datasource\js
- Openbravo Smartclient 使用总结(1) - Summary
- Openbravo SmartClient 使用总结(2) - DataSource
- Smartclient 细节 --小总结
- smartclient 分页总结
- Openbravo
- SmartClient组件使用
- 总结SUMMARY
- 【总结】:summary
- SmartClient
- SmartClient
- 使用SmartClient框架画 界面
- 1.12. 总结(summary)
- 1.11. 总结 - Summary
- Summary Ranges 总结区间
- Summary (1)
- 1 /// <summary>
- Coursera Calculus One Week 1 Summary 微积分第一周总结
- 成功安装Openbravo,并使用system admin角色
- scanf
- django 存储数据时 报 IntergrityErrror错误
- Jquery实现表格header头随滚动条滚动而滚动
- hdu 4123 Bob’s Race(树形DP&RMQ)
- awstats分析历史日志的处理办法
- Openbravo Smartclient 使用总结(1) - Summary
- MySQL数据库的IO操作
- Unable to execute dex: Multiple dex files define Lcom/jayway/android/robotium/solo/ActivityUtils$1错误
- RTMPdump 使用说明
- 用ASIHttpRequest实现数据缓存和队列
- Android事件分发机制完全解析,带你从源码的角度彻底理解(下) 。
- PHP die() 函数
- uboot中编译器EABI问题相关说明
- 自动生成存储过程