Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
JSP - A mailing list about Java Server Pages specification and reference
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Best way to determine if an existing form field has the multil

Best way to determine if an existing form field has the multil

2006-07-20       - By Malloy, James

 Back
I have a process that fills forms. I want to do a specific action if a
form field is multiline. What is the best way to determine if the field
is multiline?

Previously I have done:
com.lowagie.text.pdf.AcroFields Source code of com.lowagie.text.pdf.AcroFields item = form.getFieldItem(field);

PdfDictionary dict = (PdfDictionary) item.merged.get(0);

Object multiline = dict.get(PdfName.FF);

if (multiline == null) {

   //Do something

}



This no long seems to work as I intended because fields that do not have
the multiline property checked return an integer value rather than a
null like it used to. it seems like I am missing something and there
should be an easier way.



I am using the latest version of Itext on JDK 1.3.1_10


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
This e-mail transmission may contain information that is proprietary,
privileged and/or confidential and is intended exclusively for the person(s) to
whom it is addressed. Any use, copying, retention or disclosure by any person
other than the intended recipient or the intended recipient's designees is
strictly prohibited. If you are not the intended recipient or their designee,
please notify the sender immediately by return e-mail and delete all copies.

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial><SPAN class=641342415-20072006>I have a process that
fills
forms. I want to do a specific action if a form field is multiline. What is the
best way to determine if the field is multiline?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=641342415-20072006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=641342415-20072006>Previously I have
done:</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=641342415-20072006>
<P align=left><FONT face=Arial size=3>com.lowagie.text.pdf.AcroFields Source code of com.lowagie.text.pdf.AcroFields item
= form.getFieldItem(field);</FONT></P>
<P align=left><FONT size=3><FONT face=Arial>PdfDictionary dict = (PdfDictionary
)
item.</FONT><FONT face=Arial color=#0000c0>merged</FONT><FONT
face=Arial>.get(0);</FONT></FONT></P>
<P align=left><FONT size=3><FONT face=Arial>Object multiline =
dict.get(PdfName.</FONT><I><FONT color=#0000c0><FONT
face=Arial>FF</FONT></I></FONT></FONT><FONT face=Arial size=3>);</FONT></P>
<P align=left><B><FONT color=#7f0055><FONT face=Arial
size=3>if</FONT></B></FONT><FONT face=Arial><FONT size=3> (multiline == <B>
<FONT
color=#7f0055>null</B></FONT></FONT></FONT><FONT face=Arial size=3>)
{</FONT></P>
<P align=left><FONT face=Arial><SPAN class=641342415-20072006>&nbsp;&nbsp;&nbsp
;
//Do something</SPAN></FONT></P>
<P><FONT face=Arial size=3>}</FONT></P>
<P><FONT face=Arial size=3></FONT>&nbsp;</P>
<P><SPAN class=641342415-20072006><FONT face=Arial size=3>This no long seems to
work as I intended because fields that do not have the multiline property
checked return an integer value rather than a null like it used to. it seems
like I am missing something and there should be an easier way.</FONT></SPAN></P>
<P><SPAN class=641342415-20072006><FONT face=Arial
size=3></FONT></SPAN>&nbsp;</P>
<P><SPAN class=641342415-20072006><FONT face=Arial size=3>I am using the latest
version of Itext on JDK
1.3.1_10</FONT></SPAN></P></SPAN></FONT></DIV>
<P>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----<br>
This e-mail transmission may contain information that is proprietary,
privileged and/or confidential and is intended exclusively for the person(s) to
whom it is addressed. Any use, copying, retention or disclosure by any person
other than the intended recipient or the intended recipient's designees is
strictly prohibited. If you are not the intended recipient or their designee,
please notify the sender immediately by return e-mail and delete all copies.
<br>
<br>
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----<br>
</P></BODY></HTML>

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions

©2008 junlu.com - Jax Systems, LLC, U.S.A.