Page 1 of 1

CustomXMLBinding and dropDownList

PostPosted: Tue Oct 19, 2010 8:59 am
by bharat007
Hi Jason,

Thanks for the prompt reply.
I have upgraded the JAXB impl to 2.2.1.
The sample did run successfully.Thanks once again.
However, the output docx file is not correctly rendered.

I am attaching both the input and output docx files.
Instead of displayText, their values are being rendered in the output file.

Could you pls have a look.

Best Regards,
Bharat

CustomXMLBinding and dropDownList

PostPosted: Tue Oct 19, 2010 9:14 am
by jason
I don't understand the problem ..

Your -OUT docx contains customxml

Code: Select all
    <name>INJECTED_BY_CODE</name>

which is reflected in document.xml as


Code: Select all
        <w:sdt>
          <w:sdtPr>
            <w:dataBinding w:prefixMappings="xmlns:ns0='http://schemas.medchart'" w:xpath="/ns0:chart[1]/ns0:personal[1]/ns0:name[1]" w:storeItemID="{DD6E220C-54BC-47B3-8AE8-A0A61D4934FF}"/>
            :
          </w:sdtPr>
          <w:sdtContent>
            <w:tc>
              <w:p>
                <w:r>
                  <w:t>INJECTED_BY_CODE</w:t>
                </w:r>
              </w:p>
            </w:tc>
          </w:sdtContent>
        </w:sdt>


What were you expecting?

Re: NPE in CustomXMLBinding with old JAXB 2.1.2

PostPosted: Tue Oct 19, 2010 6:23 pm
by bharat007
Yes,I can see the value injected by code in the docx out file.
But the displayText for checkboxes is not getting rendered. Instead its values i.e false and previous are being displayed.

Re: NPE in CustomXMLBinding with old JAXB 2.1.2

PostPosted: Tue Oct 19, 2010 11:01 pm
by jason
Thanks for picking that up, I'd forgotten about it.

There is no support at present for w:dropDownList

Code: Select all
                <w:dropDownList w:lastValue="previous">
                  <w:listItem w:displayText="☐" w:value="false"/>
                  <w:listItem w:displayText="(c)" w:value="current"/>
                  <w:listItem w:displayText="☑" w:value="previous"/>
                </w:dropDownList>