[richfaces-svn-commits] JBoss Rich Faces SVN: r18654 - in trunk/examples/core-demo/src/main: webapp and 1 other directory.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Mon Aug 16 07:52:10 EDT 2010
Author: nbelaevski
Date: 2010-08-16 07:52:10 -0400 (Mon, 16 Aug 2010)
New Revision: 18654
Added:
trunk/examples/core-demo/src/main/java/org/richfaces/demo/LogBean.java
Modified:
trunk/examples/core-demo/src/main/webapp/log.xhtml
Log:
https://jira.jboss.org/browse/RF-7816
Added: trunk/examples/core-demo/src/main/java/org/richfaces/demo/LogBean.java
===================================================================
--- trunk/examples/core-demo/src/main/java/org/richfaces/demo/LogBean.java (rev 0)
+++ trunk/examples/core-demo/src/main/java/org/richfaces/demo/LogBean.java 2010-08-16 11:52:10 UTC (rev 18654)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.
+ */
+package org.richfaces.demo;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+import org.richfaces.component.LogMode;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+ at ManagedBean
+ at SessionScoped
+public class LogBean {
+
+ private LogMode mode = LogMode.inline;
+
+ private Character hotkey = 'l';
+
+ public LogMode getMode() {
+ return mode;
+ }
+
+ public void setMode(LogMode logMode) {
+ this.mode = logMode;
+ }
+
+ public Character getHotkey() {
+ return hotkey;
+ }
+
+ public void setHotkey(Character hotkey) {
+ this.hotkey = hotkey;
+ }
+
+}
Modified: trunk/examples/core-demo/src/main/webapp/log.xhtml
===================================================================
--- trunk/examples/core-demo/src/main/webapp/log.xhtml 2010-08-16 11:51:50 UTC (rev 18653)
+++ trunk/examples/core-demo/src/main/webapp/log.xhtml 2010-08-16 11:52:10 UTC (rev 18654)
@@ -8,14 +8,30 @@
<f:view>
<h:head>
<style>
- <!--
- .log{
- background: gray;
+ .log {
+ border: 2px dotted navy;
}
- -->
</style>
</h:head>
<h:body>
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputText value="Mode: "/>
+ <h:selectOneMenu value="#{logBean.mode}" onchange="submit()">
+ <f:selectItem itemValue="popup" />
+ <f:selectItem itemValue="inline" />
+ </h:selectOneMenu>
+
+ <h:outputText value="Hotkey: "/>
+ <h:inputText value="#{logBean.hotkey}" size="1" onchange="submit()" />
+ </h:panelGrid>
+ </h:form>
+ <h:form>
+ <h:commandLink value="Fire ajax request">
+ <f:ajax />
+ </h:commandLink>
+ </h:form>
+
<input id="input" type="text" />
<select id="select" class="rich-log-element">
<option value="debug">debug</option>
@@ -24,7 +40,7 @@
<option value="error">error</option>
</select>
<input type="button" value="Log" onclick="eval('RichFaces.log.' + jQuery('#select').val() + '(\'' + jQuery('#input').val() + '\')')"/>
- <a4j:log level="debug" style="border: solid red 1px" styleClass="log"/>
+ <a4j:log level="debug" style="border: solid red 1px" styleClass="log" hotkey="#{logBean.hotkey}" mode="#{logBean.mode}" />
</h:body>
</f:view>
</html>
\ No newline at end of file
More information about the richfaces-svn-commits
mailing list