cancel
Showing results for 
Search instead for 
Did you mean: 

onClientClick event in Tableview

Former Member
0 Kudos

Hi!

I am trying to do a simple operation. On clicking a column in a tableview a javascript should be invoked that pops up a new window.

In the tableview the columns are passed via the parameter columnDefinitions as recommended.

There are onClick and onClientClick events available but onClientClick can only be set to true, onClick is for server operations.

Can someone explain how this can be done.

Tried the same thing using the iterator with

p_replacement_bee = cl_htmlb_link=>factory(

id = p_cell_id

  • ID_POSTFIX =

ONCLIENTCLICK= 'open_windo'(unit)'

REFERENCE = '#'

TEXT = l_no

  • TEXTDIRECTION =

  • TOOLTIP =

  • _TEXT =

)

.

Still no luck. Is there a simple to invoke a javascript on client side?

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

got it working using the iterator as

p_replacement_bee = cl_htmlb_link=>factory(

id = p_cell_id

  • ID_POSTFIX =

ONCLIENTCLICK = 'TRUE'

REFERENCE = 'javascript:open_window(1234)'

  • TARGET = '_blank'

TEXT = l_no

  • TEXTDIRECTION =

  • TOOLTIP =

  • _TEXT =

)

.

But surely there has to be a way to do this without the iterator.

Any ideas?

Also - are there any performance related problems if we use the iterator?

Former Member
0 Kudos

Glad you got it!!!

Without the iterator you would have to build your table by hand but the iterator runs much better.

Performance wise I actually see an improvement in performance.

bjorn-henrik_zink
Active Participant
0 Kudos

Hi,

I tried your code, however, nothing happens when I press the link?

Something you forgot to add ... or did I forget something?

Thanks in advance.

/ Elvez

maximilian_schaufler
Active Contributor
0 Kudos

Hi Elvez,

are you having the exact problem as described above?

Anyway, I would recommend opening a new thread, especially as the previous posts are more than a year old - lets keep things separated and sorted

Max