Author: xlawrence
Date: Fri Jun  1 12:27:39 2007
New Revision: 692

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D692&repname=
=3Dcorporate_portal_templates_v2
Log:
set encoding to UTF-8
fix delete problem of the form generator
use localization for default value of the submit button

Modified:
    branches/JAHIA-5-0-SP-BRANCH/src/jsp/common/top.inc
    branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/display_form.inc
    branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/eventlistener.inc
    branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/process_post.inc

Modified: branches/JAHIA-5-0-SP-BRANCH/src/jsp/common/top.inc
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/src/jsp/common/top.inc&rev=3D692&repname=3Dcorporate_portal_templat=
es_v2
=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
--- branches/JAHIA-5-0-SP-BRANCH/src/jsp/common/top.inc (original)
+++ branches/JAHIA-5-0-SP-BRANCH/src/jsp/common/top.inc Fri Jun  1 12:27:39=
 2007
@@ -71,7 +71,7 @@
 %>
 <content:JSTools/>
 <title><bean:write name=3D"currentPage" property=3D"title" filter=3D"false=
"/></title>
-<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859=
-1" />
+<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8" />
 <%
     String metadatakeywords =3D jParams.getContentPage().getMetadataValue(=
"keywords", jParams, "").trim();
     String metadatadescription =3D jParams.getContentPage().getMetadataVal=
ue("description", jParams, "").trim();

Modified: branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/display_form.=
inc
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/src/jsp/form_generator/display_form.inc&rev=3D692&repname=3Dcorpora=
te_portal_templates_v2
=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
--- branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/display_form.inc (o=
riginal)
+++ branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/display_form.inc Fr=
i Jun  1 12:27:39 2007
@@ -19,7 +19,13 @@
 =

 if (forHasBeenPosted && emptyMandatoryFields.isEmpty()) {
     %>
-    <%=3DdisplayTextAfterPostValue%>
+    <%=3DdisplayTextAfterPostValue%><br />
+    <% if (isEditMode) { %>
+    <a href=3D"<%=3DjParams.composePageUrl(jParams.getPageID(), jParams.ge=
tLocale().toString())%>">
+               -> <content:resourceBundle 
resourceBundle=3D"jahiatemplates.Corporat=
e_portal_templates_v2"
+                    resourceName=3D"back"/>
+    </a>                =

+    <% } %>    =

     <%
 } else {               =

     if (forms !=3D null) {
@@ -123,7 +129,7 @@
                     Enumeration fieldsEnum =3D null;
 =

                     %>
-                    <form method=3D"post" action=3D"<%=3DbypassUrl%>"
+                    <form method=3D"post" action=3D"<%=3DbypassUrl%>" acce=
pt-charset=3D"UTF-8"
                             name=3D"submitToContainerList" id=3D"form_<%=
=3Dform.getID()%>">
                     <input type=3D"hidden" name=3D"formId" value=3D"<%=3Df=
orm.getID()%>"/>
                     <%
@@ -315,12 +321,14 @@
                                        }
 =

                                 } else if (ResourceBundleMarker.drawMarker=
(resBundleID,"submitButton","").equals(type)) {
-                                    if ("".equals(defaultValue)){
-                                        defaultValue =3D "Submit";
-                                    }
                                     %>
                                     <input type=3D"submit" name=3D"field_<=
%=3DcurrentField.getID()%>"
+                                               <% if ("".equals(defaultValue)) 
{ %>
+                                               
value=3D"<content:resourceBundle =
resourceBundle=3D"jahiatemplates.Corporate_portal_templates_v2"
+                                                                               
                                                resourceName=3D"poll.submit"/>"
+                                        <% } else { %>
                                         value=3D"<%=3DdefaultValue%>"/>
+                                       <% } %>
                                     <%
                                 } else {
                                     if (formIdStr !=3D null) {

Modified: branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/eventlistener=
.inc
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/src/jsp/form_generator/eventlistener.inc&rev=3D692&repname=3Dcorpor=
ate_portal_templates_v2
=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
--- branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/eventlistener.inc (=
original)
+++ branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/eventlistener.inc F=
ri Jun  1 12:27:39 2007
@@ -39,22 +39,18 @@
        }
                }
 } else if ( "textValues".equals(theContainer.getDefinition().getName()) || =

-                                               
"fileValues".equals(theContainer.getDefinition().getName())     ){ =

-                                       =

+                                               
"fileValues".equals(theContainer.getDefinition().getName())     ){              
                =

                if ( "containerDeleted".equals(eventName)) {
-                               logger.fatal("deletedddddddddddddddddddddddd: " 
+ theContainer.getDefi=
nition().getName());
                                final String id =3D 
theContainer.getFieldValue("id", "");       =

-                               logger.fatal("ididid: " + id);
                                final org.jahia.services.cache.HtmlCache 
htmlCache =3D ServicesRegistr=
y.getInstance().getCacheService().getHtmlCacheInstance(); =

                                if (id !=3D null && id.length() > 0) {
-                                               final 
org.jahia.services.search.ContainerSearcher theTextSearcher =
=3D new org.jahia.services.search.ContainerSearcher("textValues",
-                                                       jParams, id, 
jParams.getEntryLoadRequest());    =

+                                               final 
org.jahia.services.search.ContainerSearcher theTextSearcher =
=3D new org.jahia.services.search.ContainerSearcher(
+                                                                               
jParams.getSiteID(), "textValues", id, jParams.getEntryLoadReque=
st());  =

                        final org.jahia.data.search.JahiaSearchResult result1 
=3D theTex=
tSearcher.search(id, jParams);          =

                        final Iterator ite =3D result1.results().iterator();
                        while (ite.hasNext()) {
                                        final 
org.jahia.data.search.JahiaSearchHit hit =3D (org.jahia.=
data.search.JahiaSearchHit) ite.next();
                                        final int ctnId =3D 
Integer.parseInt(hit.getId());
-                                       =

                                        final ContentContainer contentContainer 
=3D ContentContainer.g=
etContainer(ctnId);
 =

                 // we only need to remove the shared language since this w=
ill
@@ -71,8 +67,8 @@
                         stateModifContext);            =

                        }                                       =

                                                         =

-                       final org.jahia.services.search.ContainerSearcher 
theFileSearche=
r =3D new org.jahia.services.search.ContainerSearcher("fileValues",
-                                                       jParams, id, 
jParams.getEntryLoadRequest());            =

+                                               final 
org.jahia.services.search.ContainerSearcher theFileSearcher =
=3D new org.jahia.services.search.ContainerSearcher(
+                                                                               
jParams.getSiteID(), "fileValues", id, jParams.getEntryLoadReque=
st());  =

                        final org.jahia.data.search.JahiaSearchResult result2 
=3D theFil=
eSearcher.search(id, jParams);  =

                        final Iterator ite2 =3D result2.results().iterator();
                        while (ite2.hasNext()) {
@@ -95,7 +91,7 @@
                         stateModifContext);            =

                        }       =

                        if (htmlCache !=3D null) {
-                       
htmlCache.invalidatePageEntries(String.valueOf(jParams.getPa=
geID()), EntryLoadRequest.STAGING_WORKFLOW_STATE);              =

+                       
htmlCache.invalidatePageEntries(String.valueOf(jParams.getPa=
geID()));               =

             }                                  =

        }                                                                       
                                                                =

                } =


Modified: branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/process_post.=
inc
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/src/jsp/form_generator/process_post.inc&rev=3D692&repname=3Dcorpora=
te_portal_templates_v2
=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
--- branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/process_post.inc (o=
riginal)
+++ branches/JAHIA-5-0-SP-BRANCH/src/jsp/form_generator/process_post.inc Fr=
i Jun  1 12:27:39 2007
@@ -148,7 +148,7 @@
                         jData.getProcessingContext().setParameterMap(map);
                 %>
                 <content:formContentMapperHandler listName=3D'storePostedF=
ormBean'
-                            submitMarker=3D"formId" immediatePublication=
=3D"<%=3DshowPostedValues%>"/>
+                            submitMarker=3D"formId" immediatePublication=
=3D"true"/>
                 <%
                         jData.getProcessingContext().setParameterMap(oldMa=
p);
                     }

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

Reply via email to