Author: manaRH
Date: 2013-04-23 08:35:35 -0400 (Tue, 23 Apr 2013)
New Revision: 15482
Modified:
branches/enterprise/JBPAPP_5_0/src/pdf/org/jboss/seam/pdf/ui/UIField.java
Log:
fixed formatting
Modified: branches/enterprise/JBPAPP_5_0/src/pdf/org/jboss/seam/pdf/ui/UIField.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/pdf/org/jboss/seam/pdf/ui/UIField.java 2013-04-23
07:58:24 UTC (rev 15481)
+++ branches/enterprise/JBPAPP_5_0/src/pdf/org/jboss/seam/pdf/ui/UIField.java 2013-04-23
12:35:35 UTC (rev 15482)
@@ -31,27 +31,36 @@
AcroFields fields = (AcroFields) Contexts.getEventContext().get(FIELDS_KEY);
String theName = getName();
Object theValue = getValue();
- if (theValue == null) {
- return;
+ if (theValue == null)
+ {
+ return;
}
Boolean readOnly = getReadOnly();
try
{
log.debug("Setting field '#0' to value '#1'", theName,
theValue);
boolean success = false;
- if (theValue instanceof String) {
- success = fields.setField(theName, (String) theValue);
- } else if (theValue instanceof String[]){
- String[] stringValue = (String[])theValue;
- if (stringValue.length>0) {
- success = fields.setField(theName, stringValue[0]);
- } else {
- success = true;
- }
- } else {
- String message = Interpolator.instance().interpolate("Field #0 expected
String or String[] but got #0", getName(), theValue.getClass().getName());
- throw new IllegalArgumentException(message);
+ if (theValue instanceof String)
+ {
+ success = fields.setField(theName, (String) theValue);
}
+ else if (theValue instanceof String[])
+ {
+ String[] stringValue = (String[]) theValue;
+ if (stringValue.length > 0)
+ {
+ success = fields.setField(theName, stringValue[0]);
+ }
+ else
+ {
+ success = true;
+ }
+ }
+ else
+ {
+ String message = Interpolator.instance().interpolate("Field #0 expected
String or String[] but got #0", getName(), theValue.getClass().getName());
+ throw new IllegalArgumentException(message);
+ }
if (!success)
{
warnNotFound(fields, theName, theValue);
@@ -129,6 +138,5 @@
{
this.readOnly = readOnly;
}
-
}