[jbosstools-commits] JBoss Tools SVN: r43331 - in trunk/jsf: tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Aug 30 12:53:02 EDT 2012


Author: dmaliarevich
Date: 2012-08-30 12:53:02 -0400 (Thu, 30 Aug 2012)
New Revision: 43331

Modified:
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
   trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/commandButton.xhtml
   trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/commandButton.xhtml.xml
Log:
https://issues.jboss.org/browse/JBIDE-3225 - a4j:commandButton was updated and junit.

Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml	2012-08-30 16:23:12 UTC (rev 43330)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml	2012-08-30 16:53:02 UTC (rev 43331)
@@ -64,107 +64,18 @@
     </vpe:tag>
     
     <vpe:tag name="a4j:commandButton" case-sensitive="yes">
-   		<!-- This is a very big if-statement. 
-	     Its goal is to add support of 'disabled property'
-	     DO NOT FORGET TO EDIT 'ELSE' PART IN FUTURE MODIFICATIONS -->
-		<vpe:if test="(@disabled='true')">
-			<vpe:if test="not(attrpresent('image'))">
-				<vpe:if test="(@type='')">
-					<vpe:template children="no" modify="no">
-						<input type="button" value="{jsfvalue(@value)}" 
-							class="{@styleClass}" style="{@style}" 
-							title="{tagstring()}" dir="{@dir}"
-							disabled="disabled"/>
-						<vpe:resize>
+   		<vpe:template children="yes" modify="no" 
+			class="org.jboss.tools.jsf.vpe.jsf.template.JsfCommandButton">
+			<vpe:resize>
 							<vpe:width width-attr="style.width" />
 							<vpe:height height-attr="style.height" />
-						</vpe:resize>
-						<vpe:dnd>
-							<vpe:drag start-enable="yes"/>
-						</vpe:dnd>
-						<vpe:textFormatting use-default-formats="yes">
-						</vpe:textFormatting>
-					</vpe:template>
-				</vpe:if>
-				<vpe:if test="not(@type='')">
-					<vpe:template children="no" modify="no">
-						<input type="{@type}" value="{jsfvalue(@value)}" 
-							class="{@styleClass}" style="{@style}" 
-							title="{tagstring()}" dir="{@dir}"
-							disabled="disabled"/>
-						<vpe:resize>
-							<vpe:width width-attr="style.width" />
-							<vpe:height height-attr="style.height" />
-						</vpe:resize>
-						<vpe:dnd>
-							<vpe:drag start-enable="yes"/>
-						</vpe:dnd>
-						<vpe:textFormatting use-default-formats="yes">
-						</vpe:textFormatting>
-					</vpe:template>
-				</vpe:if>
-			</vpe:if>
-			<vpe:if test="attrpresent('image')">
-				<vpe:template children="no" modify="no">
-					<input type="image" src="{src(@image)}" 
-						class="{@styleClass}" style="{@style}" title="{tagstring()}"
-						disabled="disabled"/>
-					<vpe:resize>
-						<vpe:width width-attr="style.width" />
-						<vpe:height height-attr="style.height" />
-					</vpe:resize>
-					<vpe:textFormatting use-default-formats="yes">
-					</vpe:textFormatting>
-				</vpe:template>
-			</vpe:if>
-		</vpe:if>
-		<!--else-->
-			<vpe:if test="not(attrpresent('image'))">
-				<vpe:if test="(@type='')">
-					<vpe:template children="no" modify="no">
-						<input type="button" value="{jsfvalue(@value)}" 
-						class="{@styleClass}" style="{@style}" 
-						title="{tagstring()}" dir="{@dir}"/>
-						<vpe:resize>
-							<vpe:width width-attr="style.width" />
-							<vpe:height height-attr="style.height" />
-						</vpe:resize>
-						<vpe:dnd>
-							<vpe:drag start-enable="yes"/>
-						</vpe:dnd>
-						<vpe:textFormatting use-default-formats="yes">
-						</vpe:textFormatting>
-					</vpe:template>
-				</vpe:if>
-				<vpe:if test="not(@type='')">
-					<vpe:template children="no" modify="no">
-						<input type="{@type}" value="{jsfvalue(@value)}" 
-						class="{@styleClass}" style="{@style}" 
-						title="{tagstring()}" dir="{@dir}"/>
-						<vpe:resize>
-							<vpe:width width-attr="style.width" />
-							<vpe:height height-attr="style.height" />
-						</vpe:resize>
-						<vpe:dnd>
-							<vpe:drag start-enable="yes"/>
-						</vpe:dnd>
-						<vpe:textFormatting use-default-formats="yes">
-						</vpe:textFormatting>
-					</vpe:template>
-				</vpe:if>
-			</vpe:if>
-			<vpe:if test="attrpresent('image')">
-				<vpe:template children="no" modify="no">
-					<input type="image" src="{src(@image)}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
-					<vpe:resize>
-						<vpe:width width-attr="style.width" />
-						<vpe:height height-attr="style.height" />
-					</vpe:resize>
-					<vpe:textFormatting use-default-formats="yes">
-					</vpe:textFormatting>
-				</vpe:template>
-			</vpe:if>
-		<!--end-of-else-->
+			</vpe:resize>
+			<vpe:dnd>
+						<vpe:drag start-enable="yes" />
+			</vpe:dnd>
+			<vpe:textFormatting use-default-formats="yes">
+			</vpe:textFormatting>
+		</vpe:template>
     </vpe:tag>
     
     <vpe:tag name="a4j:outputPanel" case-sensitive="yes">

Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/commandButton.xhtml
===================================================================
(Binary files differ)

Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/commandButton.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/commandButton.xhtml.xml	2012-08-30 16:23:12 UTC (rev 43330)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/commandButton.xhtml.xml	2012-08-30 16:53:02 UTC (rev 43331)
@@ -1,5 +1,114 @@
 <tests>
-	<test id="commandButton">
-		<INPUT TYPE="button" VALUE="commandButton" STYLE="-moz-user-modify: read-only;" />
+	<test id="div11">
+		<DIV ID="div11" STYLE="-moz-user-modify: read-write;">
+			<INPUT TYPE="submit" VALUE="commandButton1" />
+			<INPUT TYPE="button" VALUE="commandButton2" />
+			<INPUT TYPE="reset" VALUE="commandButton3" />
+			<INPUT TYPE="submit" VALUE="commandButton4" />
+			<INPUT TYPE="image" SRC="/.*ve/unresolved_image.gif/" />
+			<INPUT TYPE="submit" VALUE="commandButton6" />
+		</DIV>
 	</test>
+
+	<test id="div22">
+
+		<DIV ID="div22" STYLE="-moz-user-modify: read-write;">
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+				</SPAN>
+				<INPUT TYPE="submit" VALUE="cb1" />
+
+			</SPAN>
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+				</SPAN>
+				<INPUT TYPE="button" VALUE="cb2" />
+
+			</SPAN>
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+				</SPAN>
+				<INPUT TYPE="reset" VALUE="cb3" />
+
+			</SPAN>
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+				</SPAN>
+				<INPUT TYPE="submit" VALUE="cb4" />
+
+			</SPAN>
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+				</SPAN>
+				<INPUT TYPE="image" SRC="/.*ve/unresolved_image.gif/" />
+
+			</SPAN>
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+				</SPAN>
+				<INPUT TYPE="submit" VALUE="cb6" />
+
+			</SPAN>
+		</DIV>
+	</test>
+
+	<test id="div33">
+
+		<DIV ID="div33" STYLE="-moz-user-modify: read-write;">
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+					<SPAN CLASS="vpe-text">
+						with some text
+					</SPAN>
+				</SPAN>
+				<INPUT TYPE="submit" VALUE="cb1" />
+
+			</SPAN>
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+					<SPAN CLASS="vpe-text">
+						with some text
+					</SPAN>
+				</SPAN>
+				<INPUT TYPE="button" VALUE="cb2" />
+
+			</SPAN>
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+					<SPAN CLASS="vpe-text">
+						with some text
+					</SPAN>
+				</SPAN>
+				<INPUT TYPE="reset" VALUE="cb3" />
+
+			</SPAN>
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+					<SPAN CLASS="vpe-text">
+						with some text
+					</SPAN>
+				</SPAN>
+				<INPUT TYPE="submit" VALUE="cb4" />
+
+			</SPAN>
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+					<SPAN CLASS="vpe-text">
+						with some text
+					</SPAN>
+				</SPAN>
+				<INPUT TYPE="image" SRC="/.*ve/unresolved_image.gif/" />
+
+			</SPAN>
+			<SPAN CLASS="vpe-text">
+				<SPAN CLASS="vpe-text">
+					<SPAN CLASS="vpe-text">
+						with some text
+					</SPAN>
+				</SPAN>
+				<INPUT TYPE="submit" VALUE="cb6" />
+
+			</SPAN>
+		</DIV>
+	</test>
 </tests>
\ No newline at end of file



More information about the jbosstools-commits mailing list