JBoss Rich Faces SVN: r13609 - trunk/test-applications/richfaces-docs/web.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-04-16 10:12:38 -0400 (Thu, 16 Apr 2009)
New Revision: 13609
Modified:
trunk/test-applications/richfaces-docs/web/pom.xml
Log:
added dependencies
Modified: trunk/test-applications/richfaces-docs/web/pom.xml
===================================================================
--- trunk/test-applications/richfaces-docs/web/pom.xml 2009-04-16 13:46:11 UTC (rev 13608)
+++ trunk/test-applications/richfaces-docs/web/pom.xml 2009-04-16 14:12:38 UTC (rev 13609)
@@ -44,14 +44,25 @@
<dependency>
-
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
<version>3.3.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <version>3.3.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui</artifactId>
+ <version>3.3.1-SNAPSHOT</version>
+ </dependency>
+
+
+
-
</dependencies>
<build>
<plugins>
15 years, 2 months
JBoss Rich Faces SVN: r13608 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-04-16 09:46:11 -0400 (Thu, 16 Apr 2009)
New Revision: 13608
Modified:
trunk/docs/userguide/en/src/main/docbook/included/rich_page.xml
Log:
corrected a duplicated id
Modified: trunk/docs/userguide/en/src/main/docbook/included/rich_page.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/rich_page.xml 2009-04-16 12:56:55 UTC (rev 13607)
+++ trunk/docs/userguide/en/src/main/docbook/included/rich_page.xml 2009-04-16 13:46:11 UTC (rev 13608)
@@ -190,7 +190,7 @@
<section>
<title>Component CSS Selectors</title>
- <table id="comboBoxC">
+ <table id="RichpageSelectors">
<title>CSS Selectors that define the representation of the component's blocks</title>
<tgroup cols="2">
<thead>
15 years, 2 months
JBoss Rich Faces SVN: r13607 - in trunk/test-applications/jsp/src/main: java/modalPanel and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
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>
15 years, 2 months
JBoss Rich Faces SVN: r13606 - in trunk/test-applications/facelets/src/main: java/modalPanel and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2009-04-16 08:54:42 -0400 (Thu, 16 Apr 2009)
New Revision: 13606
Modified:
trunk/test-applications/facelets/src/main/java/editor/Editor.java
trunk/test-applications/facelets/src/main/java/modalPanel/ModalPanel.java
trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml
trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml
Log:
+ Richfaces.hideTopModalPanel() function check
Modified: trunk/test-applications/facelets/src/main/java/editor/Editor.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/editor/Editor.java 2009-04-16 12:26:31 UTC (rev 13605)
+++ trunk/test-applications/facelets/src/main/java/editor/Editor.java 2009-04-16 12:54:42 UTC (rev 13606)
@@ -77,11 +77,14 @@
System.out.println("!!! getAsObject work !!!");
- if (false)
- 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 +94,16 @@
System.out.println("!!! getAsString work !!!");
- if (false)
- 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,10 +118,13 @@
System.out.println("!!! Validator work !!!");
if (value != null) {
- if (false) {
- throw new ValidatorException(new FacesMessage(
- FacesMessage.SEVERITY_ERROR, "Validation error",
- "Incorrect input"));
+ if (value != null) {
+
+ if (value.toString().indexOf("xxx") != -1) {
+ throw new ValidatorException(new FacesMessage(
+ FacesMessage.SEVERITY_ERROR, "Validation error",
+ "Incorrect input"));
+ }
}
}
}
Modified: trunk/test-applications/facelets/src/main/java/modalPanel/ModalPanel.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/modalPanel/ModalPanel.java 2009-04-16 12:26:31 UTC (rev 13605)
+++ trunk/test-applications/facelets/src/main/java/modalPanel/ModalPanel.java 2009-04-16 12:54:42 UTC (rev 13606)
@@ -28,8 +28,17 @@
private String visualOptions;
private String bindLabel;
private HtmlModalPanel htmlModalPanel;
+ private boolean trimOverlayedElements;
+ private String domElementAttachment;
-
+ public boolean isTrimOverlayedElements() {
+ return trimOverlayedElements;
+ }
+
+ public void setTrimOverlayedElements(boolean trimOverlayedElements) {
+ this.trimOverlayedElements = trimOverlayedElements;
+ }
+
public String getVisualOptions() {
return visualOptions;
}
@@ -75,6 +84,8 @@
this.showWhenRendered = false;
this.bindLabel = "not ready";
this.htmlModalPanel = null;
+ this.trimOverlayedElements = false;
+ this.domElementAttachment = "body";
}
public void checkBinding(ActionEvent actionEvent){
@@ -268,4 +279,12 @@
ComponentInfo info = ComponentInfo.getInstance();
info.addField(htmlModalPanel);
}
-}
+
+ public String getDomElementAttachment() {
+ return domElementAttachment;
+ }
+
+ public void setDomElementAttachment(String domElementAttachment) {
+ this.domElementAttachment = domElementAttachment;
+ }
+}
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml 2009-04-16 12:26:31 UTC (rev 13605)
+++ trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml 2009-04-16 12:54:42 UTC (rev 13606)
@@ -4,11 +4,28 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich" id="modalPanelSubviewID">
+ <script type="text/javascript">
+function multiply(height,width){
+ var tbody = document.getElementById('tbodyID');
+ var y = parseInt(height);
+ var x = parseInt(width);
+ tbody.innerHTML = 'modalPanel\'s size: ' + x + 'x' +y + ' px*px';
+ return false;
+}
+</script>
+ <style>
+.dr-mpnl-shadow {
+ top: 5px;
+ left: 5px;
+ opacity: 0.9;
+ filter: alpha(opacity = 200);
+}
+</style>
+
<rich:modalPanel id="modalPanelID"
binding="#{modalPanel.htmlModalPanel}"
visualOptions="#{modalPanel.visualOptions}" left="#{modalPanel.left}"
- top="#{modalPanel.top}" minHeight="#{modalPanel.minHeight}"
- minWidth="#{modalPanel.minWidth}" height="#{modalPanel.height}"
+ top="#{modalPanel.top}" height="#{modalPanel.height}"
width="#{modalPanel.width}" moveable="#{modalPanel.moveable}"
resizeable="#{modalPanel.resizeable}"
keepVisualState="#{modalPanel.keepVisualState}"
@@ -17,6 +34,7 @@
shadowDepth="#{modalPanel.shadowDepth}"
shadowOpacity="#{modalPanel.shadowOpacity}"
showWhenRendered="#{modalPanel.showWhenRendered}"
+ trimOverlayedElements="#{modalPanel.trimOverlayedElements}"
controlsClass="#{style.controlsClass}"
headerClass="#{style.headerClass}" styleClass="#{style.styleClass}"
onhide="#{event.onhide}" onmaskclick="#{event.onmaskclick}"
@@ -26,76 +44,101 @@
onmaskmousemove="#{event.onmaskmousemove}"
onmaskmouseout="#{event.onmaskmouseout}"
onmaskmouseover="#{event.onmaskmouseover}"
- onmaskmouseup="#{event.onmaskmouseup}"
- onmove="#{event.onmove}"
- onresize="#{event.onresize}" onshow="#{event.onshow}"
+ onmaskmouseup="#{event.onmaskmouseup}" onmove="#{event.onmove}"
+ onresize="#{event.onresize}" onshow="#{event.onshow}"
onbeforehide="#{event.onbeforehide}"
- onbeforeshow="#{event.onbeforeshow}" >
+ onbeforeshow="#{event.onbeforeshow}"
+ 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;" />
+ <h:graphicImage value="/pics/error.gif"
+ onclick="Richfaces.hideModalPanel('modalPanelID'); return false;" />
</f:facet>
-
- <h:outputText value="This is Modal Panel example" />
- <h:selectOneMenu value="#{richBean.srcContainer}" >
+ <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="item 1" itemValue="item 1" />
- <f:selectItem itemLabel="item 2" itemValue="item 2" />
- <f:selectItem itemLabel="item 3" itemValue="item 3" />
+ <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>
-
- <h:outputLink value="http://localhost:8080/facelets"><f:verbatim>http://localhost:8080/facelets/</f:verbatim></h:outputLink>
- <f:verbatim><br /><br /></f:verbatim>
- <a4j:commandLink onclick="Richfaces.showModalPanel('modalPanel2ID');return false;" value="show ModalPanel 2"></a4j:commandLink>
- <f:verbatim><br /><br /></f:verbatim>
- <h:outputLink onclick="Richfaces.hideModalPanel('modalPanelID');return false;" ><f:verbatim>Close</f:verbatim></h:outputLink>
- </rich:modalPanel>
-
- <rich:modalPanel id="modalPanel2ID" autosized="true" resizeable="false">
+ <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>
+ <rich:separator></rich:separator>
<br />
- <h:inputText value="input"></h:inputText>
<br />
- <h:outputLink onclick="Richfaces.hideModalPanel('modalPanel2ID');return false;" ><f:verbatim>Close</f:verbatim></h:outputLink>
-
-
+ <a4j:commandLink
+ onclick="Richfaces.showModalPanel('modalPanel2ID');return false;"
+ value="show ModalPanel 2"></a4j:commandLink>
+ <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="modalPanel3ID"
- minHeight="100"
- minWidth="200"
- moveable="true"
- resizeable="true"
- keepVisualState="true">
+
+ <rich:modalPanel id="modalPanel2ID" autosized="true" resizeable="false">
<f:facet name="header">
- <h:outputText value="Events..." />
+ <h:outputText value="HEADER for PANEL2" />
</f:facet>
<f:facet name="controls">
- <h:commandLink value="Close" onclick="Richfaces.hideModalPanel('modalPanel3ID');" />
+ <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>
- <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>
-</f:subview>
+ <a4j:commandLink
+ onclick="Richfaces.showModalPanel('modalPanel2ID');return false;"
+ value="show ModalPanel 2"></a4j:commandLink>
+ <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>
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml 2009-04-16 12:26:31 UTC (rev 13605)
+++ trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml 2009-04-16 12:54:42 UTC (rev 13606)
@@ -1,33 +1,70 @@
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich" id="ModalPanelPropertySubviewID">
-<f:subview xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" 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:graphicImage value="/pics/error.gif"
+ 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>
+ <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>
+ <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" />
@@ -37,50 +74,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>
+ onchange="submit();"></h:selectBooleanCheckbox>
<h:outputText value="resizeable:" />
<h:selectBooleanCheckbox value="#{modalPanel.resizeable}"
- onchange="submit();">
- </h:selectBooleanCheckbox>
+ 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
15 years, 2 months
JBoss Rich Faces SVN: r13605 - in trunk/test-applications/realworld2/web/src/main: java/org/richfaces/realworld/ui and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-16 08:26:31 -0400 (Thu, 16 Apr 2009)
New Revision: 13605
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ImageSizeHelper.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java
trunk/test-applications/realworld2/web/src/main/resources/messages_en.properties
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumEditInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/createAlbum.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/albumEdit.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/avatar.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefsEdit.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/register.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css
Log:
Fixing bugs
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-04-16 12:26:17 UTC (rev 13604)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-04-16 12:26:31 UTC (rev 13605)
@@ -10,7 +10,6 @@
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.Events;
import org.richfaces.realworld.manager.NavigationEnum;
@@ -65,6 +64,10 @@
}
public void search() {
+ if(!isSearchOptionSelected()){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.SEARCH_NO_OPTIONS_ERROR);
+ return;
+ }
keywords = new ArrayList<String>();
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT, NavigationEnum.SEARCH);
keywords = parse(searchQuery);
@@ -79,6 +82,10 @@
}
public void search(String keyword) {
+ if(!isSearchOptionSelected()){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.SEARCH_NO_OPTIONS_ERROR);
+ return;
+ }
Iterator<ISearchOption> it = options.iterator();
selectedKeyword = keyword.trim();
while (it.hasNext()) {
@@ -97,6 +104,17 @@
return selectedOption != null;
}
+ private boolean isSearchOptionSelected() {
+ boolean isOptionSelected = false;
+ for(ISearchOption i : options){
+ if(i.getSelected()){
+ isOptionSelected = true;
+ break;
+ }
+ }
+ return isOptionSelected;
+ }
+
public void processSelection() {
Iterator<ISearchOption> it = options.iterator();
while (it.hasNext()) {
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ImageSizeHelper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ImageSizeHelper.java 2009-04-16 12:26:17 UTC (rev 13604)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ImageSizeHelper.java 2009-04-16 12:26:31 UTC (rev 13605)
@@ -14,7 +14,7 @@
*
*/
@Name("imageSizeHelper")
-(a)Scope(ScopeType.EVENT)
+(a)Scope(ScopeType.PAGE)
public class ImageSizeHelper {
int value = Constants.DEFAULT_IMAGE_SIZEVALUE;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java 2009-04-16 12:26:17 UTC (rev 13604)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java 2009-04-16 12:26:31 UTC (rev 13605)
@@ -24,14 +24,12 @@
*
*/
@Name("userPrefsBean")
-(a)Scope(ScopeType.CONVERSATION)
+(a)Scope(ScopeType.EVENT)
public class UserPrefsHelper implements Serializable{
private static final long serialVersionUID = -1767281809514660171L;
@In IUserAction userAction;
- Boolean avatarModalOpened = false;
-
@In(required=false, scope=ScopeType.CONVERSATION) @Out(required=false, scope=ScopeType.CONVERSATION) private File avatarData;
static final SelectItem[] sexs = new SelectItem[] {
@@ -47,14 +45,6 @@
avatarData = item.getFile();
}
- public Boolean getAvatarModalOpened() {
- return avatarModalOpened;
- }
-
- public void setAvatarModalOpened(Boolean avatarModalOpened) {
- this.avatarModalOpened = avatarModalOpened;
- }
-
public File getAvatarData() {
return avatarData;
}
Modified: trunk/test-applications/realworld2/web/src/main/resources/messages_en.properties
===================================================================
--- trunk/test-applications/realworld2/web/src/main/resources/messages_en.properties 2009-04-16 12:26:17 UTC (rev 13604)
+++ trunk/test-applications/realworld2/web/src/main/resources/messages_en.properties 2009-04-16 12:26:31 UTC (rev 13605)
@@ -137,7 +137,7 @@
login.header=Please login here
login.login=Login
-login.userName=Username
+login.userName=Login
login.password=Password
login.register=Register
@@ -148,7 +148,7 @@
user.registration=Registration
user.reginfo=Registration Info:
user.firstname=First name
-user.secondname=Second Name
+user.secondname=Second name
user.login=Login
user.password=Password
user.email=Email
@@ -251,7 +251,7 @@
no_results_found=No results found
options=Options
in=in
-in_shared_albums=in Shared Albums
+in_shared_albums=in Shared
hide_options=Hide options
add_shelf=Add shelf
shelf_name=Shelf name
@@ -284,7 +284,7 @@
faq=F.A.Q.
about_demo_at_jbosswiki=About Demo at JBossWiki
about_demo_at_jbossforum=About Demo at JBossForum
-in_my_albums=in My Albums
+in_my_albums=in My
albums_small=albums
photos=photos
name=Name:
@@ -293,4 +293,4 @@
search=Search
find=Find
-my_album:=My Album:
\ No newline at end of file
+my_album:\=My Album\:
\ No newline at end of file
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumEditInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/createAlbum.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/albumEdit.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/avatar.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefsEdit.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/register.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css
===================================================================
--- trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css 2009-04-16 12:26:17 UTC (rev 13604)
+++ trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css 2009-04-16 12:26:31 UTC (rev 13605)
@@ -90,6 +90,59 @@
border: none;
}
+.avatarUpload .file-upload-stop-button{
+ display:none;
+}
+
+.file-upload-button{
+ background:#B34801;
+ color: #FFFFFF;
+ border:1px solid #888888;
+}
+
+
+.avatarUpload .rich-fileupload-ico {
+padding-left:7px;
+}
+.avatarUpload .rich-fileupload-toolbar-decor {
+width:100%;
+background-color:#D7D7D7;
+border-bottom:0px;
+border-left:0px;
+border-top:0px;
+padding:0px;
+}
+
+.avatarUpload .rich-fileupload-ico-add {
+background-image:none;
+}
+
+.avatarUpload .rich-fileupload-button-border{
+border:0px ;
+margin:0px;
+}
+
+.avatarUpload .rich-fileupload-list-decor {
+width:100%;
+background-color:D7D7D7;
+border-bottom:0px;
+border-left:0px;
+border-top:0px;
+padding:0px;
+}
+.avatarUpload .rich-fileupload-button-light{
+ padding:0px;
+ background:#B34801;
+ cursor:pointer;
+ border:1px solid #B34801;
+ }
+
+ .avatarUpload .rich-fileupload-button{
+ padding:0px;
+ background:#B34801;
+ border:1px solid #888888;
+ }
+
.footer-panel {
height: 82px;
position: relative;
15 years, 2 months
JBoss Rich Faces SVN: r13604 - in trunk/test-applications/realworld2/ejb/src/main: java/org/richfaces/realworld/service and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-16 08:26:17 -0400 (Thu, 16 Apr 2009)
New Revision: 13604
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
trunk/test-applications/realworld2/ejb/src/main/resources/META-INF/persistence.xml
trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
trunk/test-applications/realworld2/ejb/src/main/resources/realworld-ds.xml
Log:
Fixing bugs
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-04-16 12:26:17 UTC (rev 13604)
@@ -122,6 +122,9 @@
private String password;
@Transient
+ @NotNull
+ @NotEmpty
+ @Length(min=3)
private String confirmPassword;
@Temporal(TemporalType.TIMESTAMP)
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java 2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java 2009-04-16 12:26:17 UTC (rev 13604)
@@ -162,6 +162,7 @@
public static final String SHELF_PARAMETER = "shelf";
public static final String PATH_PARAMETER = "path";
public static final String IMAGE_PATH_EXIST_QUERY = "image-exist";
+ public static final String SEARCH_NO_OPTIONS_ERROR = "You must select at least one search option";
private Constants(){
}
}
\ No newline at end of file
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-04-16 12:26:17 UTC (rev 13604)
@@ -156,6 +156,7 @@
*/
public void deleteComment(Comment comment) throws RealworldException {
try{
+ em.remove(comment);
comment.getImage().removeComment(comment);
em.flush();
}
Modified: trunk/test-applications/realworld2/ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/resources/META-INF/persistence.xml 2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/resources/META-INF/persistence.xml 2009-04-16 12:26:17 UTC (rev 13604)
@@ -22,6 +22,10 @@
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
+ <property name="hibernate.format_sql" value="true"/>
+ <property name="jboss.entity.manager.factory.jndi.name"
+ value="java:/realWorldEntityManager"/>
+ <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
</properties>-->
</persistence-unit>
Modified: trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-04-16 12:26:17 UTC (rev 13604)
@@ -1,6 +1,6 @@
-INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (1, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'amarkhel', '8cb2237d0679ca88db6464eac60da96345513964', '1985-01-08', 0, 0, true);
-INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (2, 'Nick', 'Curtis', 'nkurtis(a)iba.com', 'Viking', '8cb2237d0679ca88db6464eac60da96345513964', '1978-01-08', 1, 0, true);
-INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (3, 'John', 'Smith', 'jsmith(a)jboss.com', 'Noname', '8cb2237d0679ca88db6464eac60da96345513964', '1970-01-08', 1, 0, true);
+INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (1, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'amarkhel', '8cb2237d0679ca88db6464eac60da96345513964', '1985-01-08', 0, false, true);
+INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (2, 'Nick', 'Curtis', 'nkurtis(a)iba.com', 'Viking', '8cb2237d0679ca88db6464eac60da96345513964', '1978-01-08', 1, false, true);
+INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (3, 'John', 'Smith', 'jsmith(a)jboss.com', 'Noname', '8cb2237d0679ca88db6464eac60da96345513964', '1970-01-08', 1, false, true);
INSERT INTO shelves(shelf_id, name, description, user_id, created, shared) VALUES (1, 'Nature', 'Nature pictures', 1, '2009-12-18', true);
INSERT INTO shelves(shelf_id, name, description, user_id, created, shared) VALUES (2, 'Sport', 'Nature pictures', 1, '2009-12-18', true);
@@ -594,3 +594,10 @@
INSERT INTO metatags(metatag_id, tag) VALUES (29, 'starfish');
INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) ( select 29, image_id from Images where name like '45021%');
INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) ( select 29, image_id from Images where name like '45023%');
+UPDATE albums set coveringimage_image_id=0 where album_id = 0;
+UPDATE albums set coveringimage_image_id=15 where album_id = 1;
+UPDATE albums set coveringimage_image_id=30 where album_id = 2;
+UPDATE albums set coveringimage_image_id=45 where album_id = 3;
+UPDATE albums set coveringimage_image_id=60 where album_id = 4;
+UPDATE albums set coveringimage_image_id=80 where album_id = 5;
+UPDATE albums set coveringimage_image_id=95 where album_id = 6;
\ No newline at end of file
Modified: trunk/test-applications/realworld2/ejb/src/main/resources/realworld-ds.xml
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/resources/realworld-ds.xml 2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/resources/realworld-ds.xml 2009-04-16 12:26:17 UTC (rev 13604)
@@ -7,11 +7,11 @@
<datasources>
<local-tx-datasource>
<jndi-name>realWorldDatasource</jndi-name>
- <!-- <connection-url>jdbc:postgresql://localhost:5432/realworld</connection-url>
+ <!--<connection-url>jdbc:postgresql://localhost:5432/realworld</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>realworld</user-name>
<password>realworld</password>-->
- <connection-url>jdbc:hsqldb:.</connection-url>
+ <connection-url>jdbc:hsqldb:.</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
15 years, 2 months
JBoss Rich Faces SVN: r13603 - in trunk/ui/editor/src: main/java/org/richfaces/convert/seamtext/tags and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-04-16 07:16:25 -0400 (Thu, 16 Apr 2009)
New Revision: 13603
Modified:
trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/HtmlToSeamTransformer.java
trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/HtmlTag.java
trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/OrderedListTag.java
trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/TagFactory.java
trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/UnorderedListTag.java
trunk/ui/editor/src/test/java/org/richfaces/seamparser/HtmlSeamParserTest.java
Log:
Editor: exception in seamText mode if empty element presents in ordered or unsorted list.
https://jira.jboss.org/jira/browse/RF-6770
Modified: trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/HtmlToSeamTransformer.java
===================================================================
--- trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/HtmlToSeamTransformer.java 2009-04-15 17:24:29 UTC (rev 13602)
+++ trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/HtmlToSeamTransformer.java 2009-04-16 11:16:25 UTC (rev 13603)
@@ -54,7 +54,9 @@
private void appendBody(String ... strings) {
for (String str : strings) {
- currentTag.appendBody(str);
+ if (str != null && !"".equals(str)) {
+ currentTag.appendBody(str);
+ }
}
}
Modified: trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/HtmlTag.java
===================================================================
--- trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/HtmlTag.java 2009-04-15 17:24:29 UTC (rev 13602)
+++ trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/HtmlTag.java 2009-04-16 11:16:25 UTC (rev 13603)
@@ -122,6 +122,16 @@
body = new ArrayList<Object>();
}
+ public boolean isBodyEmpty() {
+ for (Object child : body) {
+ if (child != null && !"".equals(child.toString())) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
public String printPlainEnd(){
if (isEmpty) {
// return "/>";
Modified: trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/OrderedListTag.java
===================================================================
--- trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/OrderedListTag.java 2009-04-15 17:24:29 UTC (rev 13602)
+++ trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/OrderedListTag.java 2009-04-16 11:16:25 UTC (rev 13603)
@@ -1,6 +1,6 @@
package org.richfaces.convert.seamtext.tags;
-class OrderedListTag extends HtmlTag {
+class OrderedListTag extends UnorderedListTag {
private static final long serialVersionUID = 1L;
public OrderedListTag() {
@@ -8,16 +8,6 @@
}
@Override
- public String printStart() {
- return "";
- }
-
- @Override
- public String printEnd() {
- return "\n";
- }
-
- @Override
protected void appendChildTag(StringBuilder res, HtmlTag child) {
if (LI.equals(child.getName())) {
res.append(TagFactory.SEAM_HASH).append(child.print());
Modified: trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/TagFactory.java
===================================================================
--- trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/TagFactory.java 2009-04-15 17:24:29 UTC (rev 13602)
+++ trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/TagFactory.java 2009-04-16 11:16:25 UTC (rev 13603)
@@ -33,7 +33,17 @@
new LineTag(H2, "++ "),
new LineTag(H3, "+++ "),
new LineTag(H4, "++++ "),
- new LineTag(LI, ""),
+ new LineTag(LI, "") {
+
+ @Override
+ public String printBody() {
+ if (isBodyEmpty()) {
+ return " ";
+ }
+
+ return super.printBody();
+ }
+ },
getNewTagDefinition(P, "", "\n\n"),
new FormattingTag(I, SEAM_STAR),
Modified: trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/UnorderedListTag.java
===================================================================
--- trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/UnorderedListTag.java 2009-04-15 17:24:29 UTC (rev 13602)
+++ trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/UnorderedListTag.java 2009-04-16 11:16:25 UTC (rev 13603)
@@ -1,12 +1,20 @@
package org.richfaces.convert.seamtext.tags;
-class UnorderedListTag extends HtmlTag{
+import sun.security.action.GetBooleanAction;
+
+import com.sun.java_cup.internal.production;
+
+class UnorderedListTag extends HtmlTag {
private static final long serialVersionUID = 1L;
public UnorderedListTag() {
super(UL);
}
+ protected UnorderedListTag(String name) {
+ super(name);
+ }
+
@Override
public String printStart() {
return "";
Modified: trunk/ui/editor/src/test/java/org/richfaces/seamparser/HtmlSeamParserTest.java
===================================================================
--- trunk/ui/editor/src/test/java/org/richfaces/seamparser/HtmlSeamParserTest.java 2009-04-15 17:24:29 UTC (rev 13602)
+++ trunk/ui/editor/src/test/java/org/richfaces/seamparser/HtmlSeamParserTest.java 2009-04-16 11:16:25 UTC (rev 13603)
@@ -101,7 +101,7 @@
+ "~deleted text~, super^scripts^ or_underlines_";
private final static String SEAM_TEXT_EXPRESSION_29 = "A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9";
-
+
public HtmlSeamParserTest(String name) {
super(name);
}
@@ -243,6 +243,10 @@
assertHtml2SeamConverting("<!-- Hello Cfif -->");
}
+ public void testSkipComment_() throws Exception {
+ assertHtml2SeamConverting("<ul><li/></ul><ol><li/></ol><ul />");
+ }
+
public void testUglyTextFromWord() throws Exception {
final String str = "<p><meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\"/><meta content=\"Word.Document\" name=\"ProgId\"/><meta content=\"Microsoft Word 12\" name=\"Generator\"/><meta content=\"Microsoft Word 12\" name=\"Originator\"/><link href=\"file:///E:\\TEMP~1\\msohtmlclip1\\01\\clip_filelist.xml\" rel=\"File-List\"/><link href=\"file:///E:\\TEMP~1\\msohtmlclip1\\01\\clip_themedata.thmx\" rel=\"themeData\"/><link href=\"file:///E:\\TEMP~1\\msohtmlclip1\\01\\clip_colorschememapping.xml\" rel=\"colorSchemeMapping\"/>" +
"<!--[if gte mso 9]><xml>\n" +
@@ -729,7 +733,7 @@
throws Exception {
final String seamText = convertHtmlToSeamText(htmlText);
- System.out.println("seamText = \n" + seamText);
+ System.out.println("seamText = \n'" + seamText + "'");
final SeamTextParser seamParser = new SeamTextParser(
new SeamTextLexer(new StringReader(seamText)));
15 years, 2 months
JBoss Rich Faces SVN: r13602 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-04-15 13:24:29 -0400 (Wed, 15 Apr 2009)
New Revision: 13602
Modified:
trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
trunk/docs/userguide/en/src/main/docbook/included/changeExpandListener.xml
Log:
https://jira.jboss.org/jira/browse/RF-6805 links to the corresponding java docs are added, some methods names are fixed.
Modified: trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml 2009-04-15 16:10:40 UTC (rev 13601)
+++ trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml 2009-04-15 17:24:29 UTC (rev 13602)
@@ -77,8 +77,8 @@
a good place for update the list of re-rendered components, for example.
Ajax Listener is not invoked for non-Ajax request and when RichFaces works in "Ajax Request generates
Non-Ajax Response" mode. Therefore, ajax Listener invocation is a good indicator that Ajax response is going to be processed.
-Attribute <emphasis><property>"type"</property></emphasis> described in the following <link linkend="ajaxListener"> chapter</link>. It defines the fully qualified Java class name for listener. This class implements <code>org.ajax4jsf.event.AjaxListener</code>
- <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">interface</ulink>. You can access to the source of the event (Ajax component) using <code>event.getSource()</code> call.
+Attribute <emphasis><property>"type"</property></emphasis> described in the following <link linkend="ajaxListener"> chapter</link>. It defines the fully qualified Java class name for listener. This class implements
+ <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."><code>org.ajax4jsf.event.AjaxListener</code></ulink>interface. You can access to the source of the event (Ajax component) using <code>java.util.EventObject.getSource() </code> call.
</para>
<para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2009-04-15 16:10:40 UTC (rev 13601)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2009-04-15 17:24:29 UTC (rev 13602)
@@ -562,12 +562,13 @@
<itemizedlist>
<listitem>
<para>
- <code>CalendarDataModel</code>
+ <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."><code>CalendarDataModel</code></ulink>
+
</para>
</listitem>
<listitem>
- <para>
- <code>CalendarDataModelItem</code>
+ <para> <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."><code>CalendarDataModelItem</code></ulink>
+
</para>
</listitem>
</itemizedlist>
@@ -579,7 +580,7 @@
</listitem>
</itemizedlist>
<para>This method is called when it's necessary to represent the next
- block of <code>CalendarDataItems</code>. It happens during navigation
+ block of <code>CalendarDataModelItem</code>. It happens during navigation
to the next (previous) month or in any other case when calendar
renders. This method is called in <emphasis>
<property>"Ajax"</property>
Modified: trunk/docs/userguide/en/src/main/docbook/included/changeExpandListener.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/changeExpandListener.xml 2009-04-15 16:10:40 UTC (rev 13601)
+++ trunk/docs/userguide/en/src/main/docbook/included/changeExpandListener.xml 2009-04-15 17:24:29 UTC (rev 13602)
@@ -75,7 +75,7 @@
</para>
<para>
Attribute <emphasis><property>"type"</property></emphasis> defines the fully qualified Java class name for the listener.
- This class should implement <code>org.richfaces.event.NodeExpandedListener</code> <ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">interface</ulink>.
+ This class should implement <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."><code>org.richfaces.event.NodeExpandedListener</code></ulink>interface.
</para>
<para>
15 years, 2 months
JBoss Rich Faces SVN: r13601 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-04-15 12:10:40 -0400 (Wed, 15 Apr 2009)
New Revision: 13601
Modified:
trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
Log:
corrected a mistake
Modified: trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml 2009-04-15 14:20:21 UTC (rev 13600)
+++ trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml 2009-04-15 16:10:40 UTC (rev 13601)
@@ -512,10 +512,7 @@
<entry>background-color</entry>
</row>
- <row>
- <entry>panelBorderColor</entry>
- <entry>border-color</entry>
- </row>
+
<row>
<entry>panelBorderColor</entry>
15 years, 2 months
JBoss Rich Faces SVN: r13600 - trunk/ui/progressBAR/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-04-15 10:20:21 -0400 (Wed, 15 Apr 2009)
New Revision: 13600
Modified:
trunk/ui/progressBAR/src/main/config/component/progressBar.xml
Log:
https://jira.jboss.org/jira/browse/RF-6787 Deprecated markers in the table of attributes. "Deprecated" should be written in uppercase - fixed
Modified: trunk/ui/progressBAR/src/main/config/component/progressBar.xml
===================================================================
--- trunk/ui/progressBAR/src/main/config/component/progressBar.xml 2009-04-15 13:24:18 UTC (rev 13599)
+++ trunk/ui/progressBAR/src/main/config/component/progressBar.xml 2009-04-15 14:20:21 UTC (rev 13600)
@@ -84,7 +84,7 @@
<property>
<name>progressVar</name>
<classname>java.lang.String</classname>
- <description>Deprecated. Provides access to value of the component on the client</description>
+ <description>DEPRECATED. Provides access to value of the component on the client</description>
</property>
<property>
<name>styleClass</name>
15 years, 2 months