Description
[imported from SourceForge]
http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1178668
Originally submitted by mystikspiral on 2005-04-07 09:23.
If there is a hierarchical series of PDRadioCollections,
the list cannot be processed past the first instance of
PDRadioCollection. This is due to the fact that that the
getKids() method of PDRadioCollection is hard-coded to
return a List of PDCheckbox objects.
Simplified Example (See attached File):
Applicant.Coverage (Coverage is a PDRadioCollection)
Applicant.Coverage.Medical (Medical is a
PDRadioCollection)
Applicant.Coverage.Dental (Dental is a
PDRadioCollection)
PDRadioCollection Coverage = theForm.getField
("Applicant.Coverage");
List kids = Coverage.getKids();
...iterate kids....
if(kid_1 instanceof PDRadioCollection){
//this should be true
}
else if(kid_1 instanceof PDField){ {
//instead, we go here because the List contains
PDCheckbox objects.
}
[attachment on SourceForge]
http://sourceforge.net/tracker/download.php?group_id=78314&atid=552832&aid=1178668&file_id=128963
PDRadioCollection.java (java/*), 5833 bytes
Modified PDRadioCollection.java that fixes nested Radio Button objects.
[comment on SourceForge]
Originally sent by benlitchfield.
Logged In: YES
user_id=601708
I don't see the PDF on the FTP site, can you try to upload it
again, thanks.
Ben
[comment on SourceForge]
Originally sent by mystikspiral.
Logged In: YES
user_id=1245859
I have resolved this issue, at least in so far as my
requirements dictated. Instead of returning a List od
PDCheckbox objects, the PDFieldFactory is now used to
create the appropriate field in the lsit. I am attaching
PDRadioCollection.java for your review. I hope you can use
this to close this issue with little to no effort on your end.
Note the modified version of PDRadioCollection.java is taken
from a slightly old nightly build, PDFBox-0.7.1-dev-20050328.
Thanks.
[comment on SourceForge]
Originally sent by mystikspiral.
Logged In: YES
user_id=1245859
Uploading file to ftp.pdfbox.org
called "Nested_PDRadioCollections.pdf" because the upload
as an attachment to this report failed beacause the size
restrictions were exceeded.
Sorry for any confusion.