JBoss Rich Faces SVN: r957 - trunk/sandbox-samples.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-31 09:23:48 -0400 (Thu, 31 May 2007)
New Revision: 957
Modified:
trunk/sandbox-samples/pom.xml
Log:
Modified: trunk/sandbox-samples/pom.xml
===================================================================
--- trunk/sandbox-samples/pom.xml 2007-05-31 12:47:16 UTC (rev 956)
+++ trunk/sandbox-samples/pom.xml 2007-05-31 13:23:48 UTC (rev 957)
@@ -243,5 +243,6 @@
<module>scrollable-grid-demo</module>
<module>panel2-sample</module>
<module>simpleTogglePanel2-sample</module>
+ <module>panelmenu-sample</module>
</modules>
</project>
\ No newline at end of file
17 years, 6 months
JBoss Rich Faces SVN: r956 - in trunk: sandbox-samples and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-31 08:47:16 -0400 (Thu, 31 May 2007)
New Revision: 956
Added:
trunk/sandbox-samples/panelmenu-sample/
Removed:
trunk/richfaces-samples/panelmenu-sample/
Log:
moving panelmenu-sample into sandbox-samples/panelmenu-sample
Copied: trunk/sandbox-samples/panelmenu-sample (from rev 954, trunk/richfaces-samples/panelmenu-sample)
17 years, 6 months
JBoss Rich Faces SVN: r955 - in trunk: sandbox and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-31 08:37:47 -0400 (Thu, 31 May 2007)
New Revision: 955
Added:
trunk/sandbox/panelmenu/
Removed:
trunk/richfaces/panelmenu/
Log:
removing panelmenu component from richfaces into sandbox
Copied: trunk/sandbox/panelmenu (from rev 954, trunk/richfaces/panelmenu)
17 years, 6 months
JBoss Rich Faces SVN: r954 - trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-31 06:28:43 -0400 (Thu, 31 May 2007)
New Revision: 954
Modified:
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
Log:
default style for hovered items added
Modified: trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
===================================================================
--- trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-31 09:49:54 UTC (rev 953)
+++ trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-31 10:28:43 UTC (rev 954)
@@ -72,6 +72,11 @@
cursor: default;
color: #c0c0c0;
}
+
+ .dr-pmenu-hovered-element {
+ background-color : #c0c0c0;
+ }
+
</f:verbatim>
</f:template>
\ No newline at end of file
17 years, 6 months
JBoss Rich Faces SVN: r953 - in trunk/richfaces/datascroller/src/main: java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-05-31 05:49:54 -0400 (Thu, 31 May 2007)
New Revision: 953
Added:
trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/ControlsState.java
Modified:
trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
Log:
http://jira.jboss.com/jira/browse/RF-245 fixed
Modified: trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
===================================================================
--- trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-05-31 09:43:11 UTC (rev 952)
+++ trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-05-31 09:49:54 UTC (rev 953)
@@ -30,7 +30,6 @@
import javax.faces.el.MethodBinding;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
-import javax.faces.event.PhaseId;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.richfaces.event.DataScrollerEvent;
@@ -74,24 +73,6 @@
public static final String FAST_REWIND_DISABLED_FACET_NAME = "fastrewind_disabled";
- public boolean first_rendered = true;
- public boolean first_enabled = true;
-
- public boolean last_rendered = true;
- public boolean last_enabled = true;
-
- public boolean next_rendered = true;
- public boolean next_enabled = true;
-
- public boolean previous_rendered = true;
- public boolean previous_enabled = true;
-
- public boolean fast_forward_rendered = true;
- public boolean fast_forward_enabled = true;
-
- public boolean fast_rewind_rendered = true;
- public boolean fast_rewind_enabled = true;
-
public void addScrollerListener(DataScrollerListener listener) {
addFacesListener(listener);
}
@@ -430,139 +411,6 @@
return data.getFirst();
}
- public void setControls(){
- UIData dataTable = getDataTable();
- int rowCount=getRowCount();
-
- if (getBoundaryControls().equals("auto")){
-
-
- if (getFirstRow(dataTable)==0){
- first_rendered = false;
- first_enabled = false;
- }else{
- first_enabled = true;
- first_rendered = true;
- }
- if ((rowCount - 1)<=(getFirstRow(dataTable)+getRows(dataTable))){
- last_enabled = false;
- last_rendered = false;
- }
- else{
- last_enabled = true;
- last_rendered = true;
- }
-
- }
- else if (getBoundaryControls().equals("hide")){
- first_rendered = false;
- first_enabled = false;
- last_rendered = false;
- last_enabled = false;
-
- }
- else if (getBoundaryControls().equals("show")){
- first_rendered = true;
- last_rendered = true;
- if (getFirstRow(dataTable)==0){
- first_enabled = false;
- }else{
- first_enabled = true;
- }
- if ((rowCount - 1)<=(getFirstRow(dataTable)+getRows(dataTable))){
- last_enabled = false;
- }
- else{
- last_enabled = true;
- }
- }
-
- if (getFastControls().equals("auto")){
- if (getFirstRow(dataTable)==0){
- fast_rewind_rendered = false;
- fast_rewind_enabled = false;
- }else{
- fast_rewind_rendered = true;
- fast_rewind_enabled = true;
- }
- if ((rowCount - 1)<=(getFirstRow(dataTable)+getRows(dataTable))){
- fast_forward_rendered = false;
- fast_forward_enabled = false;
- }
- else{
- fast_forward_rendered = true;
- fast_forward_enabled = true;
- }
-
- }
- else if (getFastControls().equals("hide")){
- fast_forward_rendered = false;
- fast_forward_enabled = false;
- fast_rewind_rendered = false;
- fast_rewind_enabled = false;
-
- }
- else if (getFastControls().equals("show")){
- fast_rewind_rendered = true;
- fast_forward_rendered = true;
- if (getFirstRow(dataTable)==0){
- fast_rewind_enabled = false;
- }else{
- fast_rewind_enabled = true;
- }
- if ((rowCount - 1)<=(getFirstRow(dataTable)+getRows(dataTable))){
- fast_forward_enabled = false;
- }
- else{
- fast_forward_enabled = true;
- }
-
-
- }
-
- if (getStepControls().equals("auto")){
- if (getFirstRow(dataTable)==0){
- previous_enabled = false;
- previous_rendered = false;
-
- }else{
- previous_enabled = true;
- previous_rendered = true;
- }
- if ((rowCount - 1)<=(getFirstRow(dataTable)+getRows(dataTable))){
- next_enabled = false;
- next_rendered = false;
- }
- else{
- next_enabled = true;
- next_rendered = true;
- }
- }
- else if (getStepControls().equals("hide")){
- next_rendered = false;
- next_enabled = false;
- previous_rendered = false;
- previous_enabled = false;
-
- }
- else if (getStepControls().equals("show")){
- next_rendered = true;
- previous_rendered = true;
- if (getFirstRow(dataTable)==0){
- previous_enabled = false;
- }else{
- previous_enabled = true;
- }
- if ((rowCount - 1)<=(getFirstRow(dataTable)+getRows(dataTable))){
- next_enabled = false;
- }
- else{
- next_enabled = true;
- }
- }
- }
-
-
public void setFirstRow(int rows) {
getDataTable().setFirst(rows);
//setControls();
Added: trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/ControlsState.java
===================================================================
--- trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/ControlsState.java (rev 0)
+++ trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/ControlsState.java 2007-05-31 09:49:54 UTC (rev 953)
@@ -0,0 +1,119 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ *
+ */
+public class ControlsState {
+ private boolean firstRendered = true;
+ private boolean firstEnabled = true;
+
+ private boolean lastRendered = true;
+ private boolean lastEnabled = true;
+
+ private boolean previousRendered = true;
+ private boolean previousEnabled = true;
+
+ private boolean nextRendered = true;
+ private boolean nextEnabled = true;
+
+ private boolean fastRewindRendered = true;
+ private boolean fastRewindEnabled = true;
+
+ private boolean fastForwardRendered = true;
+ private boolean fastForwardEnabled = true;
+
+ public boolean isFirstRendered() {
+ return firstRendered;
+ }
+ public void setFirstRendered(boolean firstRendered) {
+ this.firstRendered = firstRendered;
+ }
+ public boolean isFirstEnabled() {
+ return firstEnabled;
+ }
+ public void setFirstEnabled(boolean firstEnabled) {
+ this.firstEnabled = firstEnabled;
+ }
+ public boolean isLastRendered() {
+ return lastRendered;
+ }
+ public void setLastRendered(boolean lastRendered) {
+ this.lastRendered = lastRendered;
+ }
+ public boolean isLastEnabled() {
+ return lastEnabled;
+ }
+ public void setLastEnabled(boolean lastEnabled) {
+ this.lastEnabled = lastEnabled;
+ }
+ public boolean isPreviousRendered() {
+ return previousRendered;
+ }
+ public void setPreviousRendered(boolean previousRendered) {
+ this.previousRendered = previousRendered;
+ }
+ public boolean isPreviousEnabled() {
+ return previousEnabled;
+ }
+ public void setPreviousEnabled(boolean previousEnabled) {
+ this.previousEnabled = previousEnabled;
+ }
+ public boolean isNextRendered() {
+ return nextRendered;
+ }
+ public void setNextRendered(boolean nextRendered) {
+ this.nextRendered = nextRendered;
+ }
+ public boolean isNextEnabled() {
+ return nextEnabled;
+ }
+ public void setNextEnabled(boolean nextEnabled) {
+ this.nextEnabled = nextEnabled;
+ }
+ public boolean isFastRewindRendered() {
+ return fastRewindRendered;
+ }
+ public void setFastRewindRendered(boolean fastRewindRendered) {
+ this.fastRewindRendered = fastRewindRendered;
+ }
+ public boolean isFastRewindEnabled() {
+ return fastRewindEnabled;
+ }
+ public void setFastRewindEnabled(boolean fastRewindEnabled) {
+ this.fastRewindEnabled = fastRewindEnabled;
+ }
+ public boolean isFastForwardRendered() {
+ return fastForwardRendered;
+ }
+ public void setFastForwardRendered(boolean fastForwardRendered) {
+ this.fastForwardRendered = fastForwardRendered;
+ }
+ public boolean isFastForwardEnabled() {
+ return fastForwardEnabled;
+ }
+ public void setFastForwardEnabled(boolean fastForwardEnabled) {
+ this.fastForwardEnabled = fastForwardEnabled;
+ }
+}
Modified: trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
===================================================================
--- trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-05-31 09:43:11 UTC (rev 952)
+++ trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-05-31 09:49:54 UTC (rev 953)
@@ -40,86 +40,166 @@
public class DataScrollerRenderer extends HeaderResourcesRendererBase {
- protected Class getComponentClass() {
- return UIDatascroller.class;
- }
+ protected Class getComponentClass() {
+ return UIDatascroller.class;
+ }
- public void encodeBegin(FacesContext context, UIComponent component)
- throws IOException {
+ public void encodeBegin(FacesContext context, UIComponent component)
+ throws IOException {
- UIDatascroller scroller = (UIDatascroller) component;
+ UIDatascroller scroller = (UIDatascroller) component;
- UIData dataTable = scroller.getDataTable();
-
- ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
- variables.setVariable("dataTable", dataTable);
- scroller.setControls();
- if (!(scroller.getPageCount(dataTable) == 1) || (scroller.isRenderIfSinglePage()))
- {
- variables.setVariable("rendered", Boolean.TRUE);
- super.encodeBegin(context, component);
- }
- }
+ UIData dataTable = scroller.getDataTable();
- public void encodeEnd(FacesContext context, UIComponent component)
- throws IOException {
- ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ variables.setVariable("dataTable", dataTable);
+ if (!(scroller.getPageCount(dataTable) == 1) || (scroller.isRenderIfSinglePage()))
+ {
+ variables.setVariable("rendered", Boolean.TRUE);
+ super.encodeBegin(context, component);
+ }
+ }
- if (Boolean.TRUE.equals(variables.getVariable("rendered")))
- {
- super.encodeEnd(context, component);
- }
- }
+ public void encodeEnd(FacesContext context, UIComponent component)
+ throws IOException {
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
- public void decode(FacesContext context, UIComponent component) {
+ if (Boolean.TRUE.equals(variables.getVariable("rendered")))
+ {
+ super.encodeEnd(context, component);
+ }
+ }
- String param = (String) getParamMap(context).get(
- component.getClientId(context));
- UIDatascroller scroller = (UIDatascroller) component;
-
- if (param != null) {
- new DataScrollerEvent(scroller, String.valueOf(scroller.getPageIndex()), param).queue();
- }
- }
+ public void decode(FacesContext context, UIComponent component) {
- public void renderPager(FacesContext context, UIComponent component) throws IOException {
- ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
- UIData data = (UIData) variables.getVariable("dataTable");
-
- ResponseWriter out = context.getResponseWriter();
- UIDatascroller scroller = (UIDatascroller) component;
- int currentPage = scroller.getPageIndex(data);
+ String param = (String) getParamMap(context).get(
+ component.getClientId(context));
+ UIDatascroller scroller = (UIDatascroller) component;
- int maxPages = scroller.getMaxPages();
- if (maxPages <= 1) {
- maxPages = 1;
- }
- int pageCount = scroller.getPageCount(data);
- if (pageCount <= 1) {
- return;
- }
+ if (param != null) {
+ new DataScrollerEvent(scroller, String.valueOf(scroller.getPageIndex()), param).queue();
+ }
+ }
- int delta = maxPages / 2;
+ public ControlsState getControlsState(FacesContext context, UIDatascroller datascroller, UIData dataTable) {
+ int pageIndex = datascroller.getPageIndex(dataTable);
+ int pageCount = datascroller.getPageCount(dataTable);
+ int minPageIdx = 1;
+ int maxPageIdx = pageCount;
+ int fastStep = datascroller.getFastStep();
+ if (fastStep <= 1) {
+ fastStep = 1;
+ }
- int pages;
- int start;
- if (pageCount > maxPages && currentPage > delta) {
- pages = maxPages;
- start = currentPage - pages / 2 - 1;
- if (start + pages > pageCount) {
- start = pageCount - pages;
- }
- } else {
- pages = pageCount < maxPages ? pageCount : maxPages;
- start = 0;
- }
+ boolean useFirst = true;
+ boolean useLast = true;
- for (int i = start, size = start + pages; i < size; i++) {
- //String styleClass;
- //String style;
+ boolean useBackFast = true;
+ boolean useForwFast = true;
- boolean isCurrentPage = (i + 1 == currentPage);
- /*
+ ControlsState controlsState = new ControlsState();
+
+ if (pageIndex <= minPageIdx) {
+ useFirst = false;
+ }
+
+ if (pageIndex >= maxPageIdx) {
+ useLast = false;
+ }
+
+ if (pageIndex - fastStep < minPageIdx) {
+ useBackFast = false;
+ }
+
+ if (pageIndex + fastStep > maxPageIdx) {
+ useForwFast = false;
+ }
+
+ boolean isAuto;
+ String boundaryControls = datascroller.getBoundaryControls();
+ String stepControls = datascroller.getStepControls();
+ String fastControls = datascroller.getFastControls();
+
+ if ((isAuto = "auto".equals(boundaryControls)) || "show".equals(boundaryControls)) {
+ if (isAuto) {
+ controlsState.setFirstRendered(useFirst);
+ controlsState.setLastRendered(useLast);
+ }
+
+ controlsState.setFirstEnabled(useFirst);
+ controlsState.setLastEnabled(useLast);
+ } else {
+ controlsState.setFirstRendered(false);
+ controlsState.setLastRendered(false);
+ }
+
+ if ((isAuto = "auto".equals(stepControls)) || "show".equals(stepControls)) {
+ if (isAuto) {
+ controlsState.setPreviousRendered(useFirst);
+ controlsState.setNextRendered(useLast);
+ }
+
+ controlsState.setPreviousEnabled(useFirst);
+ controlsState.setNextEnabled(useLast);
+ } else {
+ controlsState.setPreviousRendered(false);
+ controlsState.setNextRendered(false);
+ }
+
+ if ((isAuto = "auto".equals(fastControls)) || "show".equals(fastControls)) {
+ if (isAuto) {
+ controlsState.setFastForwardRendered(useForwFast);
+ controlsState.setFastRewindRendered(useBackFast);
+ }
+
+ controlsState.setFastForwardEnabled(useForwFast);
+ controlsState.setFastRewindEnabled(useBackFast);
+ } else {
+ controlsState.setFastForwardRendered(false);
+ controlsState.setFastRewindRendered(false);
+ }
+
+ return controlsState;
+ }
+
+ public void renderPager(FacesContext context, UIComponent component) throws IOException {
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ UIData data = (UIData) variables.getVariable("dataTable");
+
+ ResponseWriter out = context.getResponseWriter();
+ UIDatascroller scroller = (UIDatascroller) component;
+ int currentPage = scroller.getPageIndex(data);
+
+ int maxPages = scroller.getMaxPages();
+ if (maxPages <= 1) {
+ maxPages = 1;
+ }
+ int pageCount = scroller.getPageCount(data);
+ if (pageCount <= 1) {
+ return;
+ }
+
+ int delta = maxPages / 2;
+
+ int pages;
+ int start;
+ if (pageCount > maxPages && currentPage > delta) {
+ pages = maxPages;
+ start = currentPage - pages / 2 - 1;
+ if (start + pages > pageCount) {
+ start = pageCount - pages;
+ }
+ } else {
+ pages = pageCount < maxPages ? pageCount : maxPages;
+ start = 0;
+ }
+
+ for (int i = start, size = start + pages; i < size; i++) {
+ //String styleClass;
+ //String style;
+
+ boolean isCurrentPage = (i + 1 == currentPage);
+ /*
if (isCurrentPage) {
styleClass = scroller.getSelectedStyleClass();
style = scroller.getSelectedStyle();
@@ -135,53 +215,53 @@
if (styleClass==null){
styleClass="";
}
- */
+ */
- out.startElement("td", component);
- if (isCurrentPage) {
- out.writeAttribute("align", "center", null);
- //out.writeAttribute("class", "dr-dscr-act rich-datascr-act "+scroller.getStyleClass(), null);
- out.writeAttribute("class", "dr-dscr-act rich-datascr-act", null);
- out.writeAttribute("style", "" + scroller.getSelectedStyle(), null);
- } else {
- out.writeAttribute("align", "center", null);
- //out.writeAttribute("class", "dr-dscr-inact rich-datascr-inact "+scroller.getStyleClass(), null);
- out.writeAttribute("class", "dr-dscr-inact rich-datascr-inact", null);
- //out.writeAttribute("style", ""+scroller.getStyle(), null);
- out.writeAttribute("onclick", getOnClick(context, component, Integer.toString(i + 1)), null);
- }
- out.writeText(Integer.toString(i + 1), null);
- //renderChild(context, link);
- out.endElement("td");
- }
+ out.startElement("td", component);
+ if (isCurrentPage) {
+ out.writeAttribute("align", "center", null);
+ //out.writeAttribute("class", "dr-dscr-act rich-datascr-act "+scroller.getStyleClass(), null);
+ out.writeAttribute("class", "dr-dscr-act rich-datascr-act", null);
+ out.writeAttribute("style", "" + scroller.getSelectedStyle(), null);
+ } else {
+ out.writeAttribute("align", "center", null);
+ //out.writeAttribute("class", "dr-dscr-inact rich-datascr-inact "+scroller.getStyleClass(), null);
+ out.writeAttribute("class", "dr-dscr-inact rich-datascr-inact", null);
+ //out.writeAttribute("style", ""+scroller.getStyle(), null);
+ out.writeAttribute("onclick", getOnClick(context, component, Integer.toString(i + 1)), null);
+ }
+ out.writeText(Integer.toString(i + 1), null);
+ //renderChild(context, link);
+ out.endElement("td");
+ }
- }
+ }
- private Map getParamMap(FacesContext context) {
- return context.getExternalContext().getRequestParameterMap();
- }
+ private Map getParamMap(FacesContext context) {
+ return context.getExternalContext().getRequestParameterMap();
+ }
- public String getOnClick(FacesContext context, UIComponent component, String value) {
+ public String getOnClick(FacesContext context, UIComponent component, String value) {
- JSFunction function = AjaxRendererUtils.buildAjaxFunction(component,
- context);
- UIDatascroller scroller = (UIDatascroller) component;
- Map eventOptions = AjaxRendererUtils.buildEventOptions(context, component);
- Map parameters = (Map) eventOptions.get("parameters");
- parameters.put(scroller.getClientId(context), value);
- function.addParameter(eventOptions);
- StringBuffer buffer = new StringBuffer();
- function.appendScript(buffer);
- buffer.append("; return false;");
- String script = buffer.toString();
- return script;
- }
+ JSFunction function = AjaxRendererUtils.buildAjaxFunction(component,
+ context);
+ UIDatascroller scroller = (UIDatascroller) component;
+ Map eventOptions = AjaxRendererUtils.buildEventOptions(context, component);
+ Map parameters = (Map) eventOptions.get("parameters");
+ parameters.put(scroller.getClientId(context), value);
+ function.addParameter(eventOptions);
+ StringBuffer buffer = new StringBuffer();
+ function.appendScript(buffer);
+ buffer.append("; return false;");
+ String script = buffer.toString();
+ return script;
+ }
- /**
- * Creates HtmlAjaxCommandLink sets its id, value and reRender and UIParameter
- */
- public boolean getRendersChildren() {
- return true;
- }
+ /**
+ * Creates HtmlAjaxCommandLink sets its id, value and reRender and UIParameter
+ */
+ public boolean getRendersChildren() {
+ return true;
+ }
}
Modified: trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
===================================================================
--- trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2007-05-31 09:43:11 UTC (rev 952)
+++ trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2007-05-31 09:49:54 UTC (rev 953)
@@ -28,8 +28,12 @@
<tr>
<jsp:scriptlet><![CDATA[
String facet;
- if (component.first_rendered){
- if (component.first_enabled){
+ org.richfaces.renderkit.html.ControlsState controlsState = getControlsState(context, component,
+ (javax.faces.component.UIData) variables.getVariable("dataTable"));
+
+
+ if (controlsState.isFirstRendered()){
+ if (controlsState.isFirstEnabled()){
variables.setVariable("color", "");
variables.setVariable("onclick", getOnClick(context,component,component.FIRST_FACET_NAME));
variables.setVariable("facet", component.FIRST_FACET_NAME);
@@ -68,8 +72,8 @@
}
]]></jsp:scriptlet>
<jsp:scriptlet><![CDATA[
- if (component.fast_rewind_rendered){
- if (component.fast_rewind_enabled){
+ if (controlsState.isFastRewindRendered()){
+ if (controlsState.isFastRewindEnabled()){
variables.setVariable("color", "");
variables.setVariable("onclick", getOnClick(context,component,component.FAST_REWIND_FACET_NAME));
variables.setVariable("facet", component.FAST_REWIND_FACET_NAME);
@@ -109,8 +113,8 @@
]]></jsp:scriptlet>
<jsp:scriptlet><![CDATA[
- if (component.previous_rendered){
- if (component.previous_enabled){
+ if (controlsState.isPreviousRendered()){
+ if (controlsState.isPreviousEnabled()){
variables.setVariable("color", "");
variables.setVariable("onclick", getOnClick(context,component,component.PREVIOUS_FACET_NAME));
variables.setVariable("facet", component.PREVIOUS_FACET_NAME);
@@ -149,8 +153,8 @@
<f:call name="renderPager"/>
<jsp:scriptlet><![CDATA[
- if (component.next_rendered){
- if (component.next_enabled){
+ if (controlsState.isNextRendered()){
+ if (controlsState.isNextEnabled()){
variables.setVariable("onclick", getOnClick(context,component,component.NEXT_FACET_NAME));
variables.setVariable("color", "");
variables.setVariable("facet", component.NEXT_FACET_NAME);
@@ -188,8 +192,8 @@
]]></jsp:scriptlet>
<jsp:scriptlet><![CDATA[
- if (component.fast_forward_rendered){
- if (component.fast_forward_enabled){
+ if (controlsState.isFastForwardRendered()){
+ if (controlsState.isFastForwardEnabled()){
variables.setVariable("onclick", getOnClick(context,component,component.FAST_FORWARD_FACET_NAME));
variables.setVariable("color", "");
variables.setVariable("facet", component.FAST_FORWARD_FACET_NAME);
@@ -230,8 +234,8 @@
]]></jsp:scriptlet>
<jsp:scriptlet><![CDATA[
- if (component.last_rendered){
- if (component.last_enabled){
+ if (controlsState.isLastRendered()){
+ if (controlsState.isLastEnabled()){
variables.setVariable("onclick", getOnClick(context,component,component.LAST_FACET_NAME));
variables.setVariable("color", "");
variables.setVariable("facet", component.LAST_FACET_NAME);
17 years, 6 months
JBoss Rich Faces SVN: r952 - trunk/richfaces-samples/datascroller-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-05-31 05:43:11 -0400 (Thu, 31 May 2007)
New Revision: 952
Modified:
trunk/richfaces-samples/datascroller-sample/src/main/webapp/pages/index.jsp
Log:
fastStep set to "2"
Modified: trunk/richfaces-samples/datascroller-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/datascroller-sample/src/main/webapp/pages/index.jsp 2007-05-31 09:02:49 UTC (rev 951)
+++ trunk/richfaces-samples/datascroller-sample/src/main/webapp/pages/index.jsp 2007-05-31 09:43:11 UTC (rev 952)
@@ -58,7 +58,7 @@
</f:facet>
</h:column>
<f:facet name="footer">
- <ds:datascroller for="master" rendered="true" actionListener="#{testBean.onAction}" renderIfSinglePage="#{testBean.renderIfSinglePage}" scrollerListener="#{testBean.doScroll}" maxPages="#{testBean.maxpage}"/>
+ <ds:datascroller for="master" rendered="true" fastStep="2" actionListener="#{testBean.onAction}" renderIfSinglePage="#{testBean.renderIfSinglePage}" scrollerListener="#{testBean.doScroll}" maxPages="#{testBean.maxpage}"/>
</f:facet>
</h:dataTable>
17 years, 6 months
JBoss Rich Faces SVN: r951 - trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-31 05:02:49 -0400 (Thu, 31 May 2007)
New Revision: 951
Modified:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-239
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java 2007-05-30 18:10:24 UTC (rev 950)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java 2007-05-31 09:02:49 UTC (rev 951)
@@ -190,7 +190,7 @@
}
StringBuffer ret = new StringBuffer();
ret.append("<script ");
- ret.append("type=\"text/javascript\"");
+ ret.append("type=\"text/javascript\" ");
ret.append("id =\"script" + component.getClientId(context)+"\">\n");
ret.append(panelMenu);
ret.append(buffer);
17 years, 6 months
JBoss Rich Faces SVN: r950 - in trunk/richfaces/inputnumber-spinner/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-05-30 14:10:24 -0400 (Wed, 30 May 2007)
New Revision: 950
Modified:
trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/component/UIInputNumberSpinner.java
trunk/richfaces/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx
Log:
Component updated due to http://jira.jboss.com/jira/browse/AJSF-72 to pass JUnit tests
Modified: trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/component/UIInputNumberSpinner.java
===================================================================
--- trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/component/UIInputNumberSpinner.java 2007-05-30 17:37:12 UTC (rev 949)
+++ trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/component/UIInputNumberSpinner.java 2007-05-30 18:10:24 UTC (rev 950)
@@ -21,7 +21,6 @@
package org.richfaces.component;
-import javax.faces.component.UIInput;
/**
* JSF component class
@@ -31,4 +30,6 @@
public static final String COMPONENT_TYPE = "org.richfaces.inputNumberSpinner";
+ public abstract String getInputStyle();
+ public abstract void setInputStyle(String inputStyle);
}
Modified: trunk/richfaces/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx
===================================================================
--- trunk/richfaces/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx 2007-05-30 17:37:12 UTC (rev 949)
+++ trunk/richfaces/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx 2007-05-30 18:10:24 UTC (rev 950)
@@ -24,17 +24,19 @@
<tbody>
<tr>
<td width="1%" class="dr-spnr-e rich-spinner-input-container" id="#{clientId}Edit">
- <input onchange="#{component.attributes['onchange']}"
+ <input
+ class="dr-spnr-i rich-spinner-input #{component.attributes['inputClass']}"
+ onchange="#{component.attributes['onchange']}"
onselect="#{component.attributes['onselect']}"
onfocus="#{component.attributes['onfocus']}"
onblur="#{component.attributes['onblur']}"
type="text"
- accesskey="#{component.attributes['accesskey']}"
size="#{component.attributes['inputSize']}"
name="#{clientId}"
- class="dr-spnr-i rich-spinner-input #{component.attributes['inputClass']}"
- style="#{component.attributes['inputStyle']}"
- value="#{this:getInputValue(context, component)}" />
+ value="#{this:getInputValue(context, component)}"
+ style="#{component.inputStyle}"
+ accesskey="#{component.attributes['accesskey']}"
+ />
</td>
<td id="#{clientId}For" class="dr-spnr-b" width="1%">
<table id="#{clientId}Buttons" border="0" cellspacing="0" cellpadding="0">
17 years, 6 months
JBoss Rich Faces SVN: r949 - trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-30 13:37:12 -0400 (Wed, 30 May 2007)
New Revision: 949
Modified:
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
Log:
Modified: trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
===================================================================
--- trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-30 17:30:57 UTC (rev 948)
+++ trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-30 17:37:12 UTC (rev 949)
@@ -72,12 +72,6 @@
cursor: default;
color: #c0c0c0;
}
- .rich-pmenu-disabled-element {
- cursor: default;
- color: #c0c0c0;
- }
- .rich-pmenu-hovered-element {
- }
</f:verbatim>
</f:template>
\ No newline at end of file
17 years, 6 months
JBoss Rich Faces SVN: r948 - in trunk/richfaces/panelmenu/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-30 13:30:57 -0400 (Wed, 30 May 2007)
New Revision: 948
Modified:
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
Log:
Modified: trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
===================================================================
--- trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-30 14:15:53 UTC (rev 947)
+++ trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-30 17:30:57 UTC (rev 948)
@@ -30,7 +30,6 @@
<u:style name="font-size" skin="headerSizeFont"/>
<u:style name="color" skin="headerTextColor"/>
<u:style name="border-style" value="none"/>
- <u:style name="border-top-style" value="solid"/>
<u:style name="border-color" skin="panelBorderColor"/>
<u:style name="background-color" skin="headerBackgroundColor"/>
<u:style name="background-image" >
@@ -73,6 +72,12 @@
cursor: default;
color: #c0c0c0;
}
+ .rich-pmenu-disabled-element {
+ cursor: default;
+ color: #c0c0c0;
+ }
+ .rich-pmenu-hovered-element {
+ }
</f:verbatim>
</f:template>
\ No newline at end of file
Modified: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-05-30 14:15:53 UTC (rev 947)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-05-30 17:30:57 UTC (rev 948)
@@ -25,7 +25,7 @@
</jsp:scriptlet>
<table cellpadding="0" cellspacing="0" border="0" width="100%"
id="tablehide#{clientId}"
- class="rich-pmenu-group dr-pmenu-group #{this:getFullStyleClass( context, component )} #{itemClass}"
+ class="dr-pmenu-group rich-pmenu-group #{this:getFullStyleClass( context, component )} #{itemClass}"
style="#{this:getFullStyle( context, component )}" >
<f:call name="utils.encodeAttributes">
17 years, 6 months