click on subfile row not working
Posted: Thu Oct 28, 2010 2:31 pm
I'm trying to use the technique described in the Getting Started guide (on page 43 and 44) to allow the user to click on a subfile row. I can't get it to work.
"You may also choose to use a hidden hyperlink that is triggered when the subfile row itself is
clicked. To accomplish this, add a hyperlink widget to the subfile and bind the response to an
RPG variable as before. Then, right-click the hyperlink in the designer and select Hide from the
context menu, or set the visibility property to hidden. Change the id property of the hyperlink to
something meaningful, like viewLink. Finally, add the following JavaScript line to the onrowclick
event of the grid widget:
id=RowClick
field type = hyperlink
response = RowClick (an indicator)
visibility=hidden
grid property onrowclick=pui.click('RowClick' + row)
The RPG program is getting control when the subfile row is clicked but the RowClick bound field is not being populated with anything (just a blank). How is the RPG program to know when the row was clicked (and not another button or field in the subfile)?
What am I missing?
"You may also choose to use a hidden hyperlink that is triggered when the subfile row itself is
clicked. To accomplish this, add a hyperlink widget to the subfile and bind the response to an
RPG variable as before. Then, right-click the hyperlink in the designer and select Hide from the
context menu, or set the visibility property to hidden. Change the id property of the hyperlink to
something meaningful, like viewLink. Finally, add the following JavaScript line to the onrowclick
event of the grid widget:
id=RowClick
field type = hyperlink
response = RowClick (an indicator)
visibility=hidden
grid property onrowclick=pui.click('RowClick' + row)
The RPG program is getting control when the subfile row is clicked but the RowClick bound field is not being populated with anything (just a blank). How is the RPG program to know when the row was clicked (and not another button or field in the subfile)?
What am I missing?