Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


...

This

...

example

...

adds

...

a

...

combo

...

box

...

to

...

the

...

Department

...

column

...

in

...

a

...

list

...

of

...

employees. 

...

It

...

assumes

...

an

...

employee

...

list

...

called

...

#EMPLIST

...

containing

...

a

...

#DEPTMENT

...

column

...

and

...

a

...

department

...

list

...

called

...

#DEPTS

...

containing

...

#DEPTMENT

...

and

...

#DEPTDESC.

...

  1.  Add a grid to the Webroutine design and set its listname property to EMPLIST.
  2.  Modify the grid_col_properties

...

  1.  property

...

  1. and

...

  1. select

...

  1. the

...

  1. Customize

...

  1. Column

...

  1. option

...

  1. for

...

  1. the DEPTMENT column.
  2.  Drag a combo box weblet onto the first non-header cell of the DEPTMENT column.
  3.  Set the listname property of the dropdown to DEPTS.
  4.  Set the codefield property to DEPTMENT and the captionfield property to DEPTDESC. Your grid should be looking something like this:Image Added

    Info
    Notice that the value property contains a single period (.).  This indicates that the value for the combo box should be the value of the current column of the EMPLIST list.

    Notice, also, that the display_mode property is set to $tsml_col_mode.

...

  1. This

...

  1. is

...

  1. a

...

  1. special

...

  1. XSLT

...

  1. variable

...

  1. used

...

  1. inside

...

  1. the

...

  1. grid

...

  1. to

...

  1. indicate

...

  1. the

...

  1. display

...

  1. mode

...

  1. defined

...

  1. in

...

  1. the

...

  1. DEF_LIST.

...

  1. Now

...

  1. an

...

  1.  on_change

...

  1.  action

...

  1. will

...

  1. be

...

  1. added

...

  1. to

...

  1. the

...

  1. combo

...

  1. box

...

  1. to

...

  1. execute

...

  1. a

...

  1. Webroutine

...

  1. when

...

  1. a

...

  1. value

...

  1. is

...

  1. changed.

...

  1. The

...

  1. Webroutine,

...

  1. UpdateDepartment,

...

  1. takes

...

  1. two

...

  1. inputs:

...

  1.  EMPNO

...

  1.  and

...

  1.  DEPTMENT.

...

  1.  Set the on_change_wrname

...

  1.  property

...

  1. of

...

  1. the

...

  1. combo

...

  1. box

...

  1. to

...

  1.  UpdateDepartment.

...

  1.  Set the tagfield1 property of the combo box to DEPTMENT

...

  1. This

...

  1. tells

...

  1. the

...

  1. combo

...

  1. box

...

  1. to

...

  1. submit

...

  1. the

...

  1. selected

...

  1. value

...

  1. of

...

  1. the

...

  1.  DEPTMENT

...

  1.  column

...

  1. (in

...

  1. the

...

  1.  DEPTS

...

  1.  list).

...

  1.  Set the reentryfield property of the combo box to EMPNO and set the reentryvalue property to ../lxml:column

...

  1. [@name='EMPNO'

...

  1. ]

...

  1. As

...

  1. this

...

  1. is

...

  1. an

...

  1. XPath

...

  1. expression

...

  1. you

...

  1. must

...

  1. use

...

  1. the

...

  1. XPath

...

  1. entry

...

  1. area

...

  1. at

...

  1. the

...

  1. bottom

...

  1. of

...

  1. the

...

  1. details

...

  1. tab

...

  1. to

...

  1. enter

...

  1. the

...

  1. value. 

...

  1. This

...

  1. tells

...

  1. the

...

  1. combo

...

  1. box

...

  1. to

...

  1. get

...

  1. the

...

  1. value

...

  1. of

...

  1. the

...

  1. EMPNO

...

  1. column

...

  1. of

...

  1. the

...

  1. grid

...

  1. and

...

  1. submit

...

  1. it

...

  1. in

...

  1. a

...

  1. field

...

  1. called

...

  1. EMPNO.

...

...