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)
Register Event on Item, DCT generated from DTD
saumil
Hi,
I have datacapture.cfg generated from dtd.
I am able to refer the item but not able to register event.
path is like that /QTForm/{iw_attributes}/Category.
when I am using
IWDatacapture.getItem("/QTForm/{iw_attributes}/Category");
, it's giving me right object.
But when i am doing
IWEventRegistry.addItemHandler("/QTForm/{iw_attributes}/Category", "onItemChange", CategoryChanged);
.
it is not able to call function
CategoryChanged
.
Saumil Shah
Technical Associate
Mahindra and British Telecom
+0919819890479
Find more posts tagged with
Comments
Migrateduser
Perhaps something before your IWEventRegistry call or even something within your CategoryChanged function is bugged?
Post the JS, up to and including the CategoryChanged function and we'll take a look under the hood.
Dave
saumil
Hi,
But same thing is working if i am removing '{}'.
still, i am attaching my js.
Saumil Shah
Technical Associate
Mahindra and British Telecom
+0919819890479
Migrateduser
Nothing jumped out at me, but try putting an alert at various places to see where the js is going. My guess is that your js may not be syntactically correct, according to your DCT.
Put your first alert before your setOptions call. Also, include your if...else / IWEventRegistry statements IN your init function.
Dave
saumil
Hi, i have already tried with puting event registering code in init(), it doesn't make any difference.
and setOption() is not in js but i am calling one inline command (ipl) in dct and it's substituting that javascript function dynamically.
and again i am repeating this thing are working fine, if i am removing '{}'.
so perhaps it's not looking any mistake abt. bugs in .js but event handler registration getting problem with '{}'
Saumil Shah
Technical Associate
Mahindra and British Telecom
+0919819890479
Migrateduser
Did you try the alert popups?
saumil
yes i already tried, i have gone through this things many times.
thats why i come to conclusion.
are you sure it's not problem with '{}' ?
Saumil Shah
Technical Associate
Mahindra and British Telecom
+0919819890479
Migrateduser
I haven't seen {} as in version 6 or later. You mentioned that omitting the {} causes the js to work just fine -- why did you include them in the first place and if it works fine without it, why not remove it? I'm not familiar with your DCT, so I don't know what the proper path should be.
Dave
saumil
My answer is in attachment.
sorry for that.
Saumil Shah
Technical Associate
Mahindra and British Telecom
+0919819890479
saumil
Hi,
have you gone through my last post ?
may be you can help me, by understanding my problem exacty.
Saumil Shah
Technical Associate
Mahindra and British Telecom
+0919819890479
Migrateduser
I did go through your attachment, explaining the problem in more depth.
So, if I understand correctly, your desire is to save the DCR as <item name="****" value="yyy">, rather than <item name="****"><value>yyy</value></item> , even though your JavaScript works just fine when the DCR is without {} and in "normal" form, i.e. <item name="****"><value>yyy</value></item> ? I admit, I'm also unclear on why you're not able to make it work in attribute form. Nothing in your javascript stood out to me.
If you're not seeing any alerts (even as early as the first line in the init function), then obviously something is very wrong. If NO JavaScript is being called, you could be referencing it incorrectly -- but then, you mentioned that if you take out the {}, it works just fine. So, obviously you're referencing the JavaScript correctly.
Please advise if I have any details wrong here.
Dave
saumil
Hi,
your are looking right.
but tell me is there any interwoven specification document having hint about this.
i am finding it very strange, as i have completed whole application within time frame but not able to deliver because of this problem.
Saumil Shah
Technical Associate
Mahindra and British Telecom
+0919819890479
Migrateduser
IW's documentation is often lacking, but you could start there by downloading the FormAPI documentation for v5.5.2. Failing that (and it may likely fail you), try reading through posts on the Support site and on DevNet.
Dave
saumil
Hi,
I already gone through the documentation for DCT generation from dtd.
it's not saying anything abt. this issue.
I am also not able to find any relative post on interwoven site.
what should i do to sove this ?
Saumil Shah
Technical Associate
Mahindra and British Telecom
+0919819890479
Migrateduser
Saumil,
I guess at this point you should call Support. But, I'm still not clear on why you insist on the <item name="****" value="yyy"> structure rather than <item name="****"><value>yyy</value></item> ? You say that the latter actually works, so why not implement that?
Dave
saumil
Dave,
as datacapture.cfg having symbol table, if it is storing in normal form then it's not able to show same value while editing.
i have tried by removing
regex entry
from symbol table to recognize normal form, but it's not working.
Saumil Shah
Technical Associate
Mahindra and British Telecom
+0919819890479
saumil
Hi all,
Thanx for your co-operation.
Problem is because of some patches are missing.
Saumil Shah
Technical Associate
Mahindra and British Telecom
+0919819890479