[richfaces-svn-commits] JBoss Rich Faces SVN: r13607 - in trunk/test-applications/jsp/src/main: java/modalPanel and 6 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Apr 16 08:56:55 EDT 2009


Author: adubovsky
Date: 2009-04-16 08:56:55 -0400 (Thu, 16 Apr 2009)
New Revision: 13607

Added:
   trunk/test-applications/jsp/src/main/webapp/Authentication/
   trunk/test-applications/jsp/src/main/webapp/Authentication/auth.jsp
   trunk/test-applications/jsp/src/main/webapp/Authentication/error.html
   trunk/test-applications/jsp/src/main/webapp/Authentication/index.jsp
   trunk/test-applications/jsp/src/main/webapp/Authentication/login.html
Modified:
   trunk/test-applications/jsp/src/main/java/editor/Editor.java
   trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java
   trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp
   trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp
   trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanelProperty.jsp
   trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanelStraightforward.jsp
   trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
   trunk/test-applications/jsp/src/main/webapp/pages/main.jsp
Log:
+ Richfaces.hideTopModalPanel() function check

Modified: trunk/test-applications/jsp/src/main/java/editor/Editor.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/editor/Editor.java	2009-04-16 12:54:42 UTC (rev 13606)
+++ trunk/test-applications/jsp/src/main/java/editor/Editor.java	2009-04-16 12:56:55 UTC (rev 13607)
@@ -27,6 +27,7 @@
 	private String dialogType;
 	private String language;
 	private boolean configuration;
+
 	// private String skin;
 
 	public Editor() {
@@ -47,7 +48,7 @@
 		// skin = "default";
 		configuration = false;
 	}
-	
+
 	/*
 	 * attach config file to editor
 	 */
@@ -58,7 +59,7 @@
 			htmlEditor.setConfiguration(null);
 		}
 	}
-	
+
 	/*
 	 * Custom valueChangeListener
 	 */
@@ -77,11 +78,14 @@
 
 				System.out.println("!!! getAsObject work !!!");
 
-				if (newValue == "")
-					throw new ConverterException(new FacesMessage(
-							FacesMessage.SEVERITY_ERROR, "Converter error",
-							"Error while convert to Object"));
+				if (newValue != null) {
 
+					if (newValue.toString().indexOf("kkk") != -1) {
+						throw new ConverterException(new FacesMessage(
+								FacesMessage.SEVERITY_ERROR, "Converter error",
+								"Error while convert to Object"));
+					}
+				}
 				return newValue;
 			}
 
@@ -91,12 +95,16 @@
 
 				System.out.println("!!! getAsString work !!!");
 
-				if (value.toString().equals("<p>aaa</p>"))
-					throw new ConverterException(new FacesMessage(
-							FacesMessage.SEVERITY_ERROR, "Converter error",
-							"Error while convert to String"));
+				if (value != null) {
 
+					if (value.toString().equals("<p>aaa</p>"))
+						throw new ConverterException(new FacesMessage(
+								FacesMessage.SEVERITY_ERROR, "Converter error",
+								"Error while convert to String"));
+				}
+
 				String result = (value == null) ? "" : value.toString();
+
 				return result;
 			}
 		};
@@ -111,7 +119,7 @@
 		System.out.println("!!! Validator work !!!");
 		if (value != null) {
 
-			if (false) {
+			if (value.toString().indexOf("xxx") != -1) {
 				throw new ValidatorException(new FacesMessage(
 						FacesMessage.SEVERITY_ERROR, "Validation error",
 						"Incorrect input"));

Modified: trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java	2009-04-16 12:54:42 UTC (rev 13606)
+++ trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java	2009-04-16 12:56:55 UTC (rev 13607)
@@ -29,6 +29,7 @@
 	private String bindLabel;
 	private HtmlModalPanel htmlModalPanel;
 	private boolean trimOverlayedElements;
+	private String domElementAttachment;
 	
 	public boolean isTrimOverlayedElements() {
 		return trimOverlayedElements;
@@ -84,6 +85,7 @@
 		this.bindLabel = "not ready";
 		this.htmlModalPanel = null;
 		this.trimOverlayedElements = false;
+		this.domElementAttachment = "body";
 	}
 	
 	public void checkBinding(ActionEvent actionEvent){
@@ -278,4 +280,11 @@
 		info.addField(htmlModalPanel);
 	}
 
+	public String getDomElementAttachment() {
+		return domElementAttachment;
+	}
+
+	public void setDomElementAttachment(String domElementAttachment) {
+		this.domElementAttachment = domElementAttachment;
+	}
 }

Added: trunk/test-applications/jsp/src/main/webapp/Authentication/auth.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Authentication/auth.jsp	                        (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/Authentication/auth.jsp	2009-04-16 12:56:55 UTC (rev 13607)
@@ -0,0 +1,135 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<f:view>
+	<html>
+	<head>
+	<title>Authentication Page</title>
+	</head>
+	<body>
+	<rich:panel rendered="#{rich:isUserInRole('admin')}">
+		<f:facet name="header">
+			<h:outputText value="ADMIN panel" />
+		</f:facet>
+		<h:panelGrid columns="3">
+			<h:panelGroup>
+				<h:outputText value="ADMIN" rendered="#{rich:isUserInRole('admin')}" />
+				<br />
+				<a4j:commandButton rendered="#{rich:isUserInRole('admin')}"
+					value="ADMIN" onclick="return false;" />
+				<br />
+				<rich:inplaceInput value="ADMIN"
+					rendered="#{rich:isUserInRole('admin')}" />
+			</h:panelGroup>
+			<h:panelGroup>
+				<h:outputText value="USER" rendered="#{rich:isUserInRole('user')}" />
+				<br />
+				<a4j:commandButton rendered="#{rich:isUserInRole('user')}"
+					value="USER" onclick="return false;" />
+				<br />
+				<rich:inplaceInput value="USER"
+					rendered="#{rich:isUserInRole('user')}" />
+			</h:panelGroup>
+			<h:panelGroup>
+				<h:outputText value="USER\ADMIN"
+					rendered="#{rich:isUserInRole('admin,user')}" />
+				<br />
+				<a4j:commandButton rendered="#{rich:isUserInRole('admin,user')}"
+					value="ADMIN\USER" onclick="return false;" />
+				<br />
+				<rich:inplaceInput value="ADMIN\USER"
+					rendered="#{rich:isUserInRole('admin,user')}" />
+			</h:panelGroup>
+		</h:panelGrid>
+	</rich:panel>
+	<rich:panel rendered="#{rich:isUserInRole('user')}">
+		<f:facet name="header">
+			<h:outputText value="USER panel" />
+		</f:facet>
+		<h:panelGrid columns="3">
+			<h:panelGroup>
+				<h:outputText value="ADMIN" rendered="#{rich:isUserInRole('admin')}" />
+				<br />
+				<a4j:commandButton rendered="#{rich:isUserInRole('admin')}"
+					value="ADMIN" onclick="return false;" />
+				<br />
+				<rich:inplaceInput value="ADMIN"
+					rendered="#{rich:isUserInRole('admin')}" />
+			</h:panelGroup>
+			<h:panelGroup>
+				<h:outputText value="USER" rendered="#{rich:isUserInRole('user')}" />
+				<br />
+				<a4j:commandButton rendered="#{rich:isUserInRole('user')}"
+					value="USER" onclick="return false;" />
+				<br />
+				<rich:inplaceInput value="USER"
+					rendered="#{rich:isUserInRole('user')}" />
+			</h:panelGroup>
+			<h:panelGroup>
+				<h:outputText value="USER\ADMIN"
+					rendered="#{rich:isUserInRole('admin,user')}" />
+				<br />
+				<a4j:commandButton rendered="#{rich:isUserInRole('admin,user')}"
+					value="ADMIN\USER" onclick="return false;" />
+				<br />
+				<rich:inplaceInput value="ADMIN\USER"
+					rendered="#{rich:isUserInRole('admin,user')}" />
+			</h:panelGroup>
+		</h:panelGrid>
+	</rich:panel>
+	<rich:panel rendered="#{rich:isUserInRole('admin,user')}">
+		<f:facet name="header">
+			<h:outputText value="ADMIN\USER panel" />
+		</f:facet>
+		<h:panelGrid columns="3">
+			<h:panelGroup>
+				<h:outputText value="ADMIN" rendered="#{rich:isUserInRole('admin')}" />
+				<br />
+				<a4j:commandButton rendered="#{rich:isUserInRole('admin')}"
+					value="ADMIN" onclick="return false;" />
+				<br />
+				<rich:inplaceInput value="ADMIN"
+					rendered="#{rich:isUserInRole('admin')}" />
+			</h:panelGroup>
+			<h:panelGroup>
+				<h:outputText value="USER" rendered="#{rich:isUserInRole('user')}" />
+				<br />
+				<a4j:commandButton rendered="#{rich:isUserInRole('user')}"
+					value="USER" onclick="return false;" />
+				<br />
+				<rich:inplaceInput value="USER"
+					rendered="#{rich:isUserInRole('user')}" />
+			</h:panelGroup>
+			<h:panelGroup>
+				<h:outputText value="USER\ADMIN"
+					rendered="#{rich:isUserInRole('admin,user')}" />
+				<br />
+				<a4j:commandButton rendered="#{rich:isUserInRole('admin,user')}"
+					value="ADMIN\USER" onclick="return false;" />
+				<br />
+				<rich:inplaceInput value="ADMIN\USER"
+					rendered="#{rich:isUserInRole('admin,user')}" />
+			</h:panelGroup>
+		</h:panelGrid>
+	</rich:panel>
+	<rich:panel rendered="#{!rich:isUserInRole('admin,user')}">
+		<h1>This user coud not view anything before this text :(</h1>
+	</rich:panel>
+	<rich:panel>
+		<br />
+		<h:form>
+			<h:commandButton
+				onclick="alert(#{rich:isUserInRole('admin')}); return false;"
+				value="is User In Role Admin" />
+			<h:commandButton
+				onclick="alert(#{rich:isUserInRole('user')}); return false;"
+				value="is User In Role User" />
+			<h:commandButton
+				onclick="alert(#{rich:isUserInRole('tomcat')}); return false;"
+				value="is User In Role Tomcat" />
+		</h:form>
+	</rich:panel>
+	</body>
+	</html>
+</f:view>
\ No newline at end of file

Added: trunk/test-applications/jsp/src/main/webapp/Authentication/error.html
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Authentication/error.html	                        (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/Authentication/error.html	2009-04-16 12:56:55 UTC (rev 13607)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>Login failed</title>
+</head>
+<body>
+Login failed
+</body>
+</html>
\ No newline at end of file

Added: trunk/test-applications/jsp/src/main/webapp/Authentication/index.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Authentication/index.jsp	                        (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/Authentication/index.jsp	2009-04-16 12:56:55 UTC (rev 13607)
@@ -0,0 +1,41 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<f:view>
+	<html>
+	<head>
+	<title>Pre Authentication Page</title>
+	</head>
+	<body>
+	<rich:panel>
+		<h1>If you see a SEPARATOR under the panel - this is a bug of
+		rich:isUserInRole function (applied to the 1th visit on the page)</h1>
+		<a href="auth.jsf" style="font-size: xx-large">Log In</a>
+		<br />
+		There are following users present (all without passwords):
+		<ol>
+			<li>admin in role admin</li>
+			<li>user in role user</li>
+			<li>tomcat in role tomcat</li>
+			<li>super in roles admin and user</li>
+		</ol>
+		<br />
+		<h:form>
+			<h:commandButton
+				onclick="alert(#{rich:isUserInRole('admin')}); return false;"
+				value="is User In Role Admin" />
+			<h:commandButton
+				onclick="alert(#{rich:isUserInRole('user')}); return false;"
+				value="is User In Role User" />
+			<h:commandButton
+				onclick="alert(#{rich:isUserInRole('tomcat')}); return false;"
+				value="is User In Role Tomcat" />
+		</h:form>
+	</rich:panel>
+	<rich:spacer height="10"></rich:spacer>
+	<rich:separator height="200"
+		rendered="#{rich:isUserInRole('user, admin')}"></rich:separator>
+	</body>
+	</html>
+</f:view>
\ No newline at end of file

Added: trunk/test-applications/jsp/src/main/webapp/Authentication/login.html
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Authentication/login.html	                        (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/Authentication/login.html	2009-04-16 12:56:55 UTC (rev 13607)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>Insert title here</title>
+</head>
+<body>
+	<form action="j_security_check" method="post">
+		<input type="text" name="j_username" />
+		<br />
+		<input type="password" name="j_password" />
+		<br />
+		<input type="submit" value="Login" /> 
+	</form>
+</body>
+</html>
\ No newline at end of file

Modified: trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp	2009-04-16 12:54:42 UTC (rev 13606)
+++ trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp	2009-04-16 12:56:55 UTC (rev 13607)
@@ -10,17 +10,17 @@
 			value="#{editor.value}" width="#{editor.width}"
 			height="#{editor.height}" theme="#{editor.theme}"
 			onchange="#{event.onchange}" oninit="#{event.oninit}"
-			onsetup="#{event.onsetup}"
+			onsetup="#{event.onsetup}" 
 			autoResize="#{editor.autoResize}" converter="#{editor.convert}"
 			converterMessage="converterMessage" immediate="#{editor.immediate}"
 			rendered="#{editor.rendered}" required="#{editor.required}"
-			requiredMessage="requiredMessage" useSeamText="#{editor.useSeamText}"
+			useSeamText="#{editor.useSeamText}"
 			validator="#{editor.validate}" validatorMessage="validatorMessage"
 			valueChangeListener="#{editor.valueChangeListener}"
 			viewMode="#{editor.viewMode}" readonly="#{editor.readonly}"
 			tabindex="#{editor.tabindex}" dialogType="#{editor.dialogType}"
 			language="#{editor.language}" styleClass="EditorStyleClass"
-			plugins="media">
+			plugins="media" label="test_editor">
 
 			<f:param name="theme_advanced_resizing" value="true" />
 			<f:param name="theme_advanced_statusbar_location" value="top" />

Modified: trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp	2009-04-16 12:54:42 UTC (rev 13606)
+++ trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp	2009-04-16 12:56:55 UTC (rev 13607)
@@ -2,13 +2,13 @@
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
 <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
 <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+
 <script type="text/javascript">
 function multiply(height,width){
 	var tbody = document.getElementById('tbodyID');
-	var trs     = tbody.getElementsByTagName('TR');
 	var y = parseInt(height);
 	var x = parseInt(width);	
-	trs[1].innerHTML = 'modalPanel\'s size: ' + x + 'x' +y + ' px*px';
+	tbody.innerHTML = 'modalPanel\'s size: ' + x + 'x' +y + ' px*px';
 	return false;	
 }
 </script>
@@ -17,12 +17,10 @@
 	top: 5px;
 	left: 5px;
 	opacity: 0.9;
-	filter: alpha(opacity = 200);
+	filter: alpha(opacity =     200);
 }
 </style>
 
-<!-- %@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%-->
-
 <f:subview id="modalPanelSubviewID">
 
 	<rich:modalPanel id="modalPanelID"
@@ -51,122 +49,97 @@
 		onresize="#{event.onresize}" onshow="#{event.onshow}"
 		onbeforehide="#{event.onbeforehide}"
 		onbeforeshow="#{event.onbeforeshow}"
-		tridentIVEngineSelectBehavior="hide" >
+		tridentIVEngineSelectBehavior="hide"
+		domElementAttachment="#{modalPanel.domElementAttachment}"
+		label="panel1">
 		<f:facet name="header">
-			<h:outputText value="Heder goes here..." />
+			<h:outputText value="HEADER for PANEL1" />
 		</f:facet>
 		<f:facet name="controls">
 			<h:graphicImage value="/pics/error.gif"
 				onclick="Richfaces.hideModalPanel('modalPanelID'); return false;" />
 		</f:facet>
-
-		<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
-		<h:panelGrid columns="2" id="findComponentID">
-			<tbody id="tbodyID">
-				<tr>
-					<td><a4j:commandLink value="getSize" reRender="findID"
-						onclick="javascript:multiply(#{rich:findComponent('modalPanelID').height},#{rich:findComponent('modalPanelID').width});"></a4j:commandLink>
-					</td>
-				</tr>
-				<tr>
-					<td><h:outputText /></td>
-				</tr>
-			</tbody>
-		</h:panelGrid>
-		<br />
-		<h:outputText value="This is Modal Panel example" styleClass="text1" />
-		<br/>
+		<h:outputText value="selectOneMenu inside the MODALPanel: " />
 		<h:selectOneMenu value="#{richBean.srcContainer}">
 			<f:selectItems value="#{richBean.listContainer}" />
 		</h:selectOneMenu>
-
+		<rich:separator></rich:separator>
 		<h:inputText value="#{modalPanel.inputTextTest}" />
+		<br />
 		<h:selectOneListbox value="#{modalPanel.selectOneListboxTest}">
 			<f:selectItem itemLabel="1" itemValue="1" />
 			<f:selectItem itemLabel="2" itemValue="2" />
 			<f:selectItem itemLabel="3" itemValue="3" />
 		</h:selectOneListbox>
-
-		<f:verbatim>
-			<br />
-			<br />
-		</f:verbatim>
-		<rich:spacer width="20" height="20"></rich:spacer>
-
+		<rich:separator></rich:separator>
+		<rich:spacer height="20"></rich:spacer>
 		<h:outputLink value="http://localhost:8081/jsp/">
 			<f:verbatim>http://localhost:8081/jsp/</f:verbatim>
 		</h:outputLink>
-		<f:verbatim>
-			<br />
-			<br />
-		</f:verbatim>
+		<rich:separator></rich:separator>
+		<br />
+		<br />
 		<a4j:commandLink
 			onclick="Richfaces.showModalPanel('modalPanel2ID');return false;"
 			value="show ModalPanel 2"></a4j:commandLink>
-		<f:verbatim>
-			<br />
-			<br />
-		</f:verbatim>
+		<br />
+		<br />
 		<h:outputLink
 			onclick="Richfaces.hideModalPanel('modalPanelID');return false;">
 			<f:verbatim>Close</f:verbatim>
 		</h:outputLink>
 		<br />
+		<h:outputLink onclick="Richfaces.hideTopModalPanel();return false;">
+			<f:verbatim>Close Top Panel</f:verbatim>
+		</h:outputLink>
 	</rich:modalPanel>
 
 	<rich:modalPanel id="modalPanel2ID" autosized="true" resizeable="false">
-		<br />
+		<f:facet name="header">
+			<h:outputText value="HEADER for PANEL2" />
+		</f:facet>
+		<f:facet name="controls">
+			<h:graphicImage value="/pics/error.gif"
+				onclick="Richfaces.hideModalPanel('modalPanel2ID'); return false;" />
+		</f:facet>
 		<h:inputText value="input"></h:inputText>
 		<br />
 		<h:outputLink
 			onclick="Richfaces.hideModalPanel('modalPanel2ID');return false;">
 			<f:verbatim>Close</f:verbatim>
 		</h:outputLink>
+		<br />
+		<h:outputLink onclick="Richfaces.hideTopModalPanel();return false;">
+			<f:verbatim>Close Top Panel</f:verbatim>
+		</h:outputLink>
 		<rich:pickList id="pickListID">
 			<f:selectItem itemValue="selectItem 0" itemLabel="selectItem 0" />
 			<f:selectItem itemValue="selectItem 1" itemLabel="selectItem 1" />
 			<f:selectItem itemValue="selectItem 2" itemLabel="selectItem 2" />
-
 		</rich:pickList>
 		<br />
 		<a4j:commandButton reRender="pickListID" value="refresh target"></a4j:commandButton>
 	</rich:modalPanel>
 
-	<rich:modalPanel id="modalPanel3ID" minHeight="100" minWidth="200"
-		moveable="true" autosized="true" resizeable="false">
-		<f:facet name="header">
-			<h:outputText value="Events..." />
-		</f:facet>
-		<f:facet name="controls">
-			<h:commandLink value="Close"
-				onclick="Richfaces.hideModalPanel('modalPanel3ID');" />
-		</f:facet>
-
-		<h:outputText value="Eventsaaaaaaaaaaaaaaaa ..." />
-		<rich:calendar popup="true" />
-	</rich:modalPanel>
-
-	<a
-		onclick="Richfaces.showModalPanel('modalPanelID');"
-		href="#">show ModalPanel 1</a>
+	<a onclick="Richfaces.showModalPanel('modalPanelID');" href="#">show
+	ModalPanel 1</a>
 	<br />
 	<a4j:commandLink
 		onclick="Richfaces.showModalPanel('modalPanel2ID');return false;"
 		value="show ModalPanel 2"></a4j:commandLink>
-	<f:verbatim>
-		<br />
-	</f:verbatim>
-	<h:outputText value="click on image for open Modal Panel 3" />
-	<h:graphicImage value="/pics/info.gif">
-		<rich:componentControl event="onclick" for="modalPanel3ID"
-			operation="show"></rich:componentControl>
-	</h:graphicImage>
-	<f:verbatim>
-		<br />
-		<br />
-		<div id="idDiv1" align="center"
-			style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index1</div>
-		<div id="idDiv2" align="center"
-			style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index2</div>
-	</f:verbatim>
+	<br />
+	<rich:spacer height="20"></rich:spacer>
+	<br />
+	<div id="idDiv1" align="center"
+		style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index1</div>
+	<div id="idDiv2" align="center"
+		style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index2</div>
+
+	<%-- <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+		<h:panelGrid columns="2" id="findComponentID">
+			<a4j:commandLink value="getSize"
+				onclick="multiply(#{rich:findComponent('modalPanelID').height},#{rich:findComponent('modalPanelID').width});" />
+			<div id="tbodyID"></div>
+		</h:panelGrid>
+		<rich:separator></rich:separator> --%>
 </f:subview>

Modified: trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanelProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanelProperty.jsp	2009-04-16 12:54:42 UTC (rev 13606)
+++ trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanelProperty.jsp	2009-04-16 12:56:55 UTC (rev 13607)
@@ -4,34 +4,70 @@
 <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
 
 <f:subview id="ModalPanelPropertySubviewID">
-<h:commandButton value="add test" action="#{modalPanel.addHtmlModalPanel}"></h:commandButton>
+	<rich:modalPanel id="modalPanelID" minHeight="100" minWidth="200"
+		moveable="true" autosized="true" resizeable="false">
+		<f:facet name="header">
+			<h:outputText value="Events..." />
+		</f:facet>
+		<f:facet name="controls">
+			<h:commandLink value="Close (Does not work)"
+				onclick="Richfaces.hideModalPanel('modalPanelID'); return false;" />
+		</f:facet>
+
+		<h:outputText value="Events..." />
+		<rich:calendar popup="true" />
+		<rich:separator></rich:separator>
+		<h:outputLink
+			onclick="Richfaces.hideModalPanel('modalPanelID');return false;">
+			<f:verbatim>Close (Does not work)</f:verbatim>
+		</h:outputLink>
+		<br />
+		<h:outputLink onclick="Richfaces.hideTopModalPanel();return false;">
+			<f:verbatim>Close Top Panel</f:verbatim>
+		</h:outputLink>
+	</rich:modalPanel>
+	<f:verbatim>
+		<fieldset><legend>Rich.hideTopModalPanel() TEST</legend> <h:outputText
+			value="click on image for open Modal Panel 3" /> <h:graphicImage
+			value="/pics/info.gif">
+			<rich:componentControl event="onclick" for="modalPanelID"
+				operation="show"></rich:componentControl>
+		</h:graphicImage></fieldset>
+	</f:verbatim>
+	<br />
+	<h:commandButton value="add test"
+		action="#{modalPanel.addHtmlModalPanel}"></h:commandButton>
 	<h:panelGrid columns="2">
+		<h:outputText value="domElementAttachment"></h:outputText>
+		<h:selectOneRadio value="#{modalPanel.domElementAttachment}"
+			onchange="submit();">
+			<f:selectItem itemValue="body" itemLabel="body" />
+			<f:selectItem itemValue="parent" itemLabel="parent" />
+			<f:selectItem itemValue="form" itemLabel="form" />
+		</h:selectOneRadio>
+
 		<h:outputText value="visualOptions"></h:outputText>
 		<h:inputText value="#{modalPanel.visualOptions}" onchange="submit();"></h:inputText>
 
 		<h:outputText value="shadowDepth" />
-		<h:inputText value="#{modalPanel.shadowDepth}">
-			<a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+		<h:inputText value="#{modalPanel.shadowDepth}" onchange="submit();">
 		</h:inputText>
 
 		<h:outputText value="shadowOpacity" />
-		<h:inputText value="#{modalPanel.shadowOpacity}">
-			<a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+		<h:inputText value="#{modalPanel.shadowOpacity}" onchange="submit();">
 		</h:inputText>
 
 		<h:outputText value="keepVisualState" />
-		<h:selectBooleanCheckbox value="#{modalPanel.keepVisualState}">
-			<a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+		<h:selectBooleanCheckbox value="#{modalPanel.keepVisualState}"
+			onchange="submit();">
 		</h:selectBooleanCheckbox>
 
 		<h:outputText value="left" />
-		<h:inputText value="#{modalPanel.left}">
-			<a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+		<h:inputText value="#{modalPanel.left}" onchange="submit();">
 		</h:inputText>
 
 		<h:outputText value="top" />
-		<h:inputText value="#{modalPanel.top}">
-			<a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+		<h:inputText value="#{modalPanel.top}" onchange="submit();">
 		</h:inputText>
 
 		<h:outputText value="rendered" />
@@ -41,46 +77,42 @@
 		</h:selectBooleanCheckbox>
 
 		<h:outputText value="showWhenRendered" />
-		<h:selectBooleanCheckbox value="#{modalPanel.showWhenRendered}">
-			<a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+		<h:selectBooleanCheckbox value="#{modalPanel.showWhenRendered}"
+			onchange="submit();">
 		</h:selectBooleanCheckbox>
 
 		<h:outputText value="zindex" />
-		<h:selectOneRadio value="#{modalPanel.zindex}">
+		<h:selectOneRadio value="#{modalPanel.zindex}" onchange="submit();">
 			<f:selectItem itemLabel="1" itemValue="1" />
 			<f:selectItem itemLabel="3" itemValue="3" />
-			<a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
 		</h:selectOneRadio>
 
 		<h:outputText value="Width:" />
-		<h:inputText value="#{modalPanel.width}">
-			<a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+		<h:inputText value="#{modalPanel.width}" onchange="submit();">
 		</h:inputText>
 
 		<h:outputText value="Height:" />
-		<h:inputText value="#{modalPanel.height}">
-			<a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+		<h:inputText value="#{modalPanel.height}" onchange="submit();">
 		</h:inputText>
 
 		<h:outputText value="minWidth:" />
-		<h:inputText value="#{modalPanel.minWidth}">
-			<a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+		<h:inputText value="#{modalPanel.minWidth}" onchange="submit();">
 		</h:inputText>
 
 		<h:outputText value="minHeight:" />
-		<h:inputText value="#{modalPanel.minHeight}">
-			<a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+		<h:inputText value="#{modalPanel.minHeight}" onchange="submit();">
 		</h:inputText>
 
 		<h:outputText value="autosized:" />
-		<h:selectBooleanCheckbox value="#{modalPanel.autosized}" onchange="submit();" ></h:selectBooleanCheckbox>
+		<h:selectBooleanCheckbox value="#{modalPanel.autosized}"
+			onchange="submit();"></h:selectBooleanCheckbox>
 
 		<h:outputText value="resizeable:" />
-		<h:selectBooleanCheckbox value="#{modalPanel.resizeable}" onchange="submit();"></h:selectBooleanCheckbox>
+		<h:selectBooleanCheckbox value="#{modalPanel.resizeable}"
+			onchange="submit();"></h:selectBooleanCheckbox>
 
-		<h:outputText value="Moveable:" />
-		<h:selectBooleanCheckbox value="#{modalPanel.moveable}">
-			<a4j:support event="onclick" reRender="modalPanelID"></a4j:support>
-		</h:selectBooleanCheckbox>
-	</h:panelGrid>	
+		<h:outputText value="Moveable: " />
+		<h:selectBooleanCheckbox value="#{modalPanel.moveable}"
+			onchange="submit();"></h:selectBooleanCheckbox>
+	</h:panelGrid>
 </f:subview>
\ No newline at end of file

Modified: trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanelStraightforward.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanelStraightforward.jsp	2009-04-16 12:54:42 UTC (rev 13606)
+++ trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanelStraightforward.jsp	2009-04-16 12:56:55 UTC (rev 13607)
@@ -4,25 +4,25 @@
 <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
 
 <f:subview id="ModalPanelStraightforwardSubviewID">
-			<h:panelGrid columns="3">
-				<h:outputText value="Test1" />
-				<a4j:commandButton action="#{modalPanel.bTest1}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
-				<h:outputText value="#{msg.t1ModalPanel}"/>
+	<h:panelGrid columns="3">
+		<h:outputText value="Test1" />
+		<a4j:commandButton action="#{modalPanel.bTest1}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
+		<h:outputText value="#{msg.t1ModalPanel}"/>
 
-				<h:outputText value="Test2" />
-				<a4j:commandButton action="#{modalPanel.bTest2}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
-				<h:outputText value="#{msg.t2ModalPanel}"/>
+		<h:outputText value="Test2" />
+		<a4j:commandButton action="#{modalPanel.bTest2}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
+		<h:outputText value="#{msg.t2ModalPanel}"/>
 
-				<h:outputText value="Test3" />
-				<a4j:commandButton action="#{modalPanel.bTest3}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
-				<h:outputText value="#{msg.t3ModalPanel}"/>
+		<h:outputText value="Test3" />
+		<a4j:commandButton action="#{modalPanel.bTest3}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
+		<h:outputText value="#{msg.t3ModalPanel}"/>
 
-				<h:outputText value="Test4" />
-				<a4j:commandButton action="#{modalPanel.bTest4}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
-				<h:outputText value="#{msg.t4ModalPanel}"/>
+		<h:outputText value="Test4" />
+		<a4j:commandButton action="#{modalPanel.bTest4}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
+		<h:outputText value="#{msg.t4ModalPanel}"/>
 
-				<h:outputText value="Test5" />
-				<a4j:commandButton action="#{modalPanel.bTest5}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
-				<h:outputText value="#{msg.t5ModalPanel}"/>
-			</h:panelGrid>
+		<h:outputText value="Test5" />
+		<a4j:commandButton action="#{modalPanel.bTest5}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
+		<h:outputText value="#{msg.t5ModalPanel}"/>
+	</h:panelGrid>
 </f:subview>
\ No newline at end of file

Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml	2009-04-16 12:54:42 UTC (rev 13606)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml	2009-04-16 12:56:55 UTC (rev 13607)
@@ -3,7 +3,7 @@
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 	<display-name>vcp-ComponentsTesting_3_0(1.1)</display-name>
-	
+
 	<context-param>
 		<param-name>org.ajax4jsf.SKIN</param-name>
 		<param-value>#{skinBean.skin}</param-value>
@@ -22,12 +22,12 @@
 	<context-param>
 		<param-name>org.richfaces.CONTROL_SKINNING_LEVEL</param-name>
 		<param-value>extended</param-value>
-	</context-param>	
-	
+	</context-param>
+
 	<context-param>
 		<param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
 		<param-value>true</param-value>
-	</context-param>	
+	</context-param>
 
 	<context-param>
 		<description>
@@ -180,7 +180,7 @@
 
 	<context-param>
 		<param-name>org.richfaces.LoadScriptStrategy</param-name>
-		<param-value>DEFAULT</param-value>
+		<param-value>ALL</param-value>
 	</context-param>
 
 	<context-param>
@@ -264,7 +264,7 @@
 		<dispatcher>INCLUDE</dispatcher>
 		<dispatcher>ERROR</dispatcher>
 	</filter-mapping>
-	
+
 	<filter-mapping>
 		<filter-name>extensionsFilter</filter-name>
 		<servlet-name>Faces Servlet</servlet-name>
@@ -297,10 +297,34 @@
 	<login-config>
 		<auth-method>BASIC</auth-method>
 	</login-config>
-	
+	<!--
+		<login-config>
+		<auth-method>FORM</auth-method>
+		<form-login-config>
+		<form-login-page>
+		/Authentication/login.html
+		</form-login-page>
+		<form-error-page>
+		/Authentication/error.html
+		</form-error-page>
+		</form-login-config>
+		</login-config>
+	-->
+	<security-constraint>
+		<web-resource-collection>
+			<web-resource-name>auth</web-resource-name>
+			<url-pattern>/Authentication/auth.jsf</url-pattern>
+		</web-resource-collection>
+		<auth-constraint>
+			<role-name>user</role-name>
+			<role-name>admin</role-name>
+			<role-name>tomcat</role-name>
+		</auth-constraint>
+	</security-constraint>
+
 	<error-page>
-       <error-code>404</error-code>
-       <location>/error404.jsf</location>
-   </error-page> 
-	
+		<error-code>404</error-code>
+		<location>/error404.jsf</location>
+	</error-page>
+
 </web-app>

Modified: trunk/test-applications/jsp/src/main/webapp/pages/main.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/main.jsp	2009-04-16 12:54:42 UTC (rev 13606)
+++ trunk/test-applications/jsp/src/main/webapp/pages/main.jsp	2009-04-16 12:56:55 UTC (rev 13607)
@@ -24,6 +24,7 @@
 				<h:commandLink value="Div" action="TestDiv"></h:commandLink>
 				<h:commandLink value="Select" action="Map" disabled="true"></h:commandLink>
 				<h:commandLink value="Customize page" action="CustomizePage"></h:commandLink>
+				<a href="/jsp/Authentication/index.jsf">Authentication</a>
 			</h:panelGrid>
 		</rich:panel>	
 		<rich:spacer></rich:spacer>




More information about the richfaces-svn-commits mailing list