xautlx / s2jh

A Java/J2EE development framework for enterprise system based on Struts/Spring/JPA/Hibernate and jquery/bootstrap
GNU Lesser General Public License v3.0
321 stars 242 forks source link

如何在js代码中获取当前登录用户的用户名等信息 #60

Closed flanliulf closed 10 years ago

flanliulf commented 10 years ago

比如,我需要在-index.js中指定某个操作人列的默认值是当前登录用户。 editable: true, stype : 'select', align : 'center' }, { label : '操作人', name : 'operator', width : 60, editable: true, editoptions : { defaultValue : ????这里怎么获取 } align : 'center' }, {

xautlx commented 10 years ago

全局添加JS登录用户数据JSON对象,便于在其他JS中直接引用当前登录用户信息 http://git.oschina.net/xautlx/s2jh/commit/975ef570dd4e906592486521459629194d57e6ed

defaultValue: AUTH_USER.username

xautlx commented 10 years ago

代码在snapshot分支,以后合并到master

flanliulf commented 10 years ago

好了,已经参照snapshot代码解决