You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2007/01/15 19:06:17 UTC
svn commit: r496420 - in /myfaces/tobago/trunk:
core/src/main/java/org/apache/myfaces/tobago/renderkit/html/
example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/
example/demo/src/main/webapp/WEB-INF/classes/ example/demo/sr...
Author: bommel
Date: Mon Jan 15 10:06:14 2007
New Revision: 496420
URL: http://svn.apache.org/viewvc?view=rev&rev=496420
Log:
(TOBAGO-217) Create a popup ref tag
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java
myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/classes/log4j.xml
myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tag
myfaces/tobago/trunk/example/demo/src/main/webapp/overview/sheetControl.jsp
myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/WEB-INF/classes/log4j.xml
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java?view=diff&rev=496420&r1=496419&r2=496420
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java Mon Jan 15 10:06:14 2007
@@ -666,6 +666,9 @@
command.addActionListener(new PopupActionListener(popup));
}
}
+ // TODO find a better way
+ boolean popupAction = component instanceof UICommand
+ && ComponentUtil.containsPopupActionListener((UICommand) component);
//String type = (String) component.getAttributes().get(ATTR_TYPE);
//String command = (String) component.getAttributes().get(ATTR_ACTION_STRING);
@@ -690,7 +693,7 @@
if (componentId != null && componentId.length == 1) {
- if (component.getFacet(FACET_POPUP) !=null) {
+ if (popupAction) {
onclick = "Tobago.openPopupWithAction('" + getComponentId(facesContext, component, componentId[0]) + "', '"
+ clientId + "')";
} else {
Modified: myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java?view=diff&rev=496420&r1=496419&r2=496420
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java (original)
+++ myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java Mon Jan 15 10:06:14 2007
@@ -31,9 +31,14 @@
private static final Log LOG = LogFactory.getLog(SimpleTabChangeListener.class);
+
+ public SimpleTabChangeListener() {
+ LOG.error("new SimpleTabChangeListener " +this);
+ }
+
public void processTabChange(TabChangeEvent tabChangeEvent) {
LOG.error("TabState has Changed: from tabIndex " + tabChangeEvent.getOldState()
- + " to tabIndex " + tabChangeEvent.getNewState());
+ + " to tabIndex " + tabChangeEvent.getNewState()+ " " + this);
}
}
Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/classes/log4j.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/classes/log4j.xml?view=diff&rev=496420&r1=496419&r2=496420
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/classes/log4j.xml (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/classes/log4j.xml Mon Jan 15 10:06:14 2007
@@ -94,13 +94,13 @@
<priority value="debug" />
</category>
- <!--<category name="org.apache.myfaces.tobago.component.UITreeNode">-->
- <!--<priority value="debug" />-->
- <!--</category>-->
+ <category name="org.apache.myfaces.tobago.event">
+ <priority value="error" />
+ </category>
- <!--<category name="org.apache.myfaces.tobago.renderkit.InputRendererBase">
- <priority value="debug" />
- </category>-->
+ <category name="org.apache.myfaces.tobago.renderkit.CommandRendererBase">
+ <priority value="error" />
+ </category>
<root>
<priority value="error" />
Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tag
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tag?view=diff&rev=496420&r1=496419&r2=496420
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tag (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tag Mon Jan 15 10:06:14 2007
@@ -22,12 +22,6 @@
/><tc:page label="#{overviewBundle.pageTitle}" id="page"
width="750px" height="600px">
-<%--
- <f:facet name="onLoad">
- <tc:command />
- </f:facet>
---%>
-
<jsp:include page="/overview/menubar.jsp" />
<%--f:facet name="backButtonDetector">
<tc:hidden value="#{overviewNavigation.currentRequestTime}"
Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/overview/sheetControl.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/overview/sheetControl.jsp?view=diff&rev=496420&r1=496419&r2=496420
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/overview/sheetControl.jsp (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/overview/sheetControl.jsp Mon Jan 15 10:06:14 2007
@@ -114,7 +114,7 @@
</f:facet>
<tc:sheet value="#{demo.solarList}" id="sheet"
- columns="3*;1*;3*;3*;3*;3*" var="luminary"
+ columns="3*;1*;1*;3*;3*;3*;3*" var="luminary"
state="#{demo.sheetState}"
showHeader="#{overviewController.sheetConfig.sheetShowHeader}"
showRowRange="#{overviewController.sheetConfig.sheetRowPagingPosition}"
@@ -131,6 +131,12 @@
</f:facet>
<tc:column label="#{overviewBundle.solarArrayName}" id="name" sortable="true">
<tc:out value="#{luminary.name}" id="t_name"/>
+ </tc:column>
+ <tc:column label="Button">
+ <tc:button >
+ <tc:attribute name="renderedPartially" value=":page:sheetConfigPopup"/>
+ <tc:popupReference for=":page:sheetConfigPopup"></tc:popupReference>
+ </tc:button>
</tc:column>
<tc:column label="#{overviewBundle.solarArrayNumber}" id="number" sortable="false" align="center">
<tc:out value="#{luminary.number}" id="t_number"/>
Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?view=diff&rev=496420&r1=496419&r2=496420
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Mon Jan 15 10:06:14 2007
@@ -359,16 +359,23 @@
/**
* Submitting the page with specified actionId.
*/
- submitAction: function(actionId) {
+ submitAction: function(actionId, target) {
Tobago.Transport.request(function() {
var req = Tobago.Transport.requests.shift(); // remove this from queue
LOG.debug("request removed :" + req.toString());
var oldAction = Tobago.action.value;
+ var oldTarget = Tobago.form.target;
Tobago.action.value = actionId;
+ if (target) {
+ Tobago.action.target = target;
+ }
Tobago.onSubmit();
// LOG.debug("submit form with action: " + Tobago.action.value);
Tobago.form.submit();
Tobago.action.value = oldAction;
+ if (target) {
+ Tobago.action.target = oldTarget;
+ }
}, true);
},
Modified: myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/WEB-INF/classes/log4j.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/WEB-INF/classes/log4j.xml?view=diff&rev=496420&r1=496419&r2=496420
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/WEB-INF/classes/log4j.xml (original)
+++ myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/WEB-INF/classes/log4j.xml Mon Jan 15 10:06:14 2007
@@ -39,15 +39,15 @@
</layout>
</appender>
-<!--
- <category name="org.apache.myfaces">
+
+ <category name="org.apache.myfaces.tobago.ajax">
<priority value="debug" />
</category>
- <category name="javax.faces">
+ <category name="org.apache.myfaces.tobago.renderkit.CommandRendererBase">
<priority value="debug" />
</category>
--->
+
<root>
<priority value="info" />