JBoss Rich Faces SVN: r11190 - trunk/samples/richfaces-demo/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-11-17 08:37:32 -0500 (Mon, 17 Nov 2008)
New Revision: 11190
Modified:
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
Log:
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-11-17 13:25:36 UTC (rev 11189)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-11-17 13:37:32 UTC (rev 11190)
@@ -261,7 +261,7 @@
<managed-bean>
<managed-bean-name>auctionDataModel</managed-bean-name>
<managed-bean-class>org.richfaces.demo.extendeddatamodel.AuctionDataModel</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
+ <managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>dataProvider</property-name>
<property-class>org.richfaces.demo.extendeddatamodel.AuctionDataProvider</property-class>
16 years, 10 months
JBoss Rich Faces SVN: r11189 - trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-11-17 08:25:36 -0500 (Mon, 17 Nov 2008)
New Revision: 11189
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java
Log:
https://jira.jboss.org/jira/browse/RF-4928
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java 2008-11-17 12:50:00 UTC (rev 11188)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java 2008-11-17 13:25:36 UTC (rev 11189)
@@ -29,7 +29,6 @@
private Integer currentPk;
private Map<Integer,AuctionItem> wrappedData = new HashMap<Integer,AuctionItem>();
private List<Integer> wrappedKeys = null;
- private boolean detached = false;
/**
*
@@ -60,22 +59,11 @@
public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
int firstRow = ((SequenceRange)range).getFirstRow();
int numberOfRows = ((SequenceRange)range).getRows();
- if (detached) { // Is this serialized model
-// Here we just ignore current Rage and use whatever data was saved in serialized model.
-// Such approach uses much more getByPk() operations, instead of just one request by range.
-// Concrete case may be different from that, so you can just load data from data provider by range.
-// We are using wrappedKeys list only to preserve actual order of items.
- for (Integer key:wrappedKeys) {
- setRowKey(key);
- visitor.process(context, key, argument);
- }
- } else { // if not serialized, than we request data from data provider
- wrappedKeys = new ArrayList<Integer>();
- for (AuctionItem item:dataProvider.getItemsByrange(new Integer(firstRow), numberOfRows, null, true)) {
- wrappedKeys.add(item.getPk());
- wrappedData.put(item.getPk(), item);
- visitor.process(context, item.getPk(), argument);
- }
+ wrappedKeys = new ArrayList<Integer>();
+ for (AuctionItem item:dataProvider.getItemsByrange(new Integer(firstRow), numberOfRows, null, true)) {
+ wrappedKeys.add(item.getPk());
+ wrappedData.put(item.getPk(), item);
+ visitor.process(context, item.getPk(), argument);
}
}
/**
@@ -163,9 +151,6 @@
*/
public SerializableDataModel getSerializableModel(Range range) {
if (wrappedKeys!=null) {
- detached = true;
-// Some activity to detach persistent data from wrappedData map may be taken here.
-// In that specific case we are doing nothing.
return this;
} else {
return null;
16 years, 10 months
JBoss Rich Faces SVN: r11188 - trunk/docs/migrationguide/en/src/main/resources/script/swift_lib/Swift/Authenticator/PopB4Smtp.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-11-17 07:50:00 -0500 (Mon, 17 Nov 2008)
New Revision: 11188
Added:
trunk/docs/migrationguide/en/src/main/resources/script/swift_lib/Swift/Authenticator/PopB4Smtp/Pop3Connection.php
Log:
https://jira.jboss.org/jira/browse/RF-4644 - feedback was fixed
Added: trunk/docs/migrationguide/en/src/main/resources/script/swift_lib/Swift/Authenticator/PopB4Smtp/Pop3Connection.php
===================================================================
--- trunk/docs/migrationguide/en/src/main/resources/script/swift_lib/Swift/Authenticator/PopB4Smtp/Pop3Connection.php (rev 0)
+++ trunk/docs/migrationguide/en/src/main/resources/script/swift_lib/Swift/Authenticator/PopB4Smtp/Pop3Connection.php 2008-11-17 12:50:00 UTC (rev 11188)
@@ -0,0 +1,176 @@
+<?php
+
+/**
+ * Swift Mailer PopB4Smtp Pop3 Connection component
+ * Please read the LICENSE file
+ * @author Chris Corbyn <chris(a)w3style.co.uk>
+ * @package Swift_Authenticator
+ * @license GNU Lesser General Public License
+ */
+
+require_once dirname(__FILE__) . "/../../ClassLoader.php";
+
+/**
+ * Swift PopB4Smtp Authenticator Connection Component for the POP3 server
+ * Provides a I/O wrapper for the POP3 connection
+ * @package Swift_Authenticator
+ * @author Chris Corbyn <chris(a)w3style.co.uk>
+ */
+class Swift_Authenticator_PopB4Smtp_Pop3Connection
+{
+ /**
+ * Constant for no encyption
+ */
+ const ENC_OFF = 0;
+ /**
+ * Constant for SSL encryption
+ */
+ const ENC_SSL = 1;
+ /**
+ * The server to connect to (IP or FQDN)
+ * @var string
+ */
+ protected $server = null;
+ /**
+ * The port to connect to
+ * @var int
+ */
+ protected $port = null;
+ /**
+ * The open connection resource from fsockopen()
+ * @var resource
+ */
+ protected $handle = null;
+
+ /**
+ * Constructor
+ * @param string The name of the POP3 server
+ * @param int The port for the POP3 service
+ * @param int The level of encryption to use
+ */
+ public function __construct($server="localhost", $port=110, $encryption=0)
+ {
+ $this->setServer($server);
+ $this->setPort($port);
+ $this->setEncryption($encryption);
+ }
+ /**
+ * Set the server name
+ * @param string The IP or FQDN of the POP3 server
+ */
+ public function setServer($server)
+ {
+ $this->server = (string) $server;
+ }
+ /**
+ * Set the port number for the POP3 server
+ * @param int
+ */
+ public function setPort($port)
+ {
+ $this->port = (int) $port;
+ }
+ /**
+ * Get the server name
+ * @return string
+ */
+ public function getServer()
+ {
+ return $this->server;
+ }
+ /**
+ * Get the remote port number
+ * @return int
+ */
+ public function getPort()
+ {
+ return $this->port;
+ }
+ /**
+ * Set the level of enryption to use (see ENC_OFF or ENC_SSL)
+ * @param int The constant for the encryption level
+ */
+ public function setEncryption($enc)
+ {
+ $this->encryption = (int) $enc;
+ }
+ /**
+ * Get the current encryption level set (corresponds to ENC_SSL or ENC_OFF)
+ * @return int
+ */
+ public function getEncryption()
+ {
+ return $this->encryption;
+ }
+ /**
+ * Check if the response is a +OK response
+ * @throws Swift_ConnectionException Upon bad response
+ */
+ public function assertOk($line)
+ {
+ if (substr($line, 0, 3) != "+OK")
+ {
+ Swift_ClassLoader::load("Swift_ConnectionException");
+ throw new Swift_ConnectionException("The POP3 server did not suitably respond with a +OK response. " .
+ "[" . $line . "]");
+ }
+ }
+ /**
+ * Try to open the connection
+ * @throws Swift_ConnectionException If the connection will not start
+ */
+ public function start()
+ {
+ $url = $this->getServer();
+ if ($this->getEncryption() == self::ENC_SSL) $url = "ssl://" . $url;
+
+ if ((false === $this->handle = fsockopen($url, $this->getPort(), $errno, $errstr, $timeout)))
+ {
+ Swift_ClassLoader::load("Swift_ConnectionException");
+ throw new Swift_ConnectionException("The POP3 connection failed to start. The error string returned from fsockopen() is [" . $errstr . "] #" . $errno);
+ }
+ }
+ /**
+ * Try to close the connection
+ * @throws Swift_ConnectionException If the connection won't close
+ */
+ public function stop()
+ {
+ if ($this->handle !== null)
+ {
+ if (false === fclose($this->handle))
+ {
+ Swift_ClassLoader::load("Swift_ConnectionException");
+ throw new Swift_ConnectionException("The POP3 connection did not close successfully.");
+ }
+ }
+ $this->handle = null;
+ }
+ /**
+ * Return the unread buffer contents
+ * @return string
+ * @throws Swift_ConnectionException If the connection will not allow data to be read
+ */
+ public function read()
+ {
+ if (false === $response = fgets($this->handle))
+ {
+ Swift_ClassLoader::load("Swift_ConnectionException");
+ throw new Swift_ConnectionException("Data could not be read from the POP3 connection.");
+ }
+ return trim($response);
+ }
+ /**
+ * Write a command to the remote socket
+ * @param string the command to send (without CRLF)
+ * @throws Swift_ConnectionException If the command cannot be written
+ */
+ public function write($command)
+ {
+ if (false !== fwrite($this->handle, $command . "\r\n"))
+ {
+ Swift_ClassLoader::load("Swift_ConnectionException");
+ throw new Swift_ConnectionException("Data could not be written to the POP3 connection.");
+ }
+ }
+}
Property changes on: trunk/docs/migrationguide/en/src/main/resources/script/swift_lib/Swift/Authenticator/PopB4Smtp/Pop3Connection.php
___________________________________________________________________
Name: svn:executable
+ *
16 years, 10 months
JBoss Rich Faces SVN: r11187 - trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable.
by richfaces-svn-commits@lists.jboss.org
Author: piotr.buda
Date: 2008-11-17 06:24:50 -0500 (Mon, 17 Nov 2008)
New Revision: 11187
Modified:
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
Log:
onselectionchange fix
Modified: trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
===================================================================
--- trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2008-11-17 11:23:41 UTC (rev 11186)
+++ trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2008-11-17 11:24:50 UTC (rev 11187)
@@ -118,6 +118,18 @@
isSelected: function(id) {
return s.isSelectedId(id);
+ },
+
+ equals: function(state) {
+ var equal = s.size() == state.size();
+ if(equal) {
+ s.each(function(id) {
+ if(equal) {
+ equal = state.isSelected(id);
+ }
+ });
+ }
+ return equal;
}
};
},
@@ -167,7 +179,18 @@
var ret = "";
ranges.each( function(r) { ret += r.inspect(); } );
return ret;
- }
+ },
+
+ /**
+ Compares states and returns true if they are different
+ */
+ isChanged: function(state1, state2) {
+ return !state1.equals(state2);
+ },
+
+ isInRange: function(range, selection) {
+ return selection >= range[0] && selection <= range[1];
+ }
});
@@ -555,13 +578,24 @@
this.selectionChanged(event);
},
+ /**
+ Changes the saved state of the selection and fires
+ the onselectionchange event if selection is changed.
+ The function that is passed as onselectionchange event
+ accepts an event parameter that contains both old and new selections
+ */
selectionChanged: function(event) {
- $(this.inputElement).value = this.selection.inspectRanges() + this.activeRow + ";" + (this.selectionFlag ? this.selectionFlag : "") ;
+ $(this.inputElement).value = this.selection.inspectRanges()
+ + this.activeRow + ";"
+ + (this.selectionFlag ? this.selectionFlag : "");
var state = this.selection.getState();
event.oldSelection = this.oldState;
- event.newSelection = state;
- if(this.onselectionchange) this.onselectionchange(event);
- this.oldState = state;
+ event.newSelection = state; //save the new state for processing
+ if(this.onselectionchange //event is defined
+ && this.selection.isChanged(this.oldState, state)) { //selection actualy changed
+ this.onselectionchange(event);
+ }
+ this.oldState = state; //remember current state
},
setShiftRow: function(event) {
16 years, 10 months
JBoss Rich Faces SVN: r11186 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: piotr.buda
Date: 2008-11-17 06:23:41 -0500 (Mon, 17 Nov 2008)
New Revision: 11186
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java
Log:
Added logging to state saving
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java 2008-11-17 11:23:21 UTC (rev 11185)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java 2008-11-17 11:23:41 UTC (rev 11186)
@@ -16,6 +16,8 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.richfaces.json.JSONArray;
import org.richfaces.json.JSONCollection;
import org.richfaces.json.JSONException;
@@ -32,6 +34,8 @@
public class ExtendedDataTableState implements Serializable {
private static final long serialVersionUID = -3103664821855261335L;
+
+ private static final Log log = LogFactory.getLog(ExtendedDataTableState.class);
public static final String TABLE_STATE_ATTR_NAME = "tableState";
@@ -61,7 +65,10 @@
try {
stateMap = new JSONMap(value);
} catch (JSONException e) {
- e.printStackTrace();
+ log.error("Could not initialize table state");
+ if(log.isDebugEnabled()) {
+ log.debug(e);
+ }
}
}
//initialize columns order part
@@ -99,7 +106,10 @@
result.put("columnsSizeState", columnsSizeState.toJSON());
result.put("columnGroupingState", columnGroupingState.toJSON());
} catch (JSONException e) {
- e.printStackTrace();
+ log.error("Could not convert to JSON");
+ if(log.isDebugEnabled()) {
+ log.debug(e);
+ }
}
return result;
}
@@ -221,6 +231,8 @@
class ColumnsSizeState implements Serializable{
private static final long serialVersionUID = 8724163192351491340L;
+
+ private static final Log log = LogFactory.getLog(ExtendedDataTableState.class);
private static final String DEFAULT_WIDTH = "100";
@@ -286,7 +298,12 @@
}
value = new JSONMap(writer.endObject().toString());
} catch (JSONException e) {
- e.printStackTrace();
+ if(log.isWarnEnabled()) {
+ log.warn("Default column size state not created");
+ }
+ if(log.isDebugEnabled()) {
+ log.debug(e);
+ }
}
}
16 years, 10 months
JBoss Rich Faces SVN: r11185 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: piotr.buda
Date: 2008-11-17 06:23:21 -0500 (Mon, 17 Nov 2008)
New Revision: 11185
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
Log:
Fixed NPE on page load
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-11-17 11:22:03 UTC (rev 11184)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-11-17 11:23:21 UTC (rev 11185)
@@ -1292,17 +1292,18 @@
}
public void encodeBegin(FacesContext context, UIComponent component)throws IOException {
- UIComponent c = component;
- boolean inForm = false;
- while((c = c.getParent()) != null) {
- if(c instanceof UIForm) {
- inForm = true;
- break;
- }
- }
- if(inForm && log.isWarnEnabled()) {
- log.warn("Extended Data Table must be enclosed in a Form component");
- }
+ //FIXME need to check if EDT is enclosed in a form!
+// UIComponent c = component;
+// boolean inForm = false;
+// while((c = c.getParent()) != null) {
+// if(c instanceof UIForm) {
+// inForm = true;
+// break;
+// }
+// }
+// if(inForm && log.isWarnEnabled()) {
+// log.warn("Extended Data Table must be enclosed in a Form component");
+// }
super.encodeBegin(context, component);
//component.getAttributes().put(AjaxRendererUtils.AJAX_SINGLE_ATTR, Boolean.TRUE);
}
16 years, 10 months
JBoss Rich Faces SVN: r11184 - in trunk/samples/extendedDataTable-sample/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: piotr.buda
Date: 2008-11-17 06:22:03 -0500 (Mon, 17 Nov 2008)
New Revision: 11184
Modified:
trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages.properties
trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_en.properties
trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_pl.properties
trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp
Log:
Test env. setup for selects
Modified: trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages.properties
===================================================================
--- trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages.properties 2008-11-16 14:48:05 UTC (rev 11183)
+++ trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages.properties 2008-11-17 11:22:03 UTC (rev 11184)
@@ -15,3 +15,4 @@
table.paginated=Enable paginator
table.rowsNumber=Number of rows
table.selectedPatients=Selected patients
+select=Select
Modified: trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_en.properties
===================================================================
--- trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_en.properties 2008-11-16 14:48:05 UTC (rev 11183)
+++ trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_en.properties 2008-11-17 11:22:03 UTC (rev 11184)
@@ -15,3 +15,4 @@
table.paginated=Enable paginator
table.rowsNumber=Number of rows
table.selectedPatients=Selected patients
+select=Select
Modified: trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_pl.properties
===================================================================
--- trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_pl.properties 2008-11-16 14:48:05 UTC (rev 11183)
+++ trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_pl.properties 2008-11-17 11:22:03 UTC (rev 11184)
@@ -15,3 +15,4 @@
table.paginated=Enable paginator
table.rowsNumber=Number of rows
table.selectedPatients=Selected patients
+select=Selekt
Modified: trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp 2008-11-16 14:48:05 UTC (rev 11183)
+++ trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp 2008-11-17 11:22:03 UTC (rev 11184)
@@ -50,72 +50,71 @@
<rich:spacer></rich:spacer>
<rich:spacer></rich:spacer>
<rich:panel id="leftPanel">
- <h:form id="form1">
- <extdt:extendedDataTable id="demoTable"
- value="#{extendedDataTableBean.dataModel}"
- var="patient"
- style="margin: 0 auto;"
- rows="#{extendedDataTableControlBean.rowsNumber}"
- width="#{extendedDataTableControlBean.width}"
- height="#{extendedDataTableControlBean.height}"
- selectedClass="dataTableSelectedRow"
- footerClass="demo-footer"
- sortMode="#{extendedDataTableControlBean.sortMode}"
- selectionMode="#{extendedDataTableControlBean.selectionMode}"
- selection="#{extendedDataTableBean.selection}"
- rowKeyVar="rkvar"
- tableState="#{extendedDataTableBean.tableState}">
- <rich:column id="firstName"
- headerClass="dataTableHeader"
- width="25%"
- label="#{msg['patient.firstName']}"
- sortable="true"
- sortBy="#{patient.firstName}"
- filterBy="#{patient.firstName}"
- filterEvent="onkeyup">
- <f:facet name="header">
- <h:outputText value="#{msg['patient.firstName']}" />
- </f:facet>
- <h:outputText id="text" value="#{patient.firstName}" >
- <rich:toolTip for="text" >
- <h:outputText value="sasasasasasa" />
- </rich:toolTip>
- </h:outputText>
- </rich:column>
- <rich:column id="lastName"
- headerClass="dataTableHeader"
- width="25%"
- label="#{msg['patient.lastName']}"
- sortable="true"
- sortBy="#{patient.lastName}"
- filterBy="#{patient.lastName}"
- filterEvent="onkeyup">
- <f:facet name="header">
- <h:outputText value="#{msg['patient.lastName']}" />
- </f:facet>
- <h:outputText value="#{patient.lastName}" />
- </rich:column>
- <rich:column id="admissionDate"
- headerClass="dataTableHeader"
- width="50%"
- label="#{msg['patient.admissionDate']}"
- sortable="true"
- sortBy="#{patient.admissionDate}">
- <f:facet name="header">
- <h:outputText value="#{msg['patient.admissionDate']}" />
- </f:facet>
- <h:outputText value="#{patient.admissionDate}" />
- </rich:column>
- <f:facet name="footer">
- <rich:datascroller
- style="width: #{extendedDataTableControlBean.width}"
- rendered="#{extendedDataTableControlBean.paginated}"
- for="demoTable">
- </rich:datascroller>
- </f:facet>
- <a4j:support event="onselectionchange" action="#{extendedDataTableBean.takeSelection}" reRender="selectedPatients" />
- </extdt:extendedDataTable>
- </h:form>
+ <h:form id="form1">
+ <extdt:extendedDataTable id="demoTable"
+ value="#{extendedDataTableBean.dataModel}" var="patient"
+ style="margin: 0 auto;"
+ rows="#{extendedDataTableControlBean.rowsNumber}"
+ width="#{extendedDataTableControlBean.width}"
+ height="#{extendedDataTableControlBean.height}"
+ selectedClass="dataTableSelectedRow" footerClass="demo-footer"
+ sortMode="#{extendedDataTableControlBean.sortMode}"
+ selectionMode="#{extendedDataTableControlBean.selectionMode}"
+ selection="#{extendedDataTableBean.selection}" rowKeyVar="rkvar"
+ tableState="#{extendedDataTableBean.tableState}">
+ <rich:column id="firstName" headerClass="dataTableHeader"
+ width="25%" label="#{msg['patient.firstName']}" sortable="true"
+ sortBy="#{patient.firstName}" filterBy="#{patient.firstName}"
+ filterEvent="onkeyup">
+ <f:facet name="header">
+ <h:outputText value="#{msg['patient.firstName']}" />
+ </f:facet>
+ <h:outputText id="text" value="#{patient.firstName}">
+ <rich:toolTip for="text">
+ <h:outputText value="sasasasasasa" />
+ </rich:toolTip>
+ </h:outputText>
+ </rich:column>
+ <rich:column id="lastName" headerClass="dataTableHeader"
+ width="25%" label="#{msg['patient.lastName']}" sortable="true"
+ sortBy="#{patient.lastName}" filterBy="#{patient.lastName}"
+ filterEvent="onkeyup">
+ <f:facet name="header">
+ <h:outputText value="#{msg['patient.lastName']}" />
+ </f:facet>
+ <h:outputText value="#{patient.lastName}" />
+ </rich:column>
+ <rich:column id="admissionDate" headerClass="dataTableHeader"
+ width="50%" label="#{msg['patient.admissionDate']}"
+ sortable="true" sortBy="#{patient.admissionDate}">
+ <f:facet name="header">
+ <h:outputText value="#{msg['patient.admissionDate']}" />
+ </f:facet>
+ <h:outputText value="#{patient.admissionDate}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg['select']}" />
+ </f:facet>
+ <h:selectOneMenu onclick="Event.stop(event);">
+ <f:selectItem itemValue="1" itemLabel="1" />
+ <f:selectItem itemValue="2" itemLabel="2" />
+ <f:selectItem itemValue="3" itemLabel="3" />
+ </h:selectOneMenu>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:datascroller
+ style="width: #{extendedDataTableControlBean.width}"
+ rendered="#{extendedDataTableControlBean.paginated}"
+ for="demoTable">
+ </rich:datascroller>
+ </f:facet>
+ <a4j:support event="onselectionchange"
+ action="#{extendedDataTableBean.takeSelection}"
+ reRender="selectedPatients" />
+ </extdt:extendedDataTable>
+ </h:form>
</rich:panel>
<rich:panel id="rightPanel">
<h:form>
16 years, 10 months
JBoss Rich Faces SVN: r11183 - trunk/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2008-11-16 09:48:05 -0500 (Sun, 16 Nov 2008)
New Revision: 11183
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js
Log:
https://jira.jboss.org/jira/browse/RF-4854 - implementation: queue-size related code
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js 2008-11-15 12:35:11 UTC (rev 11182)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js 2008-11-16 14:48:05 UTC (rev 11183)
@@ -75,6 +75,10 @@
isEmpty: function() {
return this.getSize() == 0;
+ },
+
+ hasNextItem: function() {
+ return this.items.length != 0;
}
}
}());
@@ -140,43 +144,52 @@
return data;
},
-
- push: function(data) {
- var requestId = data.getRequestId();
-
- if (this.requestId == requestId) {
- this.data = data;
- data.setEventsCounter(++this.eventsCounter);
+
+ push: function() {
+ var DROP_NEW = 'dropNew';
+ var DROP_NEXT = 'dropNext';
+ var FIRE_NEW = 'fireNew';
+ var FIRE_NEXT = 'fireNext';
+
+ return function(data) {
+ var requestId = data.getRequestId();
- this.resetRequestDelay();
- } else {
- if (this.data) {
- this.stopRequestDelay();
- this.pipeline.addEvent(this.pop());
- }
-
- if (this.pipeline.isFull()) {
- //special handling for size = 1 queue
+ if (this.requestId == requestId) {
+ this.data = data;
+ data.setEventsCounter(++this.eventsCounter);
- var behavior = data.queue.getSizeExceededBehavior();
- if (behavior == 'dropNew') {
- return;
- } else if (behavior == 'fireNew') {
- data.submitWithoutCallback();
- return;
- } else if (behavior == 'fireNext') {
- this.pipeline.fireFirst();
- } else if (behavior == 'dropNext') {
- this.pipeline.dropFirst();
+ this.resetRequestDelay();
+ } else {
+ if (this.data) {
+ this.stopRequestDelay();
+ this.pipeline.addEvent(this.pop());
}
-
+
+ if (this.pipeline.isFull()) {
+ var behavior = data.queue.getSizeExceededBehavior();
+ if (behavior == DROP_NEW ||
+ (behavior == DROP_NEXT && !this.pipeline.hasNextItem())) {
+
+ return;
+ } else if (behavior == FIRE_NEW ||
+ (behavior == FIRE_NEXT && !this.pipeline.hasNextItem())) {
+
+ data.submitWithoutCallback();
+ return;
+ } else if (behavior == DROP_NEXT) {
+ this.pipeline.dropFirst();
+ } else if (behavior == FIRE_NEXT) {
+ this.pipeline.fireFirst();
+ }
+
+ }
+
+ this.data = data;
+ this.requestId = requestId;
+ this.startRequestDelay();
}
-
- this.data = data;
- this.requestId = requestId;
- this.startRequestDelay();
}
- }
+ }()
});
16 years, 10 months
JBoss Rich Faces SVN: r11182 - in trunk/sandbox/ui/editor/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-11-15 07:35:11 -0500 (Sat, 15 Nov 2008)
New Revision: 11182
Modified:
trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
trunk/sandbox/ui/editor/src/main/templates/editor.jspx
Log:
Editor: add seam text configuration
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-11-15 10:34:16 UTC (rev 11181)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-11-15 12:35:11 UTC (rev 11182)
@@ -127,11 +127,11 @@
@Override
public Converter getConverter() {
- if(getUseSeamText()){
+ Converter converter = super.getConverter();
+ if (getUseSeamText() && converter == null) {
return new SeamTextConverter();
- }else{
- return super.getConverter();
}
+ return converter;
}
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-11-15 10:34:16 UTC (rev 11181)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-11-15 12:35:11 UTC (rev 11182)
@@ -9,6 +9,8 @@
this.id = id;
this.editorTextAreaId = this.id +'TextArea';
+ this.params = params;
+ this.tinyparams = tinyparams;
var obj = $(this.id);
obj.component = this;
@@ -18,16 +20,18 @@
Richfaces.Editor.extScriptSuffix = params.extScriptSuffix;
Richfaces.Editor.extCssSuffix = params.extCssSuffix;
+ this.synchronizeConfiguration();
+
this.tinyMCE_editor = null;
- this.onInitInstanceCallbackFunction = tinyparams.onInitInstanceCallback;
+ this.onInitInstanceCallbackFunction = this.tinyparams.onInitInstanceCallback;
- tinyparams.mode = 'exact';
- tinyparams.elements = this.editorTextAreaId;
- tinyparams.editor_selector = null;
- tinyparams.editor_deselector = null;
- tinyparams.init_instance_callback = this.onInitInstanceCallback.bind(this);
+ this.tinyparams.mode = 'exact';
+ this.tinyparams.elements = this.editorTextAreaId;
+ this.tinyparams.editor_selector = null;
+ this.tinyparams.editor_deselector = null;
+ this.tinyparams.init_instance_callback = this.onInitInstanceCallback.bind(this);
- tinyMCE.init(tinyparams);
+ tinyMCE.init(this.tinyparams);
this.onBeforeAjaxListener = new A4J.AJAX.AjaxListener("onbeforeajax", this.onBeforeAjax.bind(this));
A4J.AJAX.AddListener(this.onBeforeAjaxListener);
@@ -50,8 +54,29 @@
onInitInstanceCallback: function(inst) {
this.tinyMCE_editor = tinyMCE.get(this.editorTextAreaId);
if (this.onInitInstanceCallbackFunction) this.onInitInstanceCallbackFunction.call(this, inst);
+ },
+
+ synchronizeConfiguration: function(){
+ if(this.params.useSeamText){
+ this.tinyparams.plugins = Richfaces.Editor.SeamTextConfiguration.plugins;
+
+ this.tinyparams.theme_advanced_buttons1 = Richfaces.Editor.SeamTextConfiguration.theme_advanced_buttons1;
+ this.tinyparams.theme_advanced_buttons2 = Richfaces.Editor.SeamTextConfiguration.theme_advanced_buttons2;
+ this.tinyparams.theme_advanced_buttons3 = Richfaces.Editor.SeamTextConfiguration.theme_advanced_buttons3;
+ this.tinyparams.theme_advanced_buttons4 = Richfaces.Editor.SeamTextConfiguration.theme_advanced_buttons4;
+ }
}
});
+
+Richfaces.Editor.SeamTextConfiguration = {
+ plugins : "safari,spellchecker,style,table,save,advhr,advimage,advlink,iespell,inlinepopups,insertdatetime,preview,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
+
+ // Theme options
+ theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,|,cut,copy,paste,pastetext,pasteword",
+ theme_advanced_buttons2 : "search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
+ theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,iespell,advhr,|,print,|,ltr,rtl,|,fullscreen",
+ theme_advanced_buttons4 : "styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote"
+}
\ No newline at end of file
Modified: trunk/sandbox/ui/editor/src/main/templates/editor.jspx
===================================================================
--- trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-11-15 10:34:16 UTC (rev 11181)
+++ trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-11-15 12:35:11 UTC (rev 11182)
@@ -32,7 +32,9 @@
<f:call name="writeEditorConfigurationAttributes" />
<f:call name="writeEditorParameters" />
- var richParams = {extScriptSuffix:'#{this:getSriptMappingSuffix(context)}', extCssSuffix:'#{this:getCssMappingSuffix(context)}'}
+ var richParams = {extScriptSuffix : '#{this:getSriptMappingSuffix(context)}',
+ extCssSuffix : '#{this:getCssMappingSuffix(context)}',
+ useSeamText : #{component.attributes['useSeamText']}}
new RichEditor('#{clientId}', richParams, tinyMceParams);
</script>
16 years, 10 months
JBoss Rich Faces SVN: r11181 - trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/plugins/xhtmlxtras/css.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-11-15 05:34:16 -0500 (Sat, 15 Nov 2008)
New Revision: 11181
Modified:
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/plugins/xhtmlxtras/css/popup.xcss
Log:
Editor: fix css
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/plugins/xhtmlxtras/css/popup.xcss
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/plugins/xhtmlxtras/css/popup.xcss 2008-11-14 22:03:47 UTC (rev 11180)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/plugins/xhtmlxtras/css/popup.xcss 2008-11-15 10:34:16 UTC (rev 11181)
@@ -16,7 +16,7 @@
</f:verbatim>
<u:selector name="a.browse span">
<u:style name="background-image">
- <f:resource f:key="/org/richfaces/renderkit/html/scripts/tiny_mce/plugins/"/>
+ <f:resource f:key="/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/img/icons.gif"/>
</u:style>
<u:style name="background-position" value="-140px -20px"/>
</u:selector>
16 years, 10 months