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)
bug, feature or JimmyFat losing it?
System
iwserver: 5.5.2 Build 17976 Interwoven 20030323
I have reduced my current problem to the following DCT code:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE data-capture-requirements SYSTEM "datacapture5.0.dtd">
<data-capture-requirements type="content" name="admin-records">
<ruleset name="admin-records">
<container name="container">
<item name="replicant">
<replicant default="2" min="2" max="100">
<item name="id">
<text required="t" size="60" />
</item>
</replicant>
</item>
</container>
<script language="javascript" location="webserver" src="/iw/formapi/admin/records.js"/>
</ruleset>
</data-capture-requirements>
I want to get the replicant item and be able to call getName on it to assemble other XPaths. The FormAPI:
var field = '/container/replicant';
var rep = IWDatacapture.getItem( field );
if ( rep != null )
{
alert( field + ' = ' + rep.getName());
alert( rep.getType());
}
I would expect the first alert to show me '/container/replicant = /container/replicant', but what I get is '/container/replicant = /container'. Since it's giving me the container instead of the replicant I would expect it to the second alert to show me the container's type, but it shows me andreplicant. So I think the getItem is giving me the replicant, but getName on this replicant item gives me the wrong value.
I'm sure I've used code like this before and had it working but I can't find my problem in this code. Can someone load this and see if they get similar results?
Find more posts tagged with
Comments
JonathonG
Well, I think I can eliminate the "JimmyFat losing it" option from the subject line. I tried the same thing and got the exact same results. There doesn't seem to be a way to programmatically get the XPath to the parent replicant item. I even tried taking it out of the container, but a getItem on "/replicant" returns null. Here's a workaround:
var field = '/container/replicant';
var rep = IWDatacapture.getItem( field );
if ( rep != null )
{
alert( field + ' = ' + rep.getName());
alert( rep.getType());
var firstChildAddr = rep.getChildren()[0].getName();
alert (firstChildAddr);
var repName = firstChildAddr.replace(/\[.*$/, "");
alert (repName);
}
HTH,
Jonathon
Independent Interwoven Contractor
Migrateduser
Great, I think that confirms a bug, but I still think I'm losing it.
I would compare working with this product to walking through a minefield or getting a Ph.D. in entomology (seems like I find multiple bugs every day).
JonathonG
>
Great, I think that confirms a bug, but I still think I'm losing it.
Well, lacking a Ph.D. in Psychology/Psychiatry, I can't give a comment about that
>
...seems like I find multiple bugs every day
Interestingly, I rarely run across bona fide bugs in the product. I occasionally run across a feature that isn't there that I would like, but an actual failure to operate (like this one) is rare for me. I'm not sure why that is, maybe I just think like an IWOV engineer (is that a scary thought?)
On another topic, I'm not sure why I made this post...maybe smitty and nipper are getting to me with their frivolous posts to increase their standing.
Jonathon
Independent Interwoven Contractor
Migrateduser
I think I push the envelope - I'm pretty bored with the standard Interwoven implementation so I try to do fun stuff with FormAPI, etc. that maybe hasn't been attempted (though it should be supported). I think if you stick with tried and true stuff you are much less likely to uncover bugs. I guess I should step back from the bleeding edge.
JonathonG
<font color="blue">>I guess I should step back from the bleeding edge.</font>
Nah...not if you don't mind getting cut up a bit
Seriously, though, its users like you that drive the product to be better, so keep up the good work!
Jonathon
Independent Interwoven Contractor
Migrateduser
Who are you calling a user?
JonathonG
From The Free On-line Dictionary of Computing, © 1993-2003 Denis Howe (
http://www.foldoc.org/
)
user:
2. <jargon> Any person, organisation, process, device,
program, protocol, or system which uses a service provided
by others.
So, in that sense, I was calling *you* a user.
Jonathon
Independent Interwoven Contractor
Edited by JonathonG on 06/03/04 01:21 PM (server time).