Page 1 of 1

click on subfile row not working

Posted: Thu Oct 28, 2010 2:31 pm
by UPI
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?

Re: click on subfile row not working

Posted: Fri Oct 29, 2010 10:29 am
by Rob
There is a period missing here after RowClick

Code: Select all

pui.click('RowClick.' + row)

Re: click on subfile row not working

Posted: Fri Oct 29, 2010 11:41 am
by UPI
Thanks for the response. That worked.
Better have someone update the Getting Started Guide. The period isn't in there in the example.

Re: click on subfile row not working

Posted: Fri Oct 29, 2010 2:50 pm
by Rob
Thanks for the feedback. The period is actually in the getting started guide but it is very difficult to see. We will correct this.

Re: click on subfile row not working

Posted: Fri Oct 29, 2010 3:03 pm
by UPI
I stand corrected. I should have increased the pdf document to 300%. It is there.
Thanks again.