CommandArgOption
CommandArgOption标签控制客户端与服务端的交互情况,例如客户端是否将某些数据传回服务端,客户端调用服务端方法的时机等CommandArgOption有四个参数:editors,joinGroup,groups,prefetch。传回客户端的数据通过CommandArg类型的参数接收
editor
控制Form上的没有数据源的Editor的值是否传回服务端,不写则默认为editors="all"
- editors的可选属性有:all,none,list(Editor的名字,如果有多个,用英文输入法下的逗号分隔),默认是all
@CommandArgOption(editors = "all") //所有
@CommandArgOption(editors = "none") //无
@CommandArgOption(editors="StringEditor,LongEditor") //部分 如 StringEditor
joinGroup
控制Form上的joinGroup是否传回服务端,不写明则默认为no
- 可选属性有:yes,no,默认状态是no
@CommandArgOption(joinGroup="yes")//能获取joinGroup
@CommandArgOption(joinGroup="no")//不能获取joinGroup
groups
控制Form上的DataSourceGroup相关属性是否传回服务端,不写则默认为groups="current(2)"
可选属性有:all,none,current,list(group的名字,如果有多个,用英文输入法下的逗号分隔)。除了none以外,其余all,current,list后都可跟(0)、(1)、(2)、(3)、(4)
其中,0表示什么都不传,1表示传currentRecord,2表示传currentRecord和selectedRecords ,3表示传currentRecord和currentQuery,4表示传currentRecord、selectedRecords和currentQuery。此外,all,current,list后也可跟cr(即currentRecord),sr(即selectRecords),cq(即currentQuery),填多个时,用英文状态下的逗号分隔
currentRecord是当前记录,SelectRecords是当前选中的多条记录,currentQuery是当前Group的QueryTable
如果不跟数字或者cr,sr,cq,则默认是2,只传currentRecord和selectRecords
@CommandArgOption(groups="all")//获取所有数据源的arg内容
@CommandArgOption(groups="all(4)")//获取所有数据源的currentRecord,selectedRecords ,currentQuery。
@CommandArgOption(groups="none")//不获取数据源的内容
@CommandArgOption(groups="current")//只获取当前数据源
@CommandArgOption(groups="current(3)")//只获取当前数据源的 currentRecord和currentQuery
@CommandArgOption(groups="Employee")//
prefetch
控制客户端是否保存CommandResult,不写明则默认为false
@CommandArgOption(prefetch=true)//prefetch等于true时,客户端将保存服务端传回的CommandResult
@CommandArgOption(prefetch=false)// prefetch等于false时,客户端将不会保存服务端传回的CommandResult,每次都从服务端重取