WDA-Web Dynpro的POWL(个人对象工作清单)
POWL(Personal Object Worklist) for Web Dynpro
转载地址:https://blogs.sap.com/2013/02/15/powlpersonal-object-worklist-for-web-dynpro/
Summary
This document illustrates how to make personnel object work list, Feeder class and how to integrate POWL with WD ABAP.
Author: Rohan Sanjay Uphade
Company: NTT DATA India EAS Ltd.
Created on: 12 December 2012
Author Bio
Rohan is SAP certified Consultant and works in NTT DATA, He has work experience in SAP ABAP , Dynamic programming,
WebDynpro ABAP, POWL , Smart forms , Adobe forms and so on.
Main Steps Involve in creating POWL Feature.
- Create Feeder class
- Implement Feeder class method
- Define Application id, Type, Role and queries
- Integrate POWL with our WebDynpro application
- Test POWL
1. Create Feeder class.
- For our example, we need to create tables for Data selection
- Create a table name: YEMPLOYEE, presented in Fig. 2.
- Create Table entries for above table for references.
- Create Table Type : YTT_YEMPLOYEE ,presented in Fig.3
Fig. 2 Database table used for our example
Fig. 3 Table type for database table YEMPLOYEE.
- Now go to T.Code: SE24 and create a class with following interface, presented in Fig.4
- Class Name : YPOWL_CLASS.
- Interface Name : IF_POWL_FEEDER.
Fig. 4 YPOWL_CLASS is made and is using the interface IF_POWL_FEEDER.
- Now create attribute for same class, presented in Fig.5
- Attribute Name:
MT_RESULT Type YTT_YEMPLOYEE.
MT_FIELDCAT Type POWL_FIELDCAT_TTY
MT_SELCRITERIA Type POWL_SELCRIT_TTY
MT_CRITERIA_DEFAULT Type RSPARAMS_TT
Fig. 5 Attribute for YPOWL_CLASS is made.
- Implemented Feeder class has various methods as shown in Fig 6.
Fig.6 Interface Implemented methods.
NOTE: It is not necessary to use all methods provided by interface from the start.
There are 2 mandatory methods and 6 optional ones.
GET_OBJECTS and GET_OBJECT_DEFINITION are two mandatory methods, rest are optional.
Method description:
1.GET_ACTIONS: In this method, we can define the buttons and their action which can be handle in
Method HANDLE_ACTION. Method GET_ACTION properties defined in structure POWL_ACTDESCR_STY like text, tooltip, index etc.
2.GET_ACTION_CONF: In this method, one can fire a confirmation dialog window on the click of button, it will ask user whether to delete
the entries or not or similar.
3.GET_SEL_CRITERIA: In these method selection criteria is defined for this particular feeder. I.E Fields which appear in POWL selection screen.
- Structure use: POWL_SELCRIT_STY
4.GET_FIELD_CATALOG: This method describes the field catalog to be used for query results table and the UI properties of the particular fields.
- Various properties can be set here: Column position, column header, column visible, column color etc.
- Structure use: POWL_FIELDCAT_STY.
5.GET_OBJECT_DEFINITION: This method is used to define the container (e.g. specify field types) where the selected data gets stored.
6.GET_OBJECTS: This method is used to retrieve data from the backend system. Data retrieval can be done via simple select query or by
using a function module. Selected data is passed to E_RESULTS which is exporting parameter of this method
7.GET_DETAIL_COMP:Enable the detail component feature.
8.HANDLE_ACTION: In this, all the actions for the buttons are defined and also we can control enable/disable property of buttons here.
Control can be transferred from class to portal via firing a event using :
- E_portal_actions-fire_wdevent = abap_true.
2. Implement Feeder class method.
NOTE: Please implement/Activate all method of feeder class, otherwise system will generate dump saying ‘Implementation is missing’.
- Method GET_ACTIONS
METHOD IF_POWL_FEEDER~GET_ACTIONS.
DATA:WA_POWL_ACTIONS TYPE POWL_ACTDESCR_STY,
IT_POWL_ACTIONS TYPE TABLE OF POWL_ACTDESCR_STY.
WA_POWL_ACTIONS-ACTIONID = ‘POWL_LEAD_SEL’.
*WA_POWL_ACTIONS-CARDINALITY = C_FEEDER_ACTION_SEL_REQ.
*WA_POWL_ACTIONS-PLACEMENT = C_FEEDER_ACTION_TOOLBAR.
WA_POWL_ACTIONS-ENABLED = ‘X’.
WA_POWL_ACTIONS-PLACEMENTINDX = .
*WA_POWL_ACTIONS-
WA_POWL_ACTIONS-TEXT = ‘TEST’.
APPEND WA_POWL_ACTIONS TO IT_POWL_ACTIONS.
E_ACTIONS_CHANGED = ‘X’.
C_ACTION_DEFS = IT_POWL_ACTIONS.
ENDMETHOD.
- Method GET_ ACTION_CONF
- Method GET_SEL_CRITERIA
METHOD IF_POWL_FEEDER~GET_SEL_CRITERIA. DATA: LS_SELCRIT TYPE POWL_SELCRIT_STY,
LS_CRITERIA_DEFAULT TYPE RSPARAMS,
LS_DEFAULT TYPE RSPARAMS.
IF MT_SELCRITERIA IS INITIAL.
LS_SELCRIT TO MT_SELCRITERIA.
LS_SELCRIT-SELNAME = ‘SALARY’.
LS_SELCRIT-KIND = ‘S’.
LS_SELCRIT-PARAM_TYPE = ‘I’.
LS_SELCRIT-SELOPT_TYPE = ‘A’.
LS_SELCRIT-ALLOW_ADMIN_CHANGE = ‘X’.
LS_SELCRIT-DATATYPE = ‘YEMPLOYEE-SALARY’.
APPEND LS_SELCRIT TO MT_SELCRITERIA.
CLEAR LS_SELCRIT.
E_SELCRIT_DEFS_CHANGED = ‘X’.
E_DEFAULT_VAL_CHANGED = ‘X’.
C_SELCRIT_DEFS = MT_SELCRITERIA.
C_DEFAULT_VALUES = MT_CRITERIA_DEFAULT.
ELSE.
C_SELCRIT_DEFS = MT_SELCRITERIA.
C_DEFAULT_VALUES = MT_CRITERIA_DEFAULT.
E_SELCRIT_DEFS_CHANGED = ‘X’.
ENDIF.
CLEAR C_DEFAULT_VALUES.
CLEAR C_DEFAULT_VALUES. ENDMETHOD.
- Method GET_FIELD_CATALOG
METHOD IF_POWL_FEEDER~GET_FIELD_CATALOG.
DATA: LS_FIELDCAT TYPE POWL_FIELDCAT_STY,
LS_DFIES TYPE DFIES,
LS_FCAT TYPE LVC_S_FCAT,
L_SEQNR TYPE INT4. DEFINE ADD_COLPOS.
ADD TO L_SEQNR.
LS_FIELDCAT-COLPOS = L_SEQNR.
END–OF–DEFINITION. IF MT_FIELDCAT IS INITIAL.
* 1. MANDT
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COLID = ‘MANDT’.
ADD_COLPOS.
LS_FIELDCAT-HEADER_BY_DDIC = ‘X’.
LS_FIELDCAT-FIXED = ‘X’.
LS_FIELDCAT-H_ALIGN = ‘L’.
LS_FIELDCAT-COL_VISIBLE = ‘ ‘.
LS_FIELDCAT-EDITABLE = ‘ ‘.
LS_FIELDCAT-WIDTH = .
INSERT LS_FIELDCAT INTO TABLE MT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COLID = ‘EMP_ID’.
ADD_COLPOS.
LS_FIELDCAT-HEADER_BY_DDIC = ‘X’.
LS_FIELDCAT-FIXED = ‘X’.
LS_FIELDCAT-H_ALIGN = ‘L’.
LS_FIELDCAT-ALLOW_SORT = ‘X’.
LS_FIELDCAT-COL_VISIBLE = ‘X’.
LS_FIELDCAT-EDITABLE = ‘ ‘.
LS_FIELDCAT-WIDTH = .
INSERT LS_FIELDCAT INTO TABLE MT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COLID = ‘EMP_ID’.
ADD_COLPOS.
LS_FIELDCAT-HEADER_BY_DDIC = ‘X’.
LS_FIELDCAT-FIXED = ‘X’.
LS_FIELDCAT-H_ALIGN = ‘L’.
LS_FIELDCAT-ALLOW_SORT = ‘X’.
LS_FIELDCAT-COL_VISIBLE = ‘X’.
LS_FIELDCAT-EDITABLE = ‘ ‘.
LS_FIELDCAT-WIDTH = .
INSERT LS_FIELDCAT INTO TABLE MT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COLID = ‘EMP_NAME’.
ADD_COLPOS.
LS_FIELDCAT-HEADER_BY_DDIC = ‘X’.
LS_FIELDCAT-FIXED = ‘X’.
LS_FIELDCAT-H_ALIGN = ‘L’.
LS_FIELDCAT-ALLOW_SORT = ‘X’.
LS_FIELDCAT-COL_VISIBLE = ‘X’.
LS_FIELDCAT-EDITABLE = ‘ ‘.
LS_FIELDCAT-WIDTH = .
INSERT LS_FIELDCAT INTO TABLE MT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COLID = ‘DESIGNATION’.
ADD_COLPOS.
LS_FIELDCAT-HEADER_BY_DDIC = ‘X’.
LS_FIELDCAT-FIXED = ‘X’.
LS_FIELDCAT-H_ALIGN = ‘L’.
LS_FIELDCAT-ALLOW_SORT = ‘X’.
LS_FIELDCAT-COL_VISIBLE = ‘X’.
LS_FIELDCAT-EDITABLE = ‘ ‘.
LS_FIELDCAT-WIDTH = .
INSERT LS_FIELDCAT INTO TABLE MT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COLID = ‘MANAGER’.
ADD_COLPOS.
LS_FIELDCAT-HEADER_BY_DDIC = ‘X’.
LS_FIELDCAT-FIXED = ‘X’.
LS_FIELDCAT-H_ALIGN = ‘L’.
LS_FIELDCAT-ALLOW_SORT = ‘X’.
LS_FIELDCAT-COL_VISIBLE = ‘X’.
LS_FIELDCAT-EDITABLE = ‘ ‘.
LS_FIELDCAT-WIDTH = .
INSERT LS_FIELDCAT INTO TABLE MT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COLID = ‘SALARY’.
ADD_COLPOS.
LS_FIELDCAT-HEADER_BY_DDIC = ‘X’.
LS_FIELDCAT-FIXED = ‘X’.
LS_FIELDCAT-H_ALIGN = ‘L’.
LS_FIELDCAT-ALLOW_SORT = ‘X’.
LS_FIELDCAT-COL_VISIBLE = ‘X’.
LS_FIELDCAT-EDITABLE = ‘ ‘.
LS_FIELDCAT-WIDTH = .
INSERT LS_FIELDCAT INTO TABLE MT_FIELDCAT.
ELSE.
C_FIELDCAT = MT_FIELDCAT.
ENDIF.
ENDMETHOD.
- Method GET_ OBJECT_DEFINITION
METHOD IF_POWL_FEEDER~GET_OBJECT_DEFINITION.
E_OBJECT_DEF ?= CL_ABAP_TABLEDESCR=>DESCRIBE_BY_DATA( ME->MT_RESULT ).
ENDMETHOD.
- Method GET_OBJECTS
METHOD IF_POWL_FEEDER~GET_OBJECTS.
DATA: R_EMP_ID TYPE RANGE OF YEMPLOYEE-EMP_ID,
R_EMP_NAME TYPE RANGE OF YEMPLOYEE-EMP_NAME,
R_SALARY TYPE RANGE OF YEMPLOYEE-SALARY,
X_BOOK_ID LIKE LINE OF R_EMP_ID,
X_EMP_NAME LIKE LINE OF R_EMP_NAME,
X_SALARY LIKE LINE OF R_SALARY.
FIELD-SYMBOLS: <LFS_PARAMS> TYPE RSPARAMS,
<LF_RESULT> TYPE YEMPLOYEE.
“FILL THE RANGE TABLES
LOOP AT I_SELCRIT_VALUES ASSIGNING <LFS_PARAMS>.
CASE <LFS_PARAMS>-SELNAME.
WHEN ‘EMP_ID’.
MOVE-CORRESPONDING <LFS_PARAMS> TO X_BOOK_ID.
INSERT X_BOOK_ID INTO TABLE R_EMP_ID.
WHEN ‘EMP_NAME’.
MOVE-CORRESPONDING <LFS_PARAMS> TO X_EMP_NAME.
INSERT X_EMP_NAME INTO TABLE R_EMP_NAME.
WHEN ‘SALARY’.
MOVE-CORRESPONDING <LFS_PARAMS> TO X_SALARY.
INSERT X_SALARY INTO TABLE R_SALARY.
ENDCASE.
ENDLOOP.
REFRESH ME->MT_RESULT.
SELECT * FROM YEMPLOYEE INTO TABLE ME->MT_RESULT
WHERE EMP_ID IN R_EMP_ID
AND EMP_NAME IN R_EMP_NAME
AND SALARY IN R_SALARY. E_RESULTS = ME->MT_RESULT.
ENDMETHOD.
- Method GET_OBJECTS
METHOD IF_POWL_FEEDER~GET_DETAIL_COMP.
E_DETAIL_COMP = ‘YEMPLOYEE_POWL_WD’.
ENDMETHOD.
- Method GET_DETAIL_COMP
METHOD IF_POWL_FEEDER~GET_DETAIL_COMP.
E_DETAIL_COMP = ‘YEMPLOYEE_POWL_WD’.
ENDMETHOD.
- Method HANDLE_ACTION
METHOD IF_POWL_FEEDER~HANDLE_ACTION.
DATA: LS_PARAMETER TYPE POWL_NAMEVALUE_STY.
DATA : X_RESULT TYPE YEMPLOYEE ,
V_INDEX TYPE RSTABIX,
V_INDX() TYPE C.
CASE I_ACTIONID.
WHEN ‘POWL_LEAD_SEL’.
CLEAR:X_RESULT,V_INDX.
READ TABLE C_SELECTED INTO V_INDEX INDEX .
IF SY-SUBRC = .
V_INDX = V_INDEX-TABIX.
READ TABLE C_RESULT_TAB INTO X_RESULT INDEX V_INDX.
IF SY-SUBRC = .
E_PORTAL_ACTIONS-FIRE_WDEVENT = ABAP_TRUE.
LS_PARAMETER-KEY = ‘EMP_ID’.
LS_PARAMETER-VALUE = X_RESULT-EMP_ID.
APPEND LS_PARAMETER TO E_PORTAL_ACTIONS-PARAMETERS.
LS_PARAMETER-KEY = ‘EMP_NAME’.
LS_PARAMETER-VALUE = X_RESULT-EMP_NAME.
APPEND LS_PARAMETER TO E_PORTAL_ACTIONS-PARAMETERS.
LS_PARAMETER-KEY = ‘SALARY’.
LS_PARAMETER-VALUE = X_RESULT-SALARY.
APPEND LS_PARAMETER TO E_PORTAL_ACTIONS-PARAMETERS.
ENDIF.
ENDIF.
ENDCASE.
ENDMETHOD.
3. Define Application id, Type ,Role and queries
- After a feeder is developed, it needs to be made visible to the roles. Basically, this means we need to register the feeder under a specific APPLID, define a POWER List type and introduce it to the roles .
Step 1.Create an Application ID
- Transaction code: FPB_MAINTAIN_HIER
- Click on Change->Display button and then on New Entries button
- Give application id name:YEMPLOYEE_APPLID
- Presses SAVE , it will ask for transport request. Give/Create transport request and save it.
- Now u can see your entry (YEMPLOYEE_APPLID) in the list as shown below figure.
Step 2.Create a POWL TYPE
- Transaction code: POWL_TYPE
- Click on New Entries button.
- Give Type name : YEMPLOYEE_TYPE
- Enter description and feeder class name as shown in below figure.
- Presses SAVE, it will ask for transport request, add it to same request created for APPLID.
- Now u can see your entry (YEMPLOYEE_TYPE) in the list.
Step 3.Role assignment for POWL TYPE
Here we connect the APPLID with the POWL Type and make it visible to the role.
- Transaction code: POWL_TYPER
- Click on New Entries button and enter details as shown in figure.
- NOTE:Role is Optional field and can be specified only if a role dependent mapping is required
- Press SAVE, it will ask for transport request. Give/Create transport request and save it.
Step 4.Query for POWL
Here we define default queries for power list. A query id is made which is connected to POWL type.
NOTE: you can define one or more queries.
- Transaction code :POWL_QUERY
- Click on New Entries button and enter details as shown in figure.
- Press SAVE, and give transport request.
- After this, we can create/see the query parameters and the query settings with the help of the corresponding buttons:
- On clicking Query Parameter, you could see following screen, with field declare in feeder class.
- On clicking Query setting, one can enable different feature like quick search for fields.
Step 5.Map APPLID & QUERYID for POWL
Here if several queries are defined then sequence of tabs can be controlled via this transaction.
- Transaction code :POWL_QUERYR
- Click on New Entries button and enter details as shown in figure.
- And tick the checkbox Activate.
- Press SAVE, and give transport request
4. Integrate POWL with WD application
- Transaction code :SE80
- Create a Web Dynpro component YEMPLOYEE_POWL_WD and save it.
- Define Component usage. POWL_UI_COMP,as shown in below figure.
- Goto Views, Define POWL Component usage in properties tab of MAIN VIEW
- Now, Define a view Container, Label and Text view inside the MAIN VIEW (POWL VIEW).
- FOR CONTEXT NODE: Create node with single attribute EMP_NAME & bind it toTEXT_NAME
- Now Go to Windows, in the properties tab of Windows, define the usage ofPOWL_UI_COMP component.
- In WINDOWS, View container(VC_UI) embed the view Powl_Master of Powl_UI_Comp component as shown in fig.
- Now click on Outbound Plug tab of window, give PLUG NAME & PARAMETER NAME.
PARAMETER NAME TYPE
APPLID STRING
FORALLQ POWL_XFLAG_TY
QNAME POWL_QUERY_TY
QSELPARA STRING
REFRESHQ POWL_XFLAG_TY
SRVGROUP POWL_XFLAG_TY
- Click SAVE and go to WINDOW tab and create navigation link for OUT.
- Define the mapping of Outbound plug of windows with Default plug of view Powl_Master as shown:
- In the methods Tab of Windows , write the code in Handle Default Event handler to fire the outbound plug to Powl_Master View :
METHOD HANDLEDEFAULT .
DATA: LV_INBOX_QUERY TYPE STRING,
LT_QUERY_PARAMS TYPE RSPARAMS_TT,
LWA_PARAM TYPE RSPARAMS.
DATA LV_QNAME TYPE POWL_QUERY_TY. LV_QNAME = ‘YEMPLOYEE_QUERY1’.
CALL FUNCTION ‘POWL_ENCODE_SELPARA’
EXPORTING
I_SELPARA = LT_QUERY_PARAMS
I_ESCAPE = ‘\’
IMPORTING
E_SELPARA_STRING = LV_INBOX_QUERY. WD_THIS->FIRE_OUT_PLG(
APPLID = ‘YEMPLOYEE_APPLID’
QNAME = LV_QNAME
FORALLQ = ‘X’
QSELPARA = LV_INBOX_QUERY
REFRESHQ = ‘X’
* REFRESHA = ‘X’
SRVGROUP = ‘X’ ).
ENDMETHOD.
5. Test POWL.
Now create WD application and activate the whole program and run the application.
- Initial Screen
Here, You can
- Define New query (Define New query)
- Change Query (Change Search condition)
- Personalize (Set Layout , Remove query , Set default query etc)
- AFTER DEFINING NEW QUERY
Best Regards,
WDA-Web Dynpro的POWL(个人对象工作清单)的更多相关文章
- WDA入门教程Ⅰ:Web Dynpro for ABAP 入门(转)
转自:https://www.jianshu.com/p/68c1592f1a87 WDA全称Web Dynpro for ABAP,也写作WD4A或WDA,是用于在ABAP环境中开发Web应用程序的 ...
- SAP Web Dynpro - 个性化和配置
根据业务需求,您可以实现许多标准应用程序,并且Web Dynpro应用程序的UI可以根据要求而有所不同. 应用配置 要配置Web Dynpro应用程序,首先要为单个Web Dynpro组件配置数据记录 ...
- SAP Web Dynpro - 应用程序中的服务调用
您可以使用服务调用来调用Web Dynpro组件中的现有功能模块. 要创建服务呼叫,您可以使用Web Dynpro工具中易于使用的向导. 您可以在ABAP工作台中启动该向导以创建服务调用. 步骤1-选 ...
- 【ABAP系列】SAP Web Dynpro 技术简介
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP Web Dynpro 技 ...
- SAP Web Dynpro - 教程
SAP Web Dynpro是一种标准的SAP UI技术,用于使用图形工具和与ABAP工作台集成的开发环境来开发Web应用程序. 图形工具的使用减少了实施工作,并有助于维护ABAP工作台中的组件. 本 ...
- ASP.NET Web API 2 之 HttpRequestMessage 对象
Ø 前言 在 Web API 中经常会使用到 HttpRequestMessage 和 HttpResponseMessage 对象,这两个对象封装了对 Web API 的请求和响应,位于 Syst ...
- WEB服务器都在做哪些工作?
作为WEB开发人员,我们肯定应该要知道WEB服务器都在做哪些工作,这里简单列举一下,有时间然后详细说明. (1)建立连接——接受一个客户端连接. (2)接收请求——从网络中读取一条 HTTP 请求报文 ...
- Powershell使用真实的对象工作
Powershell使用真实的对象工作 来源 https://www.pstips.net/powershell-work-with-reallife-objects.html 每一个Powershe ...
- web dynpro配置注意事项
如果你想使用web dynpro 开发的应用,但是发现浏览器报错,那么你按照下面的步骤逐一进行检查吧.特别是返回的500错误,或者是你发现浏览器的地址栏中以http://<hostname> ...
随机推荐
- DrawerLayout 使用
<?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.Drawe ...
- Html的本质及在web中的作用
概要 本文以一个Socket程序为例由浅及深地揭示了Html的本质问题,同时介绍了作为web开发者我们在开发网站时需要做的事情 Html的本质以及开发需要的工作 1.服务器-客户端模型 其实,对于所有 ...
- springMVC的执行流程和完整代码
一.什么是 Spring MVC Spring MVC 属于 SpringFrameWork 的后续产品,已经融合在 Spring Web Flow 里面,是一个强大灵活的 Web 框架.Spring ...
- [UE4]Return Node节点好用法
蓝图自定义函数中,碰到“Return Node”也会推出当前的函数,跟高级语言的“return”是一样的用法
- Android 设置SeekBar不可拖动
public class MyProgressBar extends SeekBar { /** * 是否支持拖动进度 */ private boolean touch = true; public ...
- 在UnrealEngine4中使用Google Protobuf
转自:https://blog.csdn.net/or_7r_ccl/article/details/54986393 在UnrealEngine4中使用Google Protobuf ...
- ODBC数据源管理器-》系统DSN-》没有....Microsoft Access Driver(*mdb,*,accdb)
问题如标题: 解决方法:打开目录:“C:\Windows\SysWOW64”,双击该目录下的“odbcad32.exe”文件,就进去ODBC数据源管理界面了,现在这个界面中就有access的驱动了!
- Office365开发者计划——账户信息上显示已是订阅用户,点击其他授权信息,仍然需要激活
一.申请过程跳过. 二.安装之后,点击账号,查看授权状态,如题所述. 解决办法: 链接地址:https://answers.microsoft.com/zh-hans/msoffice/forum/a ...
- echarts学习之——电力迁徙图
今天主要就是在搞echarts,我们都知道他为我们提供了丰富的api方法,使我们能够迅速的搭建图标.同时他里面还有许多的案例, 其中就有这么一个国内航线模拟迁徙的地图,如下所示: 而我们通常因为各种需 ...
- The compiler compliance specified is 1.5 but a JRE 1.8 is used
错误信息: The compiler compliance specified is 1.5 but a JRE 1.8 is used 解决办法: 右击项目>选择Properties 选择Ja ...