Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
IWEventRegistry.addFormHandler question
pawlr
Hi, I'm on 6.5 Solaris SP2.
As I understand it, IWEventRegistry.addFormHandler() takes 3 parameters - for example:
IWEventRegistry.addItemHandler('/BrowseOne', 'onCallout', doBrowse );
The third parameter is the name of the function, which itself passes the 'ItemObject' by default. So a doBrowse function will reference it by: doBrowse(itemObject) { }
What I'm wondering is if there is any way to pass multiple params/values through the 'doBrowse' call in this instance. Trying essentially to do something like this, following the above example:
IWEventRegistry.addFormHandler('/BrowseOne', 'onCallout', doBrowse(itemObj, '/path/to/img/dir/', 'path/to/ceiling/dir') );
then doBrowse would look like this:
doBrowse(itemObject, dir, ceilingdir) {
....
}
problem is this doesn't work, so is it true that IWEventRegistry.addFormHandler doesn't allow the function call to itself have multiple parameters?
Find more posts tagged with
Comments
jbonifaci
From what I've seen, you can't pass parameters in on those function calls. I would love it if you could, but it doesn't seem like you can. I would suggest adding logic to the doBrowse function with maybe a case statement for each of your browse buttons, or maybe a function called getBrowseLocations that takes the item name in and returns the vpath and ceiling or maybe define an object that has this information for each browse item.
Wish I could have given a better answer.
~Jeff
pawlr
Yeah, I could set it up the ways you describe - I thought there might be a shortcut but it is what it is.. thanks for the help Jeff