Finding Java-Script-Code in a DSPF

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
dieter
Experienced User
Posts: 122
Joined: Tue May 22, 2012 6:45 am
First Name: Dieter
Last Name: Schröder
Company Name: Ecclesia Holding GmbH
State / Province: Outside Canada/USA
Country: Germany
Contact:

Finding Java-Script-Code in a DSPF

Post 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
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Finding Java-Script-Code in a DSPF

Post 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
dieter
Experienced User
Posts: 122
Joined: Tue May 22, 2012 6:45 am
First Name: Dieter
Last Name: Schröder
Company Name: Ecclesia Holding GmbH
State / Province: Outside Canada/USA
Country: Germany
Contact:

Re: Finding Java-Script-Code in a DSPF

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests