Does your plugin have the JavaScript file that’s being requested? You can check for it with something like this:
jar tf plugin-1.0.jar | grep -E '.*\.js$'
I just ran this on the stroke scale plugin jar:
$ jar tf build/libs/xnatx-nihss-plugin-1.1.1-SNAPSHOT-xpl.jar | grep -E '\.js$'
META-INF/resources/scripts/generated/xnatx_nihStrokeScaleData.js
If that’s not in there then something’s going wrong with your plugin build.
--
Rick Herrick
XNAT Architect/Developer
Computational Imaging Laboratory
Washington University School of Medicine
From:
xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Sarah Hong <sarah...@gmail.com>
Date: Thursday, September 16, 2021 at 2:23 PM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] Cannot edit assessor
|
* External Email - Caution * |
--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
xnat_discussi...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/xnat_discussion/5175450f-e893-42c0-adb6-db3bcbf3b8a3n%40googlegroups.com.
The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.
Could you send me the XSD file for your datatype/plugin?
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/77e3b9a9-480b-44c9-a627-e8bcaa06cdc0n%40googlegroups.com.
I think the issue is that XNAT is trying to figure out how to identify and access the objects created by your embedded complex types, which is further complicated by the fact that you have multiple types with the same names, tisData and imgData (each is subordinate to the containing data type, but XNAT might still have trouble disambiguating them).
I can suggest a couple things to try.
First, your imgData and tisData element definitions all look like this:
<xs:element name="imgData" minOccurs="0" maxOccurs="unbounded">
Are these really unbounded, i.e. can you have multiple imgData objects per SegCat12Data instance? If not, remove the maxOccurs attribute. Unbounded elements can cause some weird issues and even when working properly are more difficult to work with than single elements.
Secondly, these elements don’t have a defined relationship to their containing element. Compare irisqa:SegCat12Data/qcSession/imgData to something like xnat:projectData/aliases/alias:
<xs:element name="aliases" minOccurs="0">
<xs:complexType>
<xs:sequence minOccurs="0">
<xs:element name="alias" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<xdat:element displayIdentifiers="alias"/>
<xdat:field uniqueComposite="VALUE">
<xdat:relation uniqueComposite="VALUE"/>
</xdat:field>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="source" type="xs:string" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
That highlighted bit causes XNAT to set up a unique composite between the value of alias and the project ID. There are a few other ways of configuring these kinds of relationships. For example, xnat:projectData/fields/field is similar, but there are a lot of others.
You may also want to look at xnat:qcManualAssessorData/scans, which is unbounded and references a complex type but doesn’t require a corresponding JavaScript file for those subordinate objects.
--
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
Phone: +1 (314) 273-1645
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/b107a2c8-2b1a-46cf-923b-5e04e2145b75n%40googlegroups.com.
Thank you for reply, Rick!
I have tried both of them, and I have some improvements.The problem I'm facing now is that the datatype does not create "tissue" in js file.I have a datatype called SegCat12data. The element tissue is located under SegCat12data > qcSession > tisData > tissue.I found that editing the assessor without the element tissue does not cause error any longer. In other words, any other element in SegCat12 including tisData or imgData works fine now.However, when I send the xml file with tissue element, I can only view the report, but not able to edit it with the error:SAXEventHandler-min.js:300 Uncaught ReferenceError: SAXException is not definedat SAXEventHandler.startElement (SAXEventHandler-min.js:300)at SAXDriver._fireEvent (xmlsax-min.js:765)at SAXDriver._parseLoop (xmlsax-min.js:783)at SAXDriver.parse (xmlsax-min.js:633)at verifyExptId (xnat_edit_experimentData.js:57)at validateExperimentForm (xnat_edit_experimentData.js:191)at validateForm (test:6074)at HTMLInputElement.onclick (test:6063)I'm not sure if it's relevant, but I found that the js file created in /build/xnat-generated/src/main/resources/META-INF/resources/scripts/generated/irisqa_SegCat12Data.js does not have any "tissue" element.I attached new schema file, js file created (please add .js extension to the file), and xml file for reference. Also, I use XNAT 1.8.2.2.Please advise.Thanks,