Author: xlawrence
Date: Wed Jun 27 16:20:45 2007
New Revision: 17793

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D17793&repname=
=3Djahia
Log:
backport possibility to declare readonly fields

Modified:
    trunk/core/src/java/org/jahia/taglibs/declarations/DeclareFieldTag.java

Modified: trunk/core/src/java/org/jahia/taglibs/declarations/DeclareFieldTa=
g.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/java/o=
rg/jahia/taglibs/declarations/DeclareFieldTag.java&rev=3D17793&repname=3Dja=
hia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/java/org/jahia/taglibs/declarations/DeclareFieldTag.java=
 (original)
+++ trunk/core/src/java/org/jahia/taglibs/declarations/DeclareFieldTag.java=
 Wed Jun 27 16:20:45 2007
@@ -77,6 +77,7 @@
     private String aliasNames =3D "";
     private float scoreBoost =3D 1.0f;
     private boolean indexableField =3D true;
+    private boolean readOnly =3D false;
 =

     private static final Logger monitorLogger =3D Logger.getLogger(SilentJ=
amonPerformanceMonitorInterceptor.class);
     private Monitor mon;
@@ -88,6 +89,10 @@
      */
 =

 =

+    public void setReadOnly(boolean readOnly) {
+        this.readOnly =3D readOnly;
+    }
+
     /**
      * jsp:attribute name=3D"name" required=3D"true" rtexprvalue=3D"true"
      * description=3D"the name for the field.
@@ -264,7 +269,7 @@
                         }
                         jData.containers().declareField(declareContainerLi=
stTag.
                             getName(), this.name, resolveTitle(),
-                            resolveType(), resolveValue(), aliasNamesAr, t=
his.scoreBoost, this.indexableField);
+                            resolveType(), resolveValue(), aliasNamesAr, t=
his.scoreBoost, this.indexableField, readOnly);
                     } catch (JahiaException je) {
                         logger.error("Field " + this.name +
                                      " was already in container", je);
@@ -285,7 +290,7 @@
                     }
                     jData.fields().declareField(this.name, resolveTitle(),
                                                 resolveType(),
-                                                resolveValue(), aliasNames=
Ar, this.scoreBoost, this.indexableField);
+                                                resolveValue(), aliasNames=
Ar, this.scoreBoost);
                 } catch (JahiaException je) {
                     logger.error(
                         "Error while declaring field attached to page " +
@@ -332,6 +337,7 @@
         titleKey =3D null;
         bundleKey =3D null;
         valueKey =3D null;
+        readOnly =3D false;
 =

         if (mon !=3D null) mon.stop();
 =


_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to