Page 1 of 1
Finding Java-Script-Code in a DSPF
Posted: Fri Apr 12, 2013 5:48 am
by dieter
Hello,
is there a way to find all Javascript coded events in a Record-Format? If not this would be a nice feature for a future release of ProfoundUI. When i use the Visual Designer for a DSPF which a coworker has written, it's hard for me to get an overview about all events of all components. It would be nice if the Visual Designer could show e.g. a listbox with all existing javascript events of all components.
Dieter
Re: Finding Java-Script-Code in a DSPF
Posted: Fri Apr 12, 2013 11:14 am
by David
There is not a way with the designer, but we do have a command that can be used to search property values in your source members.
Try this to find all JS events in a given member:
Code: Select all
PROFOUNDUI/PUIFNDSTR STRING(*ALL) PROPERTY('on') SRCFILE(YOURLIB/QDDSSRC) SRCMBR(YOURMBR) OUTPUT(*OUTFILE) OUTFILE(QTEMP/YOURFILE)
Then STRQL and query the out file like this:
Code: Select all
SELECT * FROM QTEMP/YOURFILE WHERE PROPNAME LIKE 'on%'
That should give you a report of all widgets in the display file that have the event properties 'onXXX' set.
If you want to find all non-event properties that have scripted values, you can search for 'script:' and 'js:' in all properties in the display file.
See the PUIFNDSTR command help and here for more info:
http://www.profoundlogic.com/docs/displ ... +JSON+Data
Re: Finding Java-Script-Code in a DSPF
Posted: Mon Apr 15, 2013 8:07 am
by dieter
Hello David,
thank you for your help. I tried out your suggestion. It works fine. I have modified your sql-where-clause so that i select all elements which have a "(" in the value field:
select * from mylib/puidsp where propval like '%(%';
Anyway it would be nice to have such a function in the Visual Designer. By the way: The editor for the properties of the widgets is very small. It would be very helpful if i could expand the editor-window.
Maybe you can take this suggestions onto your feature list for future releases.
Thanks from Germany,
Dieter