0
votes

i did add the following code for one of my clickable ( show values in this column as links ):

if ( formName == "testForm1")

{ href + "/doc.xsp?documentId=" + docUNID + "&action=openDocument"; }

else if ( formName == "testForm2" )

{ // an opened pop-up with a message will be great! }

I read that you can use easily window.alert, but in Client Side. So, how can I refer to rowData.getDocument().getItemValueString("Form") using CS?

Or, it is possible to compute the Show values in this column as links property?

I did tried the @WarningMessage('messageText') formula but I need an other type of warning / message.

Thanks for your time!

1
Sedar provided the solution, I just add a word of caution: getDocument() is expensive, so don't repeat, use a variable. Also recycle it after use. You probably would be better off to add Form as a column to your view (you don't need to display it), so you can avoid the getDocument() alltogether. And be careful with Popups: users routinely click them without reading - and they are alien to the webstwissel

1 Answers

3
votes

You can use view.postScript() to send a CSJS code back to the client context.

view.postScript("alert('"+rowData.getDocument().getItemValueString("Form")+"')");