|
From: Chad B. <cwb...@us...> - 2007-07-05 17:09:23
|
User: cwbrandon
Date: 07/07/05 10:09:25
Modified: andromda-jsf2/src/main/resources/templates/jsf2/views/jsp
view.jsp.vsl
andromda-jsf2/src/main/resources/templates/jsf2/views/facelets
view-action.xhtml.vsl view-table.xhtml.vsl
view-variables.xhtml.vsl login.xhtml.vsl
view-hidden-parameters.xhtml.vsl view.xhtml.vsl
andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/layout
layout.xhtml.vsl
andromda-jsf2/src/main/resources/META-INF/andromda
cartridge.xml
andromda-jsf2/src/main/resources/templates/jsf2/views/jsp/includes
view-action.jspf.vsl
andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/crud
view.xhtml.vsl
andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/preferences
preferences.xhtml.vsl
Removed: andromda-jsf2/src/main/resources/resources/configuration/facelets
andromda.taglib.xml tomahawk.taglib.xml
Log:
Fix javascript validation, get rid of use of subform for normal forms (since it doesn't allow the attributes necessary for js validation). Minor cleanup
Revision Changes Path
1.3 +5 -5 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/jsp/view.jsp.vsl
Index: view.jsp.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/jsp/view.jsp.vsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- view.jsp.vsl 11 Dec 2006 13:44:00 -0000 1.2
+++ view.jsp.vsl 5 Jul 2007 17:09:21 -0000 1.3
@@ -7,7 +7,7 @@
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:xm="http://java.sun.com/jsp/jstl/xml"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
- xmlns:a="http://www.andromda.org/cartridges/jsf2"
+ xmlns:a="http://www.andromda.org/cartridges/jsf"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
xmlns:tr="http://myfaces.apache.org/trinidad">
<jsp:directive.page contentType="text/html;charset=utf-8"/>
1.3 +5 -5 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/view-action.xhtml.vsl
Index: view-action.xhtml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/view-action.xhtml.vsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- view-action.xhtml.vsl 3 Jul 2007 17:28:44 -0000 1.2
+++ view-action.xhtml.vsl 5 Jul 2007 17:09:21 -0000 1.3
@@ -4,12 +4,12 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:t="http://myfaces.apache.org/tomahawk"
- xmlns:a="http://www.andromda.org/cartridges/jsf2"
+ xmlns:a="http://www.andromda.org/cartridges/jsf"
xmlns:tr="http://myfaces.apache.org/trinidad">
<ui:composition>
#set($formName = $action.formBeanName)
#if ($action.hyperlink || $action.popup)
-<tr:subform>
+<tr:form>
#if ($action.hyperlink)
<tr:commandLink action="#{${action.controller.beanName}.${action.triggerName}}">
#else
@@ -29,12 +29,12 @@
#else
</a:popup>
#end
-</tr:subform>
+</tr:form>
<br/><br/>
#else
#set ($clientValidation = $clientValidation && $action.validationRequired)
#set ($formValidateName = "validate$stringUtils.capitalize($formName)")
-<tr:subform id="$formName"#if($clientValidation) onsubmit="return $formValidateName(this);"#end>
+<tr:form id="$formName"#if($clientValidation) onsubmit="return $formValidateName(this);"#end#if($view.needsFileUpload) usesUpload="true"#end>
#if (!$action.hiddenParameters.empty)
<ui:include src="${action.viewFragmentPath}-hidden-params.xhtml"/>
#end
@@ -58,7 +58,7 @@
</f:facet>
</tr:panelFormLayout>
<a:validator#if(!$clientValidation) client="false"#end/>
-</tr:subform>
+</tr:form>
#end
</ui:composition>
</html>
1.2 +3 -3 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/view-table.xhtml.vsl
Index: view-table.xhtml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/view-table.xhtml.vsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- view-table.xhtml.vsl 5 Dec 2006 19:39:14 -0000 1.1
+++ view-table.xhtml.vsl 5 Jul 2007 17:09:21 -0000 1.2
@@ -17,10 +17,10 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:t="http://myfaces.apache.org/tomahawk"
- xmlns:a="http://www.andromda.org/cartridges/jsf2"
+ xmlns:a="http://www.andromda.org/cartridges/jsf"
xmlns:tr="http://myfaces.apache.org/trinidad">
<ui:composition>
-<tr:subform>
+<tr:form>
#set ($targetColumns = $table.targettedTableColumnNames)
<tr:table allDetailsEnabled="true" var="row" rowBandingInterval="1" value="#{${table.name}}" rows="#{${preferencesBeanName}.maxTableRows}" width="90%">
#if (!$table.tableColumns.empty)
@@ -97,6 +97,6 @@
#end
#end
</tr:table>
-</tr:subform>
+</tr:form>
</ui:composition>
</html>
1.2 +1 -1 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/view-variables.xhtml.vsl
Index: view-variables.xhtml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/view-variables.xhtml.vsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- view-variables.xhtml.vsl 5 Dec 2006 19:39:14 -0000 1.1
+++ view-variables.xhtml.vsl 5 Jul 2007 17:09:21 -0000 1.2
@@ -2,7 +2,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jstl/core"
- xmlns:a="http://www.andromda.org/cartridges/jsf2"
+ xmlns:a="http://www.andromda.org/cartridges/jsf"
xmlns:tr="http://myfaces.apache.org/trinidad">
<ui:composition>
<h:panelGrid columns="2" columnClasses="variableLabel,variableText">
1.4 +7 -7 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/login.xhtml.vsl
Index: login.xhtml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/login.xhtml.vsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- login.xhtml.vsl 30 Dec 2006 19:00:20 -0000 1.3
+++ login.xhtml.vsl 5 Jul 2007 17:09:21 -0000 1.4
@@ -60,12 +60,12 @@
<tr>
<td colspan="2"/>
<td>
- <tr:subform>
+ <tr:form>
<tr:panelButtonBar>
<tr:commandButton text="#{messages['login.submit']}" onclick="document.forms[0].submit();"/>
<tr:commandButton text="#{messages['login.reset']}" onclick="document.forms[0].reset();"/>
</tr:panelButtonBar>
- </tr:subform>
+ </tr:form>
</td>
</tr>
#if (!$registrationUseCases.empty)
1.2 +1 -1 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/view-hidden-parameters.xhtml.vsl
Index: view-hidden-parameters.xhtml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/view-hidden-parameters.xhtml.vsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- view-hidden-parameters.xhtml.vsl 5 Dec 2006 19:39:14 -0000 1.1
+++ view-hidden-parameters.xhtml.vsl 5 Jul 2007 17:09:22 -0000 1.2
@@ -18,7 +18,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:a="http://www.andromda.org/cartridges/jsf2">
+ xmlns:a="http://www.andromda.org/cartridges/jsf">
<ui:composition>
##
## This xhtml composition stores all hidden parameters for an action.
1.4 +0 -3 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/view.xhtml.vsl
Index: view.xhtml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/view.xhtml.vsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- view.xhtml.vsl 3 Jul 2007 17:13:22 -0000 1.3
+++ view.xhtml.vsl 5 Jul 2007 17:09:22 -0000 1.4
@@ -10,9 +10,6 @@
#set ($layout = "/layout/layout.xhtml")
#end
<ui:composition template="$layout">
- <ui:define name="usesUpload">
- <c:set var="usesUpload" value="${view.needsFileUpload}" scope="request"/>
- </ui:define>
<ui:define name="title">
<c:set var="title" value="#{messages['${view.titleKey}']}" scope="request"/>
</ui:define>
1.9 +59 -48 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/layout/layout.xhtml.vsl
Index: layout.xhtml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/layout/layout.xhtml.vsl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -r1.8 -r1.9
--- layout.xhtml.vsl 3 Jul 2007 17:15:32 -0000 1.8
+++ layout.xhtml.vsl 5 Jul 2007 17:09:23 -0000 1.9
@@ -13,8 +13,6 @@
</ui:insert>
<c:set var="remoteUser" value="${facesContext.externalContext.request.userPrincipal.name}" scope="request"/>
<trh:body>
- <ui:insert name="usesUpload"/>
- <tr:form usesUpload="#{usesUpload}">
<ui:insert name="title"/>
<tr:panelPage>
<f:facet name="branding">
@@ -35,64 +33,78 @@
#end
#if ($navigationStyle.equals("full"))
<f:facet name="navigation1">
+ <tr:form>
<tr:navigationPane hint="tabs" level="0" var="item" value="#{menuModel.model}">
<f:facet name="nodeStamp">
<tr:commandNavigationItem text="#{messages[item.label]}" action="#{item.getAction}"/>
</f:facet>
</tr:navigationPane>
+ </tr:form>
</f:facet>
<f:facet name="navigation2">
+ <tr:form>
<tr:navigationPane hint="bar" level="1" var="item" value="#{menuModel.model}">
<f:facet name="nodeStamp">
<tr:commandNavigationItem text="#{messages[item.label]}" action="#{item.getAction}"/>
</f:facet>
</tr:navigationPane>
+ </tr:form>
</f:facet>
<f:facet name="navigation3">
+ <tr:form>
<tr:navigationPane hint="list" level="2" var="item" value="#{menuModel.model}">
<f:facet name="nodeStamp">
<tr:commandNavigationItem text="#{messages[item.label]}" action="#{item.getAction}"/>
</f:facet>
</tr:navigationPane>
+ </tr:form>
</f:facet>
#end
#if ($navigationStyle.equals("sidebar"))
<f:facet name="navigation3">
+ <tr:form>
<tr:navigationTree var="item" value="#{menuModel.model}">
<f:facet name="nodeStamp">
<tr:commandNavigationItem text="#{messages[item.label]}" action="#{item.getAction}"/>
</f:facet>
</tr:navigationTree>
+ </tr:form>
</f:facet>
#end
<f:facet name="navigationGlobal">
+ <tr:form>
<tr:navigationPane hint="buttons">
<tr:commandNavigationItem text="#{messages['menu.preferences']}" action="preferences"/>
#if ($stringUtils.isNotBlank($securityRealm))
- <c:if test="${!empty remoteUser}">
- <tr:commandNavigationItem text="#{messages['logout.action']}" action="logout"/>
- </c:if>
+ <tr:commandNavigationItem text="#{messages['logout.action']}" action="logout" rendered="#{!empty remoteUser}"/>
#end
</tr:navigationPane>
+ </tr:form>
</f:facet>
##using breadcrumbs ?
## <f:facet name="location">
+## <tr:form>
## <tr:breadCrumbs var="item" value="#{menuModel.model}">
## <f:facet name="nodeStamp">
## <tr:commandNavigationItem text="#{messages[item.label]}" action="#{item.getAction}"/>
## </f:facet>
## </tr:breadCrumbs>
+## </tr:form>
## </f:facet>
<f:facet name="appCopyright">
+ <tr:form>
<ui:insert name="footer">
<ui:include src="footer.xhtml"/>
</ui:insert>
+ </tr:form>
</f:facet>
## using return ? don't forget to remove the return.xhtml
## <f:facet name="infoReturn">
+## <tr:form>
## <ui:insert name="return">
## <ui:include src="return.xhtml"/>
## </ui:insert>
+## </tr:form>
## </f:facet>
<div id="pageContent">
<tr:panelHeader text="#{title}">
@@ -100,6 +112,5 @@
</tr:panelHeader>
</div>
</tr:panelPage>
- </tr:form>
</trh:body>
</html>
1.5 +96 -104 cartridges/andromda-jsf2/src/main/resources/META-INF/andromda/cartridge.xml
Index: cartridge.xml
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/META-INF/andromda/cartridge.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -r1.4 -r1.5
--- cartridge.xml 20 Feb 2007 10:10:32 -0000 1.4
+++ cartridge.xml 5 Jul 2007 17:09:24 -0000 1.5
@@ -153,14 +153,6 @@
lastModifiedCheck="true"/>
<resource
- path="resources/configuration/facelets/*.xml"
- outputPattern="WEB-INF/{0}"
- outlet="configuration"
- overwrite="true"
- outputCondition="viewTypeIsFacelets"
- lastModifiedCheck="true"/>
-
- <resource
path="resources/configuration/adf/*.xml"
outputPattern="WEB-INF/{0}"
outlet="configuration"
1.3 +1 -1 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/jsp/includes/view-action.jspf.vsl
Index: view-action.jspf.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/jsp/includes/view-action.jspf.vsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- view-action.jspf.vsl 3 Jul 2007 17:28:44 -0000 1.2
+++ view-action.jspf.vsl 5 Jul 2007 17:09:24 -0000 1.3
@@ -24,7 +24,7 @@
#else
#set ($clientValidation = $clientValidation && $action.validationRequired)
#set ($formValidateName = "validate$stringUtils.capitalize($formName)")
-<h:form id="$formName"#if($clientValidation) onsubmit="return $formValidateName(this);"#end>
+<h:form id="$formName"#if($clientValidation) onsubmit="return $formValidateName(this);"#end#if($view.needsFileUpload) usesUpload="true"#end>
#if (!$action.hiddenParameters.empty)
<jsp:directive.include file="${action.viewFragmentPath}-hidden-params.jspf"/>
#end
1.8 +14 -17 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/crud/view.xhtml.vsl
Index: view.xhtml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/crud/view.xhtml.vsl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -r1.7 -r1.8
--- view.xhtml.vsl 3 Jul 2007 17:13:22 -0000 1.7
+++ view.xhtml.vsl 5 Jul 2007 17:09:25 -0000 1.8
@@ -82,9 +82,6 @@
#set ($layout = "/layout/layout.xhtml")
<ui:composition template="$layout">
- <ui:define name="usesUpload">
- <c:set var="usesUpload" value="${manageable.needsFileUpload}" scope="request"/>
- </ui:define>
<ui:define name="title">
<c:set var="title" value="#{messages['${manageable.viewTitleKey}']}" scope="request"/>
</ui:define>
@@ -93,7 +90,7 @@
## deixei false em função da discrepância com o uso do \ no javascript#set ($clientValidation = $clientValidation && $manageable.validationRequired)
#set ($clientValidation = false)
#set ($formValidateName = "validate$stringUtils.capitalize($formName)")
- <tr:subform id="${formName}_search" rendered="#{!${formName}.editState}">
+ <tr:form id="${formName}_search" rendered="#{!${formName}.editState}"#if($view.needsFileUpload) usesUpload="true"#end>
<tr:panelFormLayout>
#foreach ($field in $manageable.manageableSearchAttributes)
#renderSearchInput($field)
@@ -162,12 +159,12 @@
#end
#end
</tr:table>
- </tr:subform>
+ </tr:form>
<tr:group rendered="#{${formName}.editState}">
<tr:commandLink action="#{${manageable.controllerBeanName}.back}" accessKey="#{messages['action.back.access.key']}">
<t:graphicImage url="/skins/#{${preferencesBeanName}.skin}/images/back.gif" title="#{messages['action.back']}" border="0" />
</tr:commandLink>
- <tr:subform id="${formName}_edit" #if($clientValidation) onsubmit="return $formValidateName(this);"#end>
+ <tr:form id="${formName}_edit" #if($clientValidation) onsubmit="return $formValidateName(this);"#end#if($view.needsFileUpload) usesUpload="true"#end>
<tr:panelFormLayout>
#foreach ($field in $manageable.manageableAttributes)
#if($field.hidden)
@@ -221,7 +218,7 @@
</f:facet>
</tr:panelFormLayout>
<a:validator#if(!$clientValidation) client="false"#end/>
- </tr:subform>
+ </tr:form>
</tr:group>
</ui:define>
</ui:composition>
1.4 +3 -3 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/preferences/preferences.xhtml.vsl
Index: preferences.xhtml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/facelets/preferences/preferences.xhtml.vsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- preferences.xhtml.vsl 12 Dec 2006 18:46:32 -0000 1.3
+++ preferences.xhtml.vsl 5 Jul 2007 17:09:25 -0000 1.4
@@ -11,7 +11,7 @@
<c:set var="title" value="#{messages['preferences.title']}" scope="request"/>
</ui:define>
<ui:define name="content">
- <tr:subform id="$preferencesBeanName">
+ <tr:form id="$preferencesBeanName">
<tr:panelFormLayout>
<tr:selectOneChoice id="menuTheme" value="#{${preferencesBeanName}.menuTheme}" label="#{messages['preferences.menu.theme']}:">
<f:selectItem itemLabel="Office" itemValue="ThemeOffice"/>
@@ -33,7 +33,7 @@
</tr:panelButtonBar>
</f:facet>
</tr:panelFormLayout>
- </tr:subform>
+ </tr:form>
</ui:define>
</ui:composition>
|