Author: simoneg
Date: Mon Dec 14 17:17:22 2009
New Revision: 890406

URL: http://svn.apache.org/viewvc?rev=890406&view=rev
Log:
Title on list cruds

Modified:
    
labs/magma/trunk/website-administration/src/main/java/org/apache/magma/website/admin/AbstractListCrud.java

Modified: 
labs/magma/trunk/website-administration/src/main/java/org/apache/magma/website/admin/AbstractListCrud.java
URL: 
http://svn.apache.org/viewvc/labs/magma/trunk/website-administration/src/main/java/org/apache/magma/website/admin/AbstractListCrud.java?rev=890406&r1=890405&r2=890406&view=diff
==============================================================================
--- 
labs/magma/trunk/website-administration/src/main/java/org/apache/magma/website/admin/AbstractListCrud.java
 (original)
+++ 
labs/magma/trunk/website-administration/src/main/java/org/apache/magma/website/admin/AbstractListCrud.java
 Mon Dec 14 17:17:22 2009
@@ -43,6 +43,9 @@
                        listlink = "doShowSub";
                }
                ShowList sl = new ShowList(property.getCollectionClass(), 
(Collection)bean.handler().getValue(propertyName), listlink);
+               sl.compoundWith(
+                               new StringHtmlProducer("<h1>" + new 
LocalizableString("List of {0}", 
property.getCollectionClass().getSimpleName()).toString() + "</h1>")
+                               , CompoundType.HEAD);           
                sl.addAction(new FormAction("Delete", "doDelete"));
                if (isOverridden(AbstractListCrud.class, "handleNew")) {
                        sl.compoundWith(handleNew().do_default(), 
CompoundType.AFTER);                  
@@ -53,8 +56,12 @@
                return sl;
        }
        
-       public HtmlProducer doShowSub(SubBean bean) {
-               return new ShowBean(bean);
+       public HtmlProducer doShowSub(SubBean bean) {           
+               ShowBean ret = new ShowBean(bean);
+               ret.compoundWith(
+                               new StringHtmlProducer("<h1>" + new 
LocalizableString("Display {0}", 
property.getCollectionClass().getSimpleName()).toString() + "</h1>")
+                               , CompoundType.HEAD);           
+               return ret;
        }
        
        public HtmlProducer doNewSub() {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to