JBoss Rich Faces SVN: r21255 - trunk/ui/misc/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-27 04:06:26 -0500 (Thu, 27 Jan 2011)
New Revision: 21255
Modified:
trunk/ui/misc/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java
Log:
RF-9745 rich:componentControl - when @operation=null, JS exception is thrown
Modified: trunk/ui/misc/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java
===================================================================
--- trunk/ui/misc/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java 2011-01-27 00:14:48 UTC (rev 21254)
+++ trunk/ui/misc/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java 2011-01-27 09:06:26 UTC (rev 21255)
@@ -85,13 +85,16 @@
FacesContext facesContext = behaviorContext.getFacesContext();
ComponentControlBehavior controlBehavior = (ComponentControlBehavior) behavior;
+ String apiFunctionName = controlBehavior.getOperation();
+ // Fix https://issues.jboss.org/browse/RF-9745
+ if (apiFunctionName == null || apiFunctionName.trim().length() == 0) {
+ return "";
+ }
JSFunctionDefinition callback = new JSFunctionDefinition();
callback.addParameter(new JSReference(REF_EVENT));
callback.addParameter(new JSReference(REF_COMPONENT));
- String apiFunctionName = controlBehavior.getOperation();
-
// create callback function
StringBuffer script = new StringBuffer();
script.append(REF_COMPONENT).append("['").append(apiFunctionName).append("'].").append("apply").append("(");
13 years, 11 months
JBoss Rich Faces SVN: r21254 - in trunk/ui/validator/ui/src: test/java/org/richfaces/javascript/client/message and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2011-01-26 19:14:48 -0500 (Wed, 26 Jan 2011)
New Revision: 21254
Modified:
trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js
trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/richfaces-csv.js
trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/DocumentReadyTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/SendMessageTest.java
Log:
CODING IN PROGRESS - issue RF-10064: Finish rich:message HTML design
https://issues.jboss.org/browse/RF-10064
Modified: trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js
===================================================================
--- trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js 2011-01-27 00:14:17 UTC (rev 21253)
+++ trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js 2011-01-27 00:14:48 UTC (rev 21254)
@@ -44,28 +44,53 @@
var $super = rf.ui.Message.$super;
var defaultOptions = {
-
+ showSummary:true,
+ level:0
};
+ var severetyClasses=["rf-msg-inf","rf-msg-wrn","rf-msg-err","rf-msg-ftl"];
var componentHash = {};
var componentIndex = 0;
var onMessage = function (event, element, data) {
+ var content = $(rf.getDomElement(this.id));
if (!this.options.forComponentId) {
var index = componentHash[data.sourceId];
if (typeof index != undefined) {
$(rf.getDomElement(this.id+index)).remove();
}
- var content = content = $(rf.getDomElement(this.id));
-
componentIndex ++;
- if (data.message) content.append('<li id="'+this.id+componentIndex+'">'+data.message.summary+'</li>');
+ renderMessage.call(this,componentIndex,data.message);
componentHash[data.sourceId] = componentIndex;
} else if (this.options.forComponentId==data.sourceId) {
- rf.getDomElement(this.id).innerHTML = data.message ? '<li>'+data.message.summary+'</li>' : '';
+ content.empty();
+ renderMessage.call(this,0,data.message);
}
}
+
+ var renderMessage = function(index,message){
+ if(message && message.severity >= this.options.level){
+ var content = $(rf.getDomElement(this.id));
+ var msgContent = "<span class='"+severetyClasses[message.severity]+"' id='"+this.id+index+"'";
+ if(message.summary){
+ if(this.options.tooltip){
+ msgContent = msgContent+" title='"+message.summary+"'>";
+ } else if(this.options.showSummary ){
+ msgContent = msgContent + "><span class='rf-msg-sum'>"+message.summary+"</span>";
+ } else {
+ msgContent = msgContent+">";
+ }
+ } else {
+ msgContent = msgContent+">";
+ }
+ if(this.options.showDetail && message.detail){
+ msgContent = msgContent + "<span class='rf-msg-dtl'>"+message.detail+"</span>";
+ }
+ msgContent = msgContent+"</span>"
+ content.append(msgContent);
+ }
+ }
$.extend(rf.ui.Message.prototype, {
name: "Message",
Modified: trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/richfaces-csv.js
===================================================================
--- trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/richfaces-csv.js 2011-01-27 00:14:17 UTC (rev 21253)
+++ trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/richfaces-csv.js 2011-01-27 00:14:48 UTC (rev 21254)
@@ -53,15 +53,18 @@
$.extend(_messages, messagesObject);
},
getMessage: function(customMessage, messageId, values) {
- var message = customMessage ? customMessage : _messages[messageId] || {detail:"",summary:""};
- return {detail:__interpolateMessage(message.detail,values),summary:__interpolateMessage(message.summary,values)};
+ var message = customMessage ? customMessage : _messages[messageId] || {detail:"",summary:"",severity:0};
+ return {detail:__interpolateMessage(message.detail,values),summary:__interpolateMessage(message.summary,values),severity:message.severity};
},
interpolateMessage: function(message,values){
- return {detail:__interpolateMessage(message.detail,values),summary:__interpolateMessage(message.summary,values)};
+ return {detail:__interpolateMessage(message.detail,values),summary:__interpolateMessage(message.summary,values),severity:message.severity};
},
sendMessage: function (componentId, message) {
rf.Event.fire(window.document, rf.Event.MESSAGE_EVENT_TYPE, {'sourceId':componentId, 'message':message});
},
+ clearMessage: function(componentId){
+ rf.Event.fire(window.document, rf.Event.MESSAGE_EVENT_TYPE, {'sourceId':componentId });
+ },
validate: function (event, id, element, params) {
var value = __getValue(element || id);
var convertedValue;
@@ -71,6 +74,7 @@
if (converter.f)
convertedValue = converter.f(value,id,converter.p,converter.m);
} catch (e){
+ e.severity=2;
rf.csv.sendMessage(id, e);
return false;
}
@@ -88,6 +92,7 @@
}
}
} catch (e) {
+ e.severity=2;
rf.csv.sendMessage(id, e);
return false;
}
@@ -95,7 +100,7 @@
if(!params.da && params.a){
params.a.call(element,event,id);
} else {
- rf.csv.sendMessage(id, "");
+ rf.csv.clearMessage(id);
}
return true;
},
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java 2011-01-27 00:14:17 UTC (rev 21253)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java 2011-01-27 00:14:48 UTC (rev 21254)
@@ -50,7 +50,7 @@
@Override
protected String getMessageContent() {
- return "<li>Error</li>";
+ return "<span class='rf-msg-err'><span class='rf-msg-sum'>"+ERROR_MESSAGE+"</span><span>";
}
@Override
protected String getJavaScriptFunctionName() {
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/DocumentReadyTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/DocumentReadyTest.java 2011-01-27 00:14:17 UTC (rev 21253)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/DocumentReadyTest.java 2011-01-27 00:14:48 UTC (rev 21254)
@@ -23,12 +23,9 @@
package org.richfaces.javascript.client.message;
-import static org.junit.Assert.*;
-
import org.jboss.test.qunit.Qunit.Builder;
import org.junit.Test;
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.javascript.host.Event;
/**
@@ -40,15 +37,12 @@
@Override
protected Builder createQunitPage() {
- return super.createQunitPage().loadContent("$(document).ready(function(){"+MESSAGE_INIT+"});");
+ return super.createQunitPage().loadContent("$(document).ready(function(){"+getMessageInit("")+"});");
}
@Test
public void testSend() throws Exception {
sendMessage();
- HtmlElement htmlElement = getMessageContentElement();
- String text = htmlElement.asText();
- assertTrue(text.contains(getErrorMessage().getSummary()));
}
@Test
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2011-01-27 00:14:17 UTC (rev 21253)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2011-01-27 00:14:48 UTC (rev 21254)
@@ -18,7 +18,6 @@
public static final String MY_MESSAGE = "form:uiMessage";
- public static final String MESSAGE_INIT = "new RichFaces.ui.Message(\"" + MY_MESSAGE + "\", {forComponentId:\"" + COMPONENT + "\"})";
@Rule
public final Qunit qunit;
@@ -28,19 +27,25 @@
}
public void setUpMessage(){
- qunit.runScript(MESSAGE_INIT);
+ setUpMessage("");
}
+ public void setUpMessage(String messageOptions){
+ qunit.runScript(getMessageInit(messageOptions));
+ }
+
protected Builder createQunitPage() {
return Qunit.builder().emulate(BrowserVersion.FIREFOX_3_6).loadJsfResource("jquery.js").loadJsfResource("richfaces.js")
- .loadJsfResource("richfaces-event.js").loadJsfResource("richfaces-base-component.js").
- loadJsfResource("csv.js", "org.richfaces").loadJsfResource("message.js", "org.richfaces").content("<form id=\"form\" name=\"form\" method=\"post\" action=\"/client-test.jsf\" enctype=\"application/x-www-form-urlencoded\">\n" +
+ .loadJsfResource("richfaces-event.js").loadJsfResource("richfaces-base-component.js")
+ .loadJsfResource("richfaces-csv.js", "org.richfaces").loadJsfResource("message.js", "org.richfaces")
+ .content("<form id=\"form\" name=\"form\" method=\"post\" action=\"/client-test.jsf\" enctype=\"application/x-www-form-urlencoded\">\n" +
" <input type=\"hidden\" name=\"form\" value=\"form\"/>\n" +
" <input id=\"form:text\" type=\"text\" name=\"form:text\" value=\"fooValue\" onblur=\"form_3Atext_3Av("form:text",this,event)\"/>\n" +
" <span id=\"form:out\">\n" +
" fooValue\n" +
- " </span><div id=\"foo\" ><ul id=\"" + MY_MESSAGE + "\">"+getMessageContent()+"</ul></div><input type=\"hidden\" name=\"javax.faces.ViewState\" id=\"javax.faces.ViewState\" value=\"4262028796446907996:-2607792463910755035\" autocomplete=\"off\"/>\n"
- + " </form>");
+ " </span><span id=\"" + MY_MESSAGE + "\">"+getMessageContent()+"</span>"+
+ " <input type=\"hidden\" name=\"javax.faces.ViewState\" id=\"javax.faces.ViewState\" value=\"4262028796446907996:-2607792463910755035\" autocomplete=\"off\"/>\n"+
+ " </form>");
}
@@ -58,7 +63,7 @@
}
protected Message getErrorMessage() {
- return new Message(2,"error","script error");
+ return new Message(2,"error summary","error description");
}
protected HtmlElement getMessageContentElement() {
@@ -68,4 +73,13 @@
return htmlElement;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param messageOptions TODO
+ * @return the messageInit
+ */
+ public String getMessageInit(String messageOptions) {
+ return "new RichFaces.ui.Message(\"" + MY_MESSAGE + "\", {forComponentId:\"" + COMPONENT + "\""+messageOptions+"})";
+ }
+
}
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/SendMessageTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/SendMessageTest.java 2011-01-27 00:14:17 UTC (rev 21253)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/SendMessageTest.java 2011-01-27 00:14:48 UTC (rev 21254)
@@ -38,11 +38,15 @@
@Test
public void testSend() throws Exception {
- setUpMessage();
+ setUpMessage(",showSummary:true");
sendMessage();
+ checkMessageContent(getErrorMessage().getSummary());
+ }
+
+ protected void checkMessageContent(String summary) {
HtmlElement htmlElement = getMessageContentElement();
String text = htmlElement.asText();
- assertTrue(text.contains(getErrorMessage().getSummary()));
+ assertTrue(text.contains(summary));
}
}
13 years, 11 months
JBoss Rich Faces SVN: r21253 - trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-26 19:14:17 -0500 (Wed, 26 Jan 2011)
New Revision: 21253
Modified:
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/RequestImpl.java
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/SessionImpl.java
Log:
https://issues.jboss.org/browse/RF-10330
Modified: trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java 2011-01-27 00:01:47 UTC (rev 21252)
+++ trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java 2011-01-27 00:14:17 UTC (rev 21253)
@@ -39,8 +39,6 @@
import org.richfaces.application.push.Session;
import org.richfaces.application.push.TopicKey;
-import org.richfaces.log.Logger;
-import org.richfaces.log.RichfacesLogger;
import com.google.common.base.Function;
import com.google.common.base.Joiner;
@@ -57,8 +55,6 @@
private static final Joiner OR_JOINER = Joiner.on(" OR ").skipNulls();
- private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
-
private static final Function<TopicKey, String> TOPIC_KEY_TO_MESSAGE_SELECTOR = new Function<TopicKey, String>() {
public String apply(TopicKey from) {
if (Strings.isNullOrEmpty(from.getSubtopicName())) {
@@ -173,19 +169,4 @@
return jmsSession.createDurableSubscriber(jmsTopic, subscriptionClientId, createMessageSelector(entry.getValue()), true);
}
- /**
- * @param session
- * @param jmsSession
- * @param rootTopicKeys
- */
- public void removeTopicSubscriber(Session session, javax.jms.Session jmsSession, Collection<TopicKey> rootTopicKeys) {
- for (TopicKey rootTopicKey : rootTopicKeys) {
- try {
- jmsSession.unsubscribe(getSubscriptionClientId(session, rootTopicKey));
- } catch (JMSException e) {
- LOGGER.error(e.getMessage(), e);
- }
- }
- }
-
}
Modified: trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/RequestImpl.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/RequestImpl.java 2011-01-27 00:01:47 UTC (rev 21252)
+++ trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/RequestImpl.java 2011-01-27 00:14:17 UTC (rev 21253)
@@ -23,7 +23,6 @@
import java.io.IOException;
import java.util.Collection;
-import java.util.List;
import java.util.Map.Entry;
import java.util.concurrent.ExecutorService;
@@ -33,7 +32,6 @@
import javax.jms.ObjectMessage;
import javax.jms.TextMessage;
import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -46,8 +44,6 @@
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
-import com.google.common.collect.Lists;
-
/**
* @author Nick Belaevski
*
@@ -62,8 +58,6 @@
private TopicsContext topicsContext;
- private List<TopicSubscriber> subscribers = Lists.newArrayListWithCapacity(1);
-
public RequestImpl(AtmosphereResource<HttpServletRequest, HttpServletResponse> atmosphereResource, Session session,
ExecutorService executorService, MessagingContext messagingContext, TopicsContext topicsContext) {
@@ -75,14 +69,6 @@
private void closeSession() {
if (jmsSession != null) {
- for (TopicSubscriber subscriber : subscribers) {
- try {
- subscriber.close();
- } catch (JMSException e) {
- LOGGER.error(e.getMessage(), e);
- }
- }
-
try {
jmsSession.close();
} catch (JMSException e) {
@@ -104,9 +90,7 @@
SessionImpl sessionImpl = (SessionImpl) getSession();
for (Entry<TopicKey, Collection<TopicKey>> entry: sessionImpl.getSuccessfulSubscriptions().asMap().entrySet()) {
- TopicSubscriber subscriber = messagingContext.createTopicSubscriber(sessionImpl, jmsSession, entry);
- subscribers.add(subscriber);
- subscriber.setMessageListener(this);
+ messagingContext.createTopicSubscriber(sessionImpl, jmsSession, entry).setMessageListener(this);
}
} catch (Exception e) {
Modified: trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/SessionImpl.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/SessionImpl.java 2011-01-27 00:01:47 UTC (rev 21252)
+++ trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/SessionImpl.java 2011-01-27 00:14:17 UTC (rev 21253)
@@ -28,8 +28,6 @@
import java.util.Map.Entry;
import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.jms.TopicSubscriber;
import javax.naming.NamingException;
import org.richfaces.application.push.EventAbortedException;
@@ -112,17 +110,9 @@
jmsSession = messagingContext.createSession();
for (Entry<TopicKey, Collection<TopicKey>> entry: rootTopicsMap.asMap().entrySet()) {
- TopicSubscriber subscriber = null;
+ messagingContext.createTopicSubscriber(this, jmsSession, entry);
- try {
- subscriber = messagingContext.createTopicSubscriber(this, jmsSession, entry);
- successfulSubscriptions.putAll(entry.getKey(), entry.getValue());
- } finally {
- if (subscriber != null) {
- subscriber.close();
- }
- }
-
+ successfulSubscriptions.putAll(entry.getKey(), entry.getValue());
}
} catch (JMSException e) {
LOGGER.error(e.getMessage(), e);
@@ -173,24 +163,4 @@
createSubscriptions(topicKeys);
}
- @Override
- public void destroy() {
- super.destroy();
- Session jmsSession = null;
- try {
- jmsSession = messagingContext.createSession();
- messagingContext.removeTopicSubscriber(this, jmsSession, successfulSubscriptions.keySet());
-
- } catch (JMSException e) {
- LOGGER.error(e.getMessage(), e);
- } finally {
- if (jmsSession != null) {
- try {
- jmsSession.close();
- } catch (JMSException e) {
- LOGGER.error(e.getMessage(), e);
- }
- }
- }
- }
}
13 years, 11 months
JBoss Rich Faces SVN: r21252 - trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-26 19:01:47 -0500 (Wed, 26 Jan 2011)
New Revision: 21252
Modified:
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/RequestImpl.java
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/SessionImpl.java
Log:
https://issues.jboss.org/browse/RF-10330
Modified: trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java 2011-01-26 23:27:29 UTC (rev 21251)
+++ trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java 2011-01-27 00:01:47 UTC (rev 21252)
@@ -39,6 +39,8 @@
import org.richfaces.application.push.Session;
import org.richfaces.application.push.TopicKey;
+import org.richfaces.log.Logger;
+import org.richfaces.log.RichfacesLogger;
import com.google.common.base.Function;
import com.google.common.base.Joiner;
@@ -55,6 +57,8 @@
private static final Joiner OR_JOINER = Joiner.on(" OR ").skipNulls();
+ private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
+
private static final Function<TopicKey, String> TOPIC_KEY_TO_MESSAGE_SELECTOR = new Function<TopicKey, String>() {
public String apply(TopicKey from) {
if (Strings.isNullOrEmpty(from.getSubtopicName())) {
@@ -169,4 +173,19 @@
return jmsSession.createDurableSubscriber(jmsTopic, subscriptionClientId, createMessageSelector(entry.getValue()), true);
}
+ /**
+ * @param session
+ * @param jmsSession
+ * @param rootTopicKeys
+ */
+ public void removeTopicSubscriber(Session session, javax.jms.Session jmsSession, Collection<TopicKey> rootTopicKeys) {
+ for (TopicKey rootTopicKey : rootTopicKeys) {
+ try {
+ jmsSession.unsubscribe(getSubscriptionClientId(session, rootTopicKey));
+ } catch (JMSException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ }
+ }
+
}
Modified: trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/RequestImpl.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/RequestImpl.java 2011-01-26 23:27:29 UTC (rev 21251)
+++ trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/RequestImpl.java 2011-01-27 00:01:47 UTC (rev 21252)
@@ -23,6 +23,7 @@
import java.io.IOException;
import java.util.Collection;
+import java.util.List;
import java.util.Map.Entry;
import java.util.concurrent.ExecutorService;
@@ -32,6 +33,7 @@
import javax.jms.ObjectMessage;
import javax.jms.TextMessage;
import javax.jms.Topic;
+import javax.jms.TopicSubscriber;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -44,6 +46,8 @@
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
+import com.google.common.collect.Lists;
+
/**
* @author Nick Belaevski
*
@@ -58,6 +62,8 @@
private TopicsContext topicsContext;
+ private List<TopicSubscriber> subscribers = Lists.newArrayListWithCapacity(1);
+
public RequestImpl(AtmosphereResource<HttpServletRequest, HttpServletResponse> atmosphereResource, Session session,
ExecutorService executorService, MessagingContext messagingContext, TopicsContext topicsContext) {
@@ -69,6 +75,14 @@
private void closeSession() {
if (jmsSession != null) {
+ for (TopicSubscriber subscriber : subscribers) {
+ try {
+ subscriber.close();
+ } catch (JMSException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ }
+
try {
jmsSession.close();
} catch (JMSException e) {
@@ -90,7 +104,9 @@
SessionImpl sessionImpl = (SessionImpl) getSession();
for (Entry<TopicKey, Collection<TopicKey>> entry: sessionImpl.getSuccessfulSubscriptions().asMap().entrySet()) {
- messagingContext.createTopicSubscriber(sessionImpl, jmsSession, entry).setMessageListener(this);
+ TopicSubscriber subscriber = messagingContext.createTopicSubscriber(sessionImpl, jmsSession, entry);
+ subscribers.add(subscriber);
+ subscriber.setMessageListener(this);
}
} catch (Exception e) {
Modified: trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/SessionImpl.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/SessionImpl.java 2011-01-26 23:27:29 UTC (rev 21251)
+++ trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/SessionImpl.java 2011-01-27 00:01:47 UTC (rev 21252)
@@ -28,6 +28,8 @@
import java.util.Map.Entry;
import javax.jms.JMSException;
+import javax.jms.Session;
+import javax.jms.TopicSubscriber;
import javax.naming.NamingException;
import org.richfaces.application.push.EventAbortedException;
@@ -110,9 +112,17 @@
jmsSession = messagingContext.createSession();
for (Entry<TopicKey, Collection<TopicKey>> entry: rootTopicsMap.asMap().entrySet()) {
- messagingContext.createTopicSubscriber(this, jmsSession, entry);
+ TopicSubscriber subscriber = null;
- successfulSubscriptions.putAll(entry.getKey(), entry.getValue());
+ try {
+ subscriber = messagingContext.createTopicSubscriber(this, jmsSession, entry);
+ successfulSubscriptions.putAll(entry.getKey(), entry.getValue());
+ } finally {
+ if (subscriber != null) {
+ subscriber.close();
+ }
+ }
+
}
} catch (JMSException e) {
LOGGER.error(e.getMessage(), e);
@@ -163,4 +173,24 @@
createSubscriptions(topicKeys);
}
+ @Override
+ public void destroy() {
+ super.destroy();
+ Session jmsSession = null;
+ try {
+ jmsSession = messagingContext.createSession();
+ messagingContext.removeTopicSubscriber(this, jmsSession, successfulSubscriptions.keySet());
+
+ } catch (JMSException e) {
+ LOGGER.error(e.getMessage(), e);
+ } finally {
+ if (jmsSession != null) {
+ try {
+ jmsSession.close();
+ } catch (JMSException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ }
+ }
+ }
}
13 years, 11 months
JBoss Rich Faces SVN: r21251 - in trunk: ui/output/ui/src/main/java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-26 18:27:29 -0500 (Wed, 26 Jan 2011)
New Revision: 21251
Modified:
trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js
Log:
https://issues.jboss.org/browse/RF-10211
Modified: trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml 2011-01-26 20:08:44 UTC (rev 21250)
+++ trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml 2011-01-26 23:27:29 UTC (rev 21251)
@@ -49,7 +49,7 @@
itemLeftIconDisabled="triangleLeft"
topItemLeftIconDisabled="triangleUp"
topItemLeftIcon="triangleDown"
- groupMode="client">
+ groupMode="client" activeItem="item41">
<rich:panelMenuGroup id="group1" label="Group 1" disabled="true">
<rich:panelMenuItem id="item11" label="Item 1.1" />
<rich:panelMenuItem id="item12" label="Item 1.2" />
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2011-01-26 20:08:44 UTC (rev 21250)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2011-01-26 23:27:29 UTC (rev 21251)
@@ -42,10 +42,14 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSObject;
+import org.ajax4jsf.javascript.ScriptUtils;
+import org.richfaces.PanelMenuMode;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.component.AbstractPanelMenuGroup;
import org.richfaces.component.AbstractPanelMenuItem;
+import org.richfaces.renderkit.HtmlConstants;
import com.google.common.base.Strings;
@@ -220,5 +224,65 @@
protected Class<? extends UIComponent> getComponentClass() {
return AbstractPanelMenuGroup.class;
}
+
+ @Override
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+ private boolean containsActiveItem(UIComponent component, String activeItem) {
+ if (component instanceof AbstractPanelMenuItem) {
+ AbstractPanelMenuItem item = (AbstractPanelMenuItem) component;
+ if (activeItem.equals(item.getName())) {
+ return true;
+ }
+ }
+
+ if (component instanceof AbstractPanelMenuGroup) {
+ AbstractPanelMenuGroup group = (AbstractPanelMenuGroup) component;
+ if (!group.isBubbleSelection()) {
+ return false;
+ }
+ }
+
+ if (component.getChildCount() > 0) {
+ for (UIComponent child : component.getChildren()) {
+ if (!child.isRendered()) {
+ continue;
+ }
+
+ if (!(child instanceof AbstractPanelMenuItem)) {
+ continue;
+ }
+
+ if (containsActiveItem(child, activeItem)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ protected void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component)
+ throws IOException {
+
+ AbstractPanelMenuGroup group = (AbstractPanelMenuGroup) component;
+
+ boolean isClientMode = group.getMode() == PanelMenuMode.client;
+
+ if (isClientMode || group.isExpanded()) {
+ renderChildren(context, component);
+ } else {
+ String activeItem = group.getPanelMenu().getActiveItem();
+ if (!Strings.isNullOrEmpty(activeItem) && containsActiveItem(component, activeItem)) {
+ writer.startElement(HtmlConstants.SCRIPT_ELEM, component);
+ writer.writeAttribute(HtmlConstants.TYPE_ATTR, HtmlConstants.TEXT_JAVASCRIPT_TYPE, null);
+ writer.writeText(ScriptUtils.toScript(new JSFunction("RichFaces.$", component.getClientId(context))) + ".__restoreSelection();", null);
+ writer.endElement(HtmlConstants.SCRIPT_ELEM);
+ }
+ }
+ }
}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.js 2011-01-26 20:08:44 UTC (rev 21250)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.js 2011-01-26 23:27:29 UTC (rev 21251)
@@ -43,7 +43,7 @@
* */
init : function (componentId, options) {
$super.constructor.call(this, componentId);
- this.items = [];
+ this.items = {};
this.attachToDom();
this.options = $.extend(this.options, __DEFAULT_OPTIONS, options || {});
@@ -63,22 +63,22 @@
});
}
- if (menuGroup.activeItem) {
- this.__panelMenu().ready(function () {
- var item = menuGroup.items[menuGroup.activeItem];
- item.__select();
- item.__fireSelect();
- })
- }
-
this.__addUserEventHandler("collapse");
this.__addUserEventHandler("expand");
},
- getItems: function () {
- return this.items;
+ addItem: function(item) {
+ this.items[item.itemName] = item;
},
+
+ deleteItem: function(item) {
+ delete this.items[item.itemName];
+ },
+ getSelectedItem: function() {
+ return this.getItem(this.selectedItem());
+ },
+
getItem: function (name) {
return this.items[name];
},
@@ -113,6 +113,13 @@
this.activeItem = id;
valueInput.value = id;
+ for (var itemName in this.items) {
+ var item = this.items[itemName];
+ if (item.__isSelected()) {
+ item.__unselect();
+ }
+ }
+
return prevActiveItem;
} else {
return this.activeItem;
@@ -196,6 +203,10 @@
}
},
+ __isActiveItem: function(item) {
+ return item.itemName == this.activeItem;
+ },
+
destroy: function () {
rf.Event.unbindById(this.id, "."+this.namespace);
$super.destroy.call(this);
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js 2011-01-26 20:08:44 UTC (rev 21250)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js 2011-01-26 23:27:29 UTC (rev 21251)
@@ -90,11 +90,13 @@
* */
execClient : function (item) {
var panelMenu = item.__rfPanelMenu();
- if (panelMenu.selectedItem()) {
- panelMenu.getItems()[panelMenu.selectedItem()].unselect();
- }
- panelMenu.selectedItem(item.itemName);
+ var prevItem = panelMenu.getSelectedItem();
+ if (prevItem) {
+ prevItem.unselect();
+ }
+ panelMenu.selectedItem(item.itemName);
+
item.__select();
return item.__fireSelect();
@@ -122,18 +124,23 @@
* */
init : function (componentId, options) {
$super.constructor.call(this, componentId);
- this.attachToDom();
+ var rootElt = $(this.attachToDom());
this.options = $.extend(this.options, __DEFAULT_OPTIONS, options || {});
this.mode = this.options.mode;
this.itemName = this.options.name;
- this.__rfPanelMenu().getItems()[this.itemName] = this;
+ var panelMenu = this.__rfPanelMenu();
+ panelMenu.addItem(this);
// todo move it
this.selectionClass = this.options.stylePrefix + "-sel";
this.hoverClass = this.options.stylePrefix + "-hov";
-
+
+ if (panelMenu.__isActiveItem(this)) {
+ rootElt.ready($.proxy(this.__restoreSelection, this));
+ }
+
if (!this.options.disabled) {
var item = this;
if (this.options.highlight) {
@@ -276,6 +283,15 @@
return this.__item();
},
+ __restoreSelection: function() {
+ this.__select();
+ this.__fireSelect();
+ },
+
+ __isSelected: function() {
+ return this.__header().hasClass(this.selectionClass);
+ },
+
__select: function () {
this.__header().addClass(this.selectionClass);
},
@@ -314,8 +330,8 @@
destroy: function () {
var panelMenu = this.__rfPanelMenu();
- if (panelMenu && panelMenu.getItems && panelMenu.getItems()[this.itemName]) {
- delete panelMenu.getItems()[this.itemName];
+ if (panelMenu) {
+ panelMenu.deleteItem(this);
}
$super.destroy.call(this);
13 years, 11 months
JBoss Rich Faces SVN: r21250 - in trunk/ui/output/ui/src/main/resources/META-INF: richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-01-26 15:08:44 -0500 (Wed, 26 Jan 2011)
New Revision: 21250
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss
trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
Log:
RF-9412
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss 2011-01-26 19:53:04 UTC (rev 21249)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss 2011-01-26 20:08:44 UTC (rev 21250)
@@ -32,7 +32,7 @@
}
.rf-tb-hdr-tabline-vis {
- background:url("tabline_bg.gif") repeat-x scroll center top;
+ background:url("#{resource['org.richfaces.images:tabLineBg.png']}") repeat-x scroll center top;
background-color: "#{richSkin.additionalBackgroundColor}";
border-color: "#{richSkin.panelBorderColor}";
Modified: trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-01-26 19:53:04 UTC (rev 21249)
+++ trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-01-26 20:08:44 UTC (rev 21250)
@@ -21,4 +21,6 @@
org.richfaces.images\:menu_list_bg.gif=org.richfaces.renderkit.html.BaseGradient\
{width=22, height=3, baseColorParam=additionalBackgroundColor, gradientColorParam=tabBackgroundColor, horizontal=true}
org.richfaces.images\:menu_item_bg.gif=org.richfaces.renderkit.html.BaseGradient\
- {width=3, height=16, baseColorParam=additionalBackgroundColor, gradientColorParam=tabBackgroundColor}
\ No newline at end of file
+ {width=3, height=16, baseColorParam=additionalBackgroundColor, gradientColorParam=tabBackgroundColor}
+org.richfaces.images\:tabLineBg.png=org.richfaces.renderkit.html.BaseGradient\
+ {width=5, height=26, baseColorParam=additionalBackgroundColor, gradientColorParam=generalBackgroundColor}
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r21249 - trunk/ui/iteration/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-01-26 14:53:04 -0500 (Wed, 26 Jan 2011)
New Revision: 21249
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java
Log:
RF-10141
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java 2011-01-26 19:27:06 UTC (rev 21248)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java 2011-01-26 19:53:04 UTC (rev 21249)
@@ -41,6 +41,7 @@
import org.richfaces.context.ExtendedVisitContextMode;
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
+import org.richfaces.model.SelectionMode;
/**
@@ -83,6 +84,9 @@
@Attribute
public abstract String getStyleClass();
+ @Attribute
+ public abstract SelectionMode getSelectionMode();
+
@Attribute(events=@EventName(value="selectionchange", defaultEvent=true))
public abstract String getOnselectionchange();
13 years, 11 months
JBoss Rich Faces SVN: r21248 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-26 14:27:06 -0500 (Wed, 26 Jan 2011)
New Revision: 21248
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss
Log:
Updated accordion disabled item styling
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss 2011-01-26 19:26:28 UTC (rev 21247)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss 2011-01-26 19:27:06 UTC (rev 21248)
@@ -41,7 +41,9 @@
.rf-ac-itm-hdr-act {}
.rf-ac-itm-hdr-inact {}
-.rf-ac-itm-hdr-dis {}
+.rf-ac-itm-hdr-dis {
+ color: '#{richSkin.tabDisabledTextColor}';
+}
.rf-ac-itm-gr { width: 100%}
13 years, 11 months
JBoss Rich Faces SVN: r21247 - trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-26 14:26:28 -0500 (Wed, 26 Jan 2011)
New Revision: 21247
Modified:
trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
Log:
Removed ambiguous 'event' attribute from ComponentControlBehvaior class
Modified: trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
===================================================================
--- trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2011-01-26 19:24:03 UTC (rev 21246)
+++ trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2011-01-26 19:26:28 UTC (rev 21247)
@@ -49,7 +49,7 @@
private List<UIComponent> children;
enum PropertyKeys {
- event, target, selector, operation, onbeforeoperation
+ target, selector, operation, onbeforeoperation
}
public List<UIComponent> getChildren() {
@@ -60,15 +60,6 @@
}
@Attribute
- public String getEvent() {
- return (String) getStateHelper().eval(PropertyKeys.event);
- }
-
- public void setEvent(String eventName) {
- getStateHelper().eval(PropertyKeys.event, eventName);
- }
-
- @Attribute
public String getTarget() {
return (String) getStateHelper().eval(PropertyKeys.target);
}
13 years, 11 months
JBoss Rich Faces SVN: r21246 - in modules/tests/metamer/trunk/application/src/main: webapp/components/richPanelMenuGroup and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-26 14:24:03 -0500 (Wed, 26 Jan 2011)
New Revision: 21246
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuGroupBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuItemBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/resources/css/richDragBehavior.css
Log:
rich:panelMenu - pre-automation activities (RFPL-950)
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuGroupBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuGroupBean.java 2011-01-26 19:22:32 UTC (rev 21245)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuGroupBean.java 2011-01-26 19:24:03 UTC (rev 21246)
@@ -57,11 +57,15 @@
attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanelMenuGroup.class, getClass());
attributes.setAttribute("rendered", true);
+ attributes.setAttribute("selectable", true);
+ attributes.setAttribute("mode", "ajax");
// already defined in source directly
attributes.remove("name");
attributes.remove("label");
attributes.remove("changeExpandListener");
+ attributes.remove("action");
+ attributes.remove("actionListener");
}
public Attributes getAttributes() {
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuItemBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuItemBean.java 2011-01-26 19:22:32 UTC (rev 21245)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuItemBean.java 2011-01-26 19:24:03 UTC (rev 21246)
@@ -59,14 +59,10 @@
attributes.setAttribute("rendered", true);
// already defined in source directly
+ attributes.remove("action");
+ attributes.remove("actionListener");
attributes.remove("name");
attributes.remove("label");
-
- // attributes should be hidden
- attributes.remove("panelMenu");
- attributes.remove("parentItem");
- attributes.remove("topItem");
- attributes.remove("value");
}
public Attributes getAttributes() {
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml 2011-01-26 19:22:32 UTC (rev 21245)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml 2011-01-26 19:24:03 UTC (rev 21246)
@@ -32,7 +32,7 @@
<ui:define name="links">
<metamer:testPageLink id="simple" outcome="simple" value="Simple">
- Simple page containing <b>rich:panelMenuGroup</b> inside <b>rich:panelMenu</b> and input boxes for all its attributes.
+ Simple page containing <b>rich:panelMenuGroup</b> inside <b>rich:panelMenu</b> and input boxes for all its attributes. The @selectable attribute is true by default since it is necessary for testing attributes like @immediate, @bypassUpdates, @action and @actionListener.
</metamer:testPageLink>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml 2011-01-26 19:22:32 UTC (rev 21245)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml 2011-01-26 19:24:03 UTC (rev 21246)
@@ -97,6 +97,7 @@
onunselect="#{richPanelMenuGroupBean.attributes['onunselect'].value}"
render="#{richPanelMenuGroupBean.attributes['render'].value}"
rendered="#{richPanelMenuGroupBean.attributes['rendered'].value}"
+ selectable="#{richPanelMenuGroupBean.attributes['selectable'].value}"
status="#{richPanelMenuGroupBean.attributes['status'].value}"
style="#{richPanelMenuGroupBean.attributes['style'].value}"
styleClass="#{richPanelMenuGroupBean.attributes['styleClass'].value}"
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml 2011-01-26 19:22:32 UTC (rev 21245)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml 2011-01-26 19:24:03 UTC (rev 21246)
@@ -55,7 +55,7 @@
data="#{richPanelMenuItemBean.attributes['data'].value}"
disabled="#{richPanelMenuItemBean.attributes['disabled'].value}"
disabledClass="#{richPanelMenuItemBean.attributes['disabledClass'].value}"
- execute="#{richPanelMenuItemBean.attributes['disabledClass'].value}"
+ execute="#{richPanelMenuItemBean.attributes['execute'].value}"
hoverClass="#{richPanelMenuItemBean.attributes['hoverClass'].value}"
leftIcon="#{richPanelMenuItemBean.attributes['leftIcon'].value}"
leftIconClass="#{richPanelMenuItemBean.attributes['leftIconClass'].value}"
@@ -67,6 +67,10 @@
limitRender="#{richPanelMenuItemBean.attributes['limitRender'].value}"
mode="#{richPanelMenuItemBean.attributes['mode'].value}"
onbeforedomupdate="#{richPanelMenuItemBean.attributes['onbeforedomupdate'].value}"
+ onbeforeselect="#{richPanelMenuItemBean.attributes['onbeforeselect'].value}"
+ onclick="#{richPanelMenuItemBean.attributes['onclick'].value}"
+ oncomplete="#{richPanelMenuItemBean.attributes['oncomplete'].value}"
+ ondblclick="#{richPanelMenuItemBean.attributes['ondblclick'].value}"
onmousedown="#{richPanelMenuItemBean.attributes['onmousedown'].value}"
onmousemove="#{richPanelMenuItemBean.attributes['onmousemove'].value}"
onmouseout="#{richPanelMenuItemBean.attributes['onmouseout'].value}"
@@ -76,6 +80,7 @@
onunselect="#{richPanelMenuItemBean.attributes['onunselect'].value}"
render="#{richPanelMenuItemBean.attributes['render'].value}"
rendered="#{richPanelMenuItemBean.attributes['rendered'].value}"
+ selectable="#{richPanelMenuItemBean.attributes['selectable'].value}"
status="#{richPanelMenuItemBean.attributes['status'].value}"
style="#{richPanelMenuItemBean.attributes['style'].value}"
styleClass="#{richPanelMenuItemBean.attributes['styleClass'].value}"
Modified: modules/tests/metamer/trunk/application/src/main/webapp/resources/css/richDragBehavior.css
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/resources/css/richDragBehavior.css 2011-01-26 19:22:32 UTC (rev 21245)
+++ modules/tests/metamer/trunk/application/src/main/webapp/resources/css/richDragBehavior.css 2011-01-26 19:24:03 UTC (rev 21246)
@@ -30,4 +30,16 @@
.rf-ind-rejt {
background-color: red;
+}
+
+.acceptClass {
+ border: 5px solid green;
+}
+
+.draggingClass {
+ border: 5px solid black;
+}
+
+.rejectClass {
+ border: 5px solid #E80000;
}
\ No newline at end of file
13 years, 11 months