Author: amarkhel
Date: 2010-07-13 14:25:47 -0400 (Tue, 13 Jul 2010)
New Revision: 18004
Modified:
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPopupPanel.java
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
root/ui/output/trunk/panels/ui/src/main/templates/popupPanel.template.xml
root/ui/output/trunk/panels/ui/src/test/resources/panelTest.xhtml
root/ui/output/trunk/panels/ui/src/test/resources/popupPanelText.xhtml
Log:
Modified:
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPopupPanel.java
===================================================================
---
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPopupPanel.java 2010-07-13
18:19:36 UTC (rev 18003)
+++
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPopupPanel.java 2010-07-13
18:25:47 UTC (rev 18004)
@@ -41,7 +41,7 @@
public static final String COMPONENT_FAMILY = "org.richfaces.PopupPanel";
protected enum PropertyKeys {
- width, height, zIndex, minHeight, minWidth, maxHeight, maxWidth, top, left,
moveable, autosized, modal, domElementAttachment, controlsClass, show, headerClass,
keepVisualState, overlapEmbedObjects, resizeable, shadowDepth, shadowOpacity, style,
styleClass, visualOptions
+ width, height, zIndex, trimOverlayedElements, minHeight, minWidth, maxHeight,
maxWidth, top, left, moveable, autosized, modal, domElementAttachment, controlsClass,
show, headerClass, keepVisualState, overlapEmbedObjects, resizeable, shadowDepth,
shadowOpacity, style, styleClass, visualOptions
}
public Map<String, Object> getHandledVisualOptions() {
@@ -188,21 +188,24 @@
}
public void setResizeable(boolean resizeable) {
- getStateHelper().put(PropertyKeys.resizeable, resizeable);
- }
+ getStateHelper().put(PropertyKeys.resizeable, resizeable);
+ }
- /*
- * public boolean isTrimOverlayedElements() { return (Boolean)
- * getStateHelper().eval(PropertyKeys.trimOverlayedElements, false); }
- *
- * public void setTrimOverlayedElements(boolean trimOverlayedElements) {
- * getStateHelper().put(PropertyKeys.trimOverlayedElements, trimOverlayedElements);
}
- */
+ public boolean isTrimOverlayedElements() {
+ return (Boolean) getStateHelper().eval(
+ PropertyKeys.trimOverlayedElements, false);
+ }
- public String getDomElementAttachment() {
- return (String) getStateHelper().eval(PropertyKeys.domElementAttachment);
- }
+ public void setTrimOverlayedElements(boolean trimOverlayedElements) {
+ getStateHelper().put(PropertyKeys.trimOverlayedElements,
+ trimOverlayedElements);
+ }
+ public String getDomElementAttachment() {
+ return (String) getStateHelper()
+ .eval(PropertyKeys.domElementAttachment);
+ }
+
public void setDomElementAttachment(String domElementAttachment) {
getStateHelper().put(PropertyKeys.domElementAttachment, domElementAttachment);
}
Modified:
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
===================================================================
---
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2010-07-13
18:19:36 UTC (rev 18003)
+++
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2010-07-13
18:25:47 UTC (rev 18004)
@@ -147,6 +147,13 @@
return result.toString();
}
+ public String getStyleIfTrimmed(UIComponent panel){
+
if(panel.getAttributes().get("trimOverlayedElements").equals(Boolean.TRUE)) {
+ return "position: relative, z-index : 0";
+ }
+ return "";
+ }
+
private void writeOption(StringBuilder builder, String attribbute, Object value,
UIComponent component,
boolean isString) {
if (component.getAttributes().get(attribbute) != null) {
Modified: root/ui/output/trunk/panels/ui/src/main/templates/popupPanel.template.xml
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/templates/popupPanel.template.xml 2010-07-13
18:19:36 UTC (rev 18003)
+++ root/ui/output/trunk/panels/ui/src/main/templates/popupPanel.template.xml 2010-07-13
18:25:47 UTC (rev 18004)
@@ -16,7 +16,6 @@
<cc:implementation>
<cdk:call expression="checkOptions(facesContext, component)" />
<div id="#{clientId}" style="visibility: hidden;">
- <button class="mp-button"
id="#{clientId}FirstHref"></button>
<c:if test="#{component.attributes['modal']}">
<div id="#{clientId}_shade"
onclick="#{component.attributes['onmaskclick']}"
ondblclick="#{component.attributes['onmaskdblclick']}"
@@ -29,27 +28,22 @@
</c:if>
<div id="#{clientId}_shadow" class="mp_shadow"/>
- <div id="#{clientId}_container"
cdk:passThroughWithExclusions="id,style,class,styleClass"
class="mp_container #{component.attributes['styleClass']}">
- <div id="#{clientId}_header" class="mp_header
#{component.attributes['headerClass']}" >
+ <div id="#{clientId}_container"
cdk:passThruWithExclusions="id,style,class,styleClass" class="mp_container
#{component.attributes['styleClass']}">
+
<c:if test="#{component.getFacet('header')!=null and
component.getFacet('header').rendered}">
+ <div id="#{clientId}_header" class="mp_header
#{component.attributes['headerClass']}" >
<div id="#{clientId}_header_content"
class="mp_header_content">
- <c:if test="#{component.attributes['autosized']}">
- <span id="#{clientId}_headerSpan">
<cdk:call expression="renderHeaderFacet(facesContext, component)"/>
- </span>
- </c:if>
- <c:if test="#{!component.attributes['autosized']}">
- <cdk:call expression="renderHeaderFacet(facesContext, component)"/>
- </c:if>
</div>
+ </div>
</c:if>
<c:if test="#{component.getFacet('controls')!=null and
component.getFacet('controls').rendered}">
<div id="#{clientId}_header_controls" class="mp_header_controls
#{component.attributes['controlsClass']}">
<cdk:call expression="renderControlsFacet(facesContext,
component)"/>
</div>
</c:if>
- </div>
- <div id="#{clientId}_content_scroller" class="mp_content_scroller
#{component.attributes['scrollerClass']}">
+
+ <div id="#{clientId}_content_scroller"
style="#{getStyleIfTrimmed(component)}"
class="mp_content_scroller}">
<div id="#{clientId}_content" class="mp_content"
style="#{component.attributes['style']}">
<cdk:call expression="renderChildren(facesContext, component)"/>
</div>
@@ -68,9 +62,6 @@
</div>
-
-
-<button class="mp-button"
id="#{clientId}LastHref"></button>
</div>
<cdk:object type="java.lang.String" name="script"
value="#{buildScript(facesContext, component)}" />
<cdk:object type="java.lang.String" name="showScript"
value="#{buildShowScript(facesContext, component)}" />
Modified: root/ui/output/trunk/panels/ui/src/test/resources/panelTest.xhtml
===================================================================
--- root/ui/output/trunk/panels/ui/src/test/resources/panelTest.xhtml 2010-07-13 18:19:36
UTC (rev 18003)
+++ root/ui/output/trunk/panels/ui/src/test/resources/panelTest.xhtml 2010-07-13 18:25:47
UTC (rev 18004)
@@ -7,92 +7,54 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:panel="http://richfaces.org/panels"
xmlns:rich="http://richfaces.org/rich">
-<!--
-JBoss, Home of Professional Open Source
-Copyright ${year}, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site:
http://www.fsf.org.
--->
<h:head>
<title>Richfaces ExtendedDataTable Test</title>
</h:head>
<h:body>
- <panel:panel styleClass="panel" id="panelWithFacet">
- <f:facet name="header">
- Write your own custom rich components with built-in AJAX support
- </f:facet>
- The CDK includes a code-generation facility and a
- templating facility using a JSP-like syntax. These capabilities help
- to avoid a routine process of a component creation. The component factory
- works like a well-oiled machine allowing the creation of first-class
- rich components with built-in Ajax functionality even more easily than
- the creation of simpler components by means of the traditional coding
- approach.
- </panel:panel>
- <panel:panel id="simplePanel"
bodyClass="rich-laguna-panel-no-header">
- RichFaces is a library for adding rich user interface features to JSF
- applications. It extends the Ajax4jsf framework to include a large
- (and growing) set of powerful rich AJAX-enabled components that come
- with extensive skins support.
- </panel:panel>
- <panel:panel id="simplePanelWithTextHeader"
header="rich-laguna-panel-no-header">
- RichFaces is a library for adding rich user interface features to JSF
- applications. It extends the Ajax4jsf framework to include a large
- (and growing) set of powerful rich AJAX-enabled components that come
- with extensive skins support.
- </panel:panel>
- <panel:panel id="nestedPanelContainer" style="padding:0"
headerClass="outpanelHeader">
- <f:facet name="header">
- ||||
- </f:facet>
- <h2 align="center"><h:outputText value="Benefits of Using
Ajax4jsf" /></h2>
- <h:panelGrid columns="2" columnClasses="gridContent">
- <panel:panel id="nestedPanel1"
bodyClass="inpanelBody">
- <f:facet name="header">
- For Application Developers
- </f:facet>
- <ul>
- <li>Production quality Open Source</li>
- <li>Does Open Source and has an Open Architecture</li>
- <li>Compatible with any JSF Implementation - MyFaces, JSF1.1,
JSF1.2</li>
- <li>Allows to Ajaxify JSF application without writing
Javascript</li>
- <li>Works with standard and third party components</li>
- <li>Adds the Ajax capability to existing non-Ajax
components</li>
- </ul>
- </panel:panel>
- <panel:panel id="nestedPanel2"
bodyClass="inpanelBody">
- <f:facet name="header" >
- For Component Developers
- </f:facet>
- <ul>
- <li>Ajax4jsf is Open Source and has an Open
Architecture</li>
- <li>Gives an API to create components with built-in Ajax
support</li>
- <li>Has a Component Development Kit for rapid
development</li>
- <li>Allows to skin the look-n-feel using both CSS and set of
skin-parameters</li>
- <li>Automatically generates the unit test-cases for developing
components</li>
- <li>Allows to pack javascript code, images, css inside the
final jar</li>
- </ul>
- </panel:panel>
- </h:panelGrid>
- </panel:panel>
+ <panel:popupPanel domElementAttachment="body"
+ visualOptions="{left:400px;}" moveable="true"
+ overlapEmbedObjects="true" keepVisualState="true"
+ onmaskclick="alert('1')" width="600"
height="400" id="panel"
+ left="500px" top="300px">
+ <f:facet name="header">
+ Write your own custom rich components with built-in AJAX
+ </f:facet>
+ <h:form>
+ <h:panelGroup layout="block"
+ style="width:500px,height:400px;">
+ The CDK includes a code-generation facility and a
+ templating facility using a JSP-like syntax. These
+ capabilities help to avoid a routine process of a
+ component creation. The component factory works like
+ a well-oiled machine allowing the creation of
+ first-class rich components with built-in Ajax
+ functionality even more easily than the creation of
+ simpler components by means of the traditional
+ coding approach.
+
+
+ <h:inputText value="aaa" />
+ <a href="#"
+ onclick="RichFaces.$('panel').setSize(500, 300)"
tabindex="0">
+ setSize
+ </a>
+ <a href="#"
+ onclick="RichFaces.$('panel').resize(20, 50)"
tabindex="0">
+ resize
+ </a>
+ <a href="#"
+ onclick="RichFaces.$('panel').move(20, 50)"
tabindex="0">
+ move
+ </a>
+
+ <a href="#"
+ onclick="RichFaces.$('panel').moveTo(20, 50)"
tabindex="0">
+ moveTo
+ </a>
+ </h:panelGroup>
+ </h:form>
+ </panel:popupPanel>
</h:body>
</html>
Modified: root/ui/output/trunk/panels/ui/src/test/resources/popupPanelText.xhtml
===================================================================
--- root/ui/output/trunk/panels/ui/src/test/resources/popupPanelText.xhtml 2010-07-13
18:19:36 UTC (rev 18003)
+++ root/ui/output/trunk/panels/ui/src/test/resources/popupPanelText.xhtml 2010-07-13
18:25:47 UTC (rev 18004)
@@ -1,82 +1,58 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:a4j="http://richfaces.org/a4j"
xmlns:panel="http://richfaces.org/panels"
xmlns:rich="http://richfaces.org/rich">
-<!--
-JBoss, Home of Professional Open Source
-Copyright ${year}, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site:
http://www.fsf.org.
--->
<h:head>
<title>Richfaces ExtendedDataTable Test</title>
</h:head>
<h:body>
+ <panel:popupPanel domElementAttachment="body"
+ visualOptions="{left:400px;}" moveable="true"
+ overlapEmbedObjects="true" keepVisualState="true"
+ onmaskclick="alert('1')" width="600"
height="400" id="panel"
+ left="500px" top="300px">
+ <f:facet name="header">
+ Write your own custom rich components with built-in AJAX
+ </f:facet>
+ <h:form>
+ <h:panelGroup layout="block"
+ style="width:500px,height:400px;">
+ The CDK includes a code-generation facility and a
+ templating facility using a JSP-like syntax. These
+ capabilities help to avoid a routine process of a
+ component creation. The component factory works like
+ a well-oiled machine allowing the creation of
+ first-class rich components with built-in Ajax
+ functionality even more easily than the creation of
+ simpler components by means of the traditional
+ coding approach.
- <panel:popupPanel domElementAttachment="body"
visualOptions="{left:400px;}" moveable="true"
overlapEmbedObjects="true" keepVisualState="true"
onmaskclick="alert('1')" width="600" height="400"
id="panel" left="500px" top="300px">
- <f:facet name="header">
- Write your own custom rich components with built-in AJAX
- </f:facet>
- <h:form>
- <h:panelGroup layout="block"
style="width:500px,height:400px;">
- The CDK includes a code-generation facility and a
- templating facility using a JSP-like syntax. These capabilities help
- to avoid a routine process of a component creation. The component factory
- works like a well-oiled machine allowing the creation of first-class
- rich components with built-in Ajax functionality even more easily than
- the creation of simpler components by means of the traditional coding
- approach.
- <a4j:commandLink value="Hide">
-
- <rich:componentControl target="panel" operation="hide"
event="click">
- </rich:componentControl>
- </a4j:commandLink>
+ <h:inputText value="aaa" />
+ <a href="#"
+ onclick="RichFaces.$('panel').setSize(500, 300)"
tabindex="0">
+ setSize
+ </a>
+ <a href="#"
+ onclick="RichFaces.$('panel').resize(20, 50)"
tabindex="0">
+ resize
+ </a>
+ <a href="#"
+ onclick="RichFaces.$('panel').move(20, 50)"
tabindex="0">
+ move
+ </a>
-<h:inputText value="aaa"/>
-<a href="#" onclick="RichFaces.$('panel').setSize(500,
300)" tabindex="0">setSize
- </a>
- <a href="#" onclick="RichFaces.$('panel').resize(20,
50)" tabindex="0">resize
- </a>
- <a href="#" onclick="RichFaces.$('panel').move(20,
50)" tabindex="0">move
- </a>
-
- <a href="#" onclick="RichFaces.$('panel').moveTo(20,
50)" tabindex="0">moveTo
- </a>
- </h:panelGroup>
- </h:form>
- </panel:popupPanel>
-
- <a4j:commandLink value="Show">
-
- <rich:componentControl target="panel" operation="show"
event="click">
- </rich:componentControl>
- </a4j:commandLink>
-
+ <a href="#"
+ onclick="RichFaces.$('panel').moveTo(20, 50)"
tabindex="0">
+ moveTo
+ </a>
+ </h:panelGroup>
+ </h:form>
+ </panel:popupPanel>
</h:body>
-</html>
\ No newline at end of file
+</html>