JBoss Rich Faces SVN: r4379 - branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-29 22:29:42 -0500 (Thu, 29 Nov 2007)
New Revision: 4379
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
double click listener invocation fixed
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-30 03:03:19 UTC (rev 4378)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-30 03:29:42 UTC (rev 4379)
@@ -5,8 +5,13 @@
Richfaces.ListShuttle.prototype = {
initialize: function(targetList, sourceList, clientId, controlIds) {
- $(targetList.shuttleTable.id).observe("click", function(e) {this.onclickHandler(window.event || e, targetList)}.bindAsEventListener(this));
- $(sourceList.shuttleTable.id).observe("click", function(e) {this.onclickHandler(window.event || e, sourceList)}.bindAsEventListener(this));
+ sourceList._onclickHandler = sourceList.onclickHandler;
+ sourceList.onclickHandler = function(e) { this.onclickHandler(e, sourceList); }.bindAsEventListener(this);
+ targetList._onclickHandler = targetList.onclickHandler;
+ targetList.onclickHandler = function(e) { this.onclickHandler(e, targetList); }.bindAsEventListener(this);
+
+ //$(targetList.shuttleTable.id).observe("click", function(e) {this.onclickHandler(window.event || e, targetList)}.bindAsEventListener(this));
+ //$(sourceList.shuttleTable.id).observe("click", function(e) {this.onclickHandler(window.event || e, sourceList)}.bindAsEventListener(this));
this.targetList = targetList;
@@ -44,7 +49,7 @@
},
onclickHandler : function(event, component) {
- component.onclickHandler(event);
+ component._onclickHandler(event);
this.controlListManager();
Event.stop(event);
},
17 years, 1 month
JBoss Rich Faces SVN: r4378 - in branches/3.1.x/sandbox/ui/listShuttle/src/main: java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-29 22:03:19 -0500 (Thu, 29 Nov 2007)
New Revision: 4378
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java
Log:
controls visibility attributes implemented in listShuttle component/demo
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml 2007-11-30 03:03:13 UTC (rev 4377)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml 2007-11-30 03:03:19 UTC (rev 4378)
@@ -82,6 +82,25 @@
<defaultvalue>true</defaultvalue>
</property>
+ <property>
+ <name>moveControlsVisible</name>
+ <classname>boolean</classname>
+ <description>
+ If false 'Copy' and 'Remove' controls aren’t displayed
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+ <property>
+ <name>fastMoveControlsVisible</name>
+ <classname>boolean</classname>
+ <description>
+ If false 'Copy All' and 'Remove All' controls aren’t displayed
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+
+
+
<property>
<name>showButtonLabels</name>
<classname>boolean</classname>
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2007-11-30 03:03:13 UTC (rev 4377)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2007-11-30 03:03:19 UTC (rev 4378)
@@ -576,4 +576,16 @@
return new ModelItemState(getSelection(), getActiveItem());
}
}
+
+ public abstract boolean isOrderControlsVisible();
+ public abstract void setOrderControlsVisible(boolean visible);
+
+ public abstract boolean isFastOrderControlsVisible();
+ public abstract void setFastOrderControlsVisible(boolean visible);
+
+ public abstract boolean isMoveControlsVisible();
+ public abstract void setMoveControlsVisible(boolean visible);
+
+ public abstract boolean isFastMoveControlsVisible();
+ public abstract void setFastMoveControlsVisible(boolean visible);
}
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java 2007-11-30 03:03:13 UTC (rev 4377)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java 2007-11-30 03:03:19 UTC (rev 4378)
@@ -2,6 +2,7 @@
import javax.faces.context.FacesContext;
+import org.richfaces.component.UIListShuttle;
import org.richfaces.component.UIOrderingBaseComponent;
import org.richfaces.renderkit.html.images.ListShuttleIconCopy;
import org.richfaces.renderkit.html.images.ListShuttleIconCopyAll;
@@ -73,7 +74,7 @@
CONTROL_ID_COPY_ALL, ATTRIBUTE_CE_ONCOPYALLCLICK, true, "copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isFastOrderControlsVisible();
+ return ((UIListShuttle) list).isFastMoveControlsVisible();
}
},
@@ -82,7 +83,7 @@
DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY_ALL), null, false, "copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isFastOrderControlsVisible();
+ return ((UIListShuttle) list).isFastMoveControlsVisible();
}
},
@@ -91,7 +92,7 @@
CONTROL_ID_COPY, ATTRIBUTE_CE_ONCOPYCLICK ,true, "copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isOrderControlsVisible();
+ return ((UIListShuttle) list).isMoveControlsVisible();
}
},
@@ -100,7 +101,7 @@
DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY), null, false, "copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isOrderControlsVisible();
+ return ((UIListShuttle) list).isMoveControlsVisible();
}
},
@@ -109,7 +110,7 @@
CONTROL_ID_REMOVE, ATTRIBUTE_CE_ONREMOVECLICK, true, "remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isOrderControlsVisible();
+ return ((UIListShuttle) list).isMoveControlsVisible();
}
},
@@ -118,7 +119,7 @@
DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE), null, false, "remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isOrderControlsVisible();
+ return ((UIListShuttle) list).isMoveControlsVisible();
}
},
@@ -127,7 +128,7 @@
CONTROL_ID_REMOVE_ALL, ATTRIBUTE_CE_ONREMOVEALLCLICK, true, "removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isFastOrderControlsVisible();
+ return ((UIListShuttle) list).isFastMoveControlsVisible();
}
},
@@ -136,7 +137,7 @@
DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE_ALL), null, false, "removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isFastOrderControlsVisible();
+ return ((UIListShuttle) list).isFastMoveControlsVisible();
}
}
17 years, 1 month
JBoss Rich Faces SVN: r4377 - in branches/3.1.x/sandbox/samples/listShuttleDemo/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-29 22:03:13 -0500 (Thu, 29 Nov 2007)
New Revision: 4377
Modified:
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
Log:
controls visibility attributes implemented in listShuttle component/demo
Modified: branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java
===================================================================
--- branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java 2007-11-30 02:44:29 UTC (rev 4376)
+++ branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java 2007-11-30 03:03:13 UTC (rev 4377)
@@ -20,6 +20,12 @@
private List target;
+ private boolean moveControlsVisible = true;
+ private boolean fastMoveControlsVisible = true;
+
+ private boolean orderControlsVisible = true;
+ private boolean fastOrderControlsVisible = true;
+
public ListShuttleDemoBean() {
super();
@@ -73,5 +79,37 @@
public void startOver() {
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove("listShuttleDemoBean");
}
+
+ public boolean isMoveControlsVisible() {
+ return moveControlsVisible;
+ }
+
+ public void setMoveControlsVisible(boolean moveControlsVisible) {
+ this.moveControlsVisible = moveControlsVisible;
+ }
+
+ public boolean isFastMoveControlsVisible() {
+ return fastMoveControlsVisible;
+ }
+
+ public void setFastMoveControlsVisible(boolean fastMoveControlsVisible) {
+ this.fastMoveControlsVisible = fastMoveControlsVisible;
+ }
+
+ public boolean isOrderControlsVisible() {
+ return orderControlsVisible;
+ }
+
+ public void setOrderControlsVisible(boolean orderControlsVisible) {
+ this.orderControlsVisible = orderControlsVisible;
+ }
+
+ public boolean isFastOrderControlsVisible() {
+ return fastOrderControlsVisible;
+ }
+
+ public void setFastOrderControlsVisible(boolean fastOrderControlsVisible) {
+ this.fastOrderControlsVisible = fastOrderControlsVisible;
+ }
}
Modified: branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-11-30 02:44:29 UTC (rev 4376)
+++ branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-11-30 03:03:13 UTC (rev 4377)
@@ -20,7 +20,12 @@
<h:commandLink action="#{skinBean.change}" value="set skin" />
<br />
- <ls:listShuttle var="item" sourceValue="#{listShuttleDemoBean.source}" targetValue="#{listShuttleDemoBean.target}">
+ <ls:listShuttle var="item" sourceValue="#{listShuttleDemoBean.source}" targetValue="#{listShuttleDemoBean.target}"
+ orderControlsVisible="#{listShuttleDemoBean.orderControlsVisible}"
+ fastOrderControlsVisible="#{listShuttleDemoBean.fastOrderControlsVisible}"
+ moveControlsVisible="#{listShuttleDemoBean.moveControlsVisible}"
+ fastMoveControlsVisible="#{listShuttleDemoBean.fastMoveControlsVisible}"
+ >
<h:column><h:outputText value="#{item.name}" /></h:column>
<h:column><h:outputText value="#{item.price}" /></h:column>
<h:column>
@@ -33,6 +38,20 @@
</h:column>
</ls:listShuttle>
+ <h:panelGrid columns="2">
+ <h:outputText value="Order controls visible:" />
+ <h:selectBooleanCheckbox value="#{listShuttleDemoBean.orderControlsVisible}" />
+
+ <h:outputText value="Fast order controls visible:" />
+ <h:selectBooleanCheckbox value="#{listShuttleDemoBean.fastOrderControlsVisible}" />
+
+ <h:outputText value="Move controls visible:" />
+ <h:selectBooleanCheckbox value="#{listShuttleDemoBean.moveControlsVisible}" />
+
+ <h:outputText value="Fast move controls visible:" />
+ <h:selectBooleanCheckbox value="#{listShuttleDemoBean.fastMoveControlsVisible}" />
+ </h:panelGrid>
+
<h:commandButton value="Submit" />
<h:commandButton value="Submit Immediate" immediate="true" />
17 years, 1 month
JBoss Rich Faces SVN: r4376 - branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-29 21:44:29 -0500 (Thu, 29 Nov 2007)
New Revision: 4376
Modified:
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
try/catch in component initialization removed
Modified: branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-30 02:25:50 UTC (rev 4375)
+++ branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-30 02:44:29 UTC (rev 4376)
@@ -93,7 +93,6 @@
var shuttle = new Richfaces.OrderingList('#{cId}', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', '#{cId}valueKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}});
var layoutManager = new LayoutManager('#{clientId}internal_header_tab', '#{clientId}internal_tab');
layoutManager.widthSynchronization();
- }
});
//setTimeout(init, 0);
17 years, 1 month
JBoss Rich Faces SVN: r4375 - branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-29 21:25:50 -0500 (Thu, 29 Nov 2007)
New Revision: 4375
Modified:
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
try/catch in component initialization removed
Modified: branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-30 02:00:30 UTC (rev 4374)
+++ branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-30 02:25:50 UTC (rev 4375)
@@ -89,13 +89,10 @@
<script type="text/javascript">
var clientId = '#{cId}';
Event.onReady(function() {
- try {
var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
var shuttle = new Richfaces.OrderingList('#{cId}', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', '#{cId}valueKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}});
var layoutManager = new LayoutManager('#{clientId}internal_header_tab', '#{clientId}internal_tab');
layoutManager.widthSynchronization();
- } catch (error) {
- alert(error);
}
});
17 years, 1 month
JBoss Rich Faces SVN: r4374 - branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-29 21:00:30 -0500 (Thu, 29 Nov 2007)
New Revision: 4374
Modified:
branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
Log:
http://jira.jboss.com/jira/browse/RF-1373
Modified: branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
===================================================================
--- branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2007-11-30 01:44:27 UTC (rev 4373)
+++ branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2007-11-30 02:00:30 UTC (rev 4374)
@@ -1452,10 +1452,16 @@
_ajaxRequestKeys = null;
}
+ /**
+ * Getter for value
+ */
public Object getValue() {
return super.getValue();
}
+ /**
+ * Setter for value resetting local model
+ */
public void setValue(Object value) {
setExtendedDataModel(null);
super.setValue(value);
17 years, 1 month
JBoss Rich Faces SVN: r4373 - branches/3.1.x/cdk/generator/src/main/resources/META-INF/schema/entities.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-29 20:44:27 -0500 (Thu, 29 Nov 2007)
New Revision: 4373
Modified:
branches/3.1.x/cdk/generator/src/main/resources/META-INF/schema/entities/ui_input_attributes.ent
Log:
http://jira.jboss.com/jira/browse/RF-1459
Modified: branches/3.1.x/cdk/generator/src/main/resources/META-INF/schema/entities/ui_input_attributes.ent
===================================================================
--- branches/3.1.x/cdk/generator/src/main/resources/META-INF/schema/entities/ui_input_attributes.ent 2007-11-30 01:31:33 UTC (rev 4372)
+++ branches/3.1.x/cdk/generator/src/main/resources/META-INF/schema/entities/ui_input_attributes.ent 2007-11-30 01:44:27 UTC (rev 4373)
@@ -20,7 +20,7 @@
<property attachedstate="true">
<name>validator</name>
<classname>javax.faces.el.MethodBinding</classname>
- <methodargs> </methodargs>
+ <methodargs>javax.faces.context.FacesContext.class, javax.faces.component.UIComponent.class, java.lang.Object.class</methodargs>
<description>
MethodBinding pointing at a method that is called during
Process Validations phase of the request processing lifecycle,
@@ -30,7 +30,7 @@
<property attachedstate="true">
<name>valueChangeListener</name>
<classname>javax.faces.el.MethodBinding</classname>
- <methodargs> </methodargs>
+ <methodargs>javax.faces.event.ValueChangeEvent.class</methodargs>
<description>Listener for value changes</description>
</property>
17 years, 1 month
JBoss Rich Faces SVN: r4372 - in branches/3.1.x/ui/orderingList/src/main: java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-29 20:31:33 -0500 (Thu, 29 Nov 2007)
New Revision: 4372
Modified:
branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1430
Modified: branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml 2007-11-30 01:30:52 UTC (rev 4371)
+++ branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml 2007-11-30 01:31:33 UTC (rev 4372)
@@ -64,14 +64,14 @@
<property>
<name>listWidth</name>
- <classname>int</classname>
+ <classname>java.lang.String</classname>
<description>
listWidth
</description>
</property>
<property>
<name>listHeight</name>
- <classname>int</classname>
+ <classname>java.lang.String</classname>
<description>
listHeight
</description>
Modified: branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2007-11-30 01:30:52 UTC (rev 4371)
+++ branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2007-11-30 01:31:33 UTC (rev 4372)
@@ -558,12 +558,4 @@
public abstract String getControlsType();
public abstract void setControlsType(String type);
- public abstract int getListWidth();
-
- public abstract void setListWidth(int listWidth);
-
- public abstract int getListHeight();
-
- public abstract void setListHeight(int listHeight);
-
}
Modified: branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-30 01:30:52 UTC (rev 4371)
+++ branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-30 01:31:33 UTC (rev 4372)
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+
<f:root
xmlns:f="http://ajax4jsf.org/cdk/template"
xmlns:c=" http://java.sun.com/jsf/core"
@@ -9,6 +10,9 @@
class="org.richfaces.renderkit.html.OrderingListRenderer"
component="org.richfaces.component.UIOrderingList"
>
+
+ <jsp:directive.page import="org.richfaces.component.util.HtmlUtil" />
+
<h:styles>css/orderingList.xcss</h:styles>
<h:scripts>
@@ -41,8 +45,10 @@
<div id="#{clientId}headerBox" class="rich-ordering-list-output">
<jsp:scriptlet><![CDATA[
String contentContainerStyle = "";
- if (component.getAttributes().get("listWidth") != null) {
- contentContainerStyle = contentContainerStyle.concat("width:").concat(component.getAttributes().get("listWidth").toString()).concat("px;");
+
+ String listWidthValue = (String) component.getAttributes().get("listWidth");
+ if (listWidthValue != null) {
+ contentContainerStyle = contentContainerStyle.concat("width:").concat(HtmlUtil.qualifySize(listWidthValue)).concat(";");
variables.setVariable("contentContainerStyle", contentContainerStyle);
}
]]></jsp:scriptlet>
@@ -52,8 +58,9 @@
</table>
</div>
<jsp:scriptlet><![CDATA[
- if (component.getAttributes().get("listHeight") != null) {
- contentContainerStyle = contentContainerStyle.concat("height:").concat(component.getAttributes().get("listHeight").toString()).concat("px;");
+ String listHeightValue = (String) component.getAttributes().get("listHeight");
+ if (listHeightValue != null) {
+ contentContainerStyle = contentContainerStyle.concat("height:").concat(HtmlUtil.qualifySize(listHeightValue)).concat(";");
variables.setVariable("contentContainerStyle", contentContainerStyle);
}
]]></jsp:scriptlet>
17 years, 1 month
JBoss Rich Faces SVN: r4371 - in trunk: extensions/portlet/src/main/java/org/ajax4jsf/portlet/context and 9 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-11-29 20:30:52 -0500 (Thu, 29 Nov 2007)
New Revision: 4371
Added:
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/java/
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/java/org/
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/java/org/ajax4jsf/
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/java/org/ajax4jsf/portlet/
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/java/org/ajax4jsf/portlet/seam/
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/java/org/ajax4jsf/portlet/seam/PortalIdentity.java
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/resources/
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/resources/components.properties
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/resources/seam.properties
Modified:
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletContextImpl.java
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/pages.xml
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/portlet.xml
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/book.xhtml
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/hotel.xhtml
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/main.xhtml
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/template.xhtml
Log:
Fix some issues with Seam portlet sample
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java 2007-11-30 01:16:58 UTC (rev 4370)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java 2007-11-30 01:30:52 UTC (rev 4371)
@@ -4,6 +4,7 @@
package org.ajax4jsf.portlet;
import java.io.PrintWriter;
+import java.security.Principal;
import java.util.Map;
import java.util.ResourceBundle;
@@ -96,6 +97,7 @@
} // saveView(facesContext);
} catch (Exception e) {
+ // TODO - handle exception.
log.error("Error processing execute lifecycle", e);
throw new BridgeException("Error processing execute lifecycle ", e);
} finally {
@@ -167,6 +169,9 @@
// will restore session prefiv by it's value.
portletSession.setAttribute(
AbstractExternalContext.NAMESPACE_PARAMETER, namespace);
+ Principal userPrincipal = request.getUserPrincipal();
+ // TODO - get user roles, defined in the portlet.xml ( ??? parse it ??? ), and store all values for a "isUserInRole(roleName)" calls
+ portletSession.setAttribute(AbstractExternalContext.PORTAL_USER_PRINCIPAL, userPrincipal, PortletSession.APPLICATION_SCOPE);
if (log.isDebugEnabled()) {
log
.debug("Finish rendering portlet for namespace "
@@ -177,6 +182,8 @@
// cached.
response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
} catch (Exception e) {
+ response.reset();
+ // TODO - handle exception
log.error("Error processing execute lifecycle", e);
throw new BridgeException("Error processing execute lifecycle ", e);
} finally {
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java 2007-11-30 01:16:58 UTC (rev 4370)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java 2007-11-30 01:30:52 UTC (rev 4371)
@@ -64,6 +64,8 @@
import javax.faces.context.FacesContext;
import javax.portlet.faces.Bridge;
+import org.ajax4jsf.portlet.AjaxPortletBridge;
+
/**
*
* @author shura
@@ -103,6 +105,7 @@
protected static final String[] EMPTY_STRING_ARRAY = new String[0];
public static final String PORTLET_CONFIG_ATTRIBUTE = "org.ajax4jsf.portlet.CONFIG";
public static final Object RENDER_POLICY_ATTRIBUTE = "org.ajax4jsf.portlet.RENDER_POLICY";
+ public static final String PORTAL_USER_PRINCIPAL = "org.ajax4jsf.portlet.USER_PRINCIPAL";
// TODO - optimization.
private Map applicationMap;
@@ -482,7 +485,7 @@
protected abstract Enumeration getSessionAttributeNames();
- protected abstract String createActionUrl(Map parameters);
+ protected abstract String createActionUrl(Map<String, String> parameters);
public String encodeActionURL(String url) {
if (null == url) {
@@ -503,7 +506,7 @@
}
String viewId = portalUrl.getParameter(VIEW_ID_PARAMETER);
- actionUrl = createActionUrl(portalUrl.getParameters());
+ return createActionUrl(portalUrl.getParameters());
}
} catch (MalformedURLException e) {
throw new FacesException(e);
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java 2007-11-30 01:16:58 UTC (rev 4370)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java 2007-11-30 01:30:52 UTC (rev 4371)
@@ -231,7 +231,7 @@
* @return
*/
@Override
- protected String createActionUrl(Map parameters){
+ protected String createActionUrl(Map<String, String> parameters){
return "/ajax4jsfPortletBridge/actionUrl/do/nothitg";
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java 2007-11-30 01:16:58 UTC (rev 4370)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java 2007-11-30 01:30:52 UTC (rev 4371)
@@ -38,13 +38,13 @@
public class PortletRenderContextImpl extends PortletContextImpl {
public String getResponseCharacterEncoding() {
- RenderResponse renderResponse = (RenderResponse) getPortletResponse();
- return renderResponse.getCharacterEncoding();
+ RenderResponse renderResponse = (RenderResponse) getPortletResponse();
+ return renderResponse.getCharacterEncoding();
}
public String getResponseContentType() {
- RenderResponse renderResponse = (RenderResponse) getPortletResponse();
- return renderResponse.getContentType();
+ RenderResponse renderResponse = (RenderResponse) getPortletResponse();
+ return renderResponse.getContentType();
}
public void setRequestCharacterEncoding(String encoding)
@@ -53,11 +53,11 @@
}
public String getRequestCharacterEncoding() {
- return null;
+ return null;
}
-
+
protected String getNamespace() {
- return ((RenderResponse)getPortletResponse()).getNamespace();
+ return ((RenderResponse) getPortletResponse()).getNamespace();
}
private Map<String, String[]> _requestParameters;
@@ -87,23 +87,31 @@
@Override
public void redirect(String url) throws IOException {
+ if (null == url) {
+ throw new NullPointerException("Path to redirect is null");
+ }
+ PortalActionURL actionURL = new PortalActionURL(url);
+ if(!actionURL.isInContext(getRequestContextPath()) || "true".equalsIgnoreCase(actionURL.getParameter(Bridge.DIRECT_LINK))){
throw new IllegalStateException(
- "Redirect to new url not at action phase");
+ "Redirect to new url not at action phase");
+ }
+ // HACK - if page is in the context, just treat it as navigation case
}
-
@Override
- protected String createActionUrl(Map parameters) {
- RenderResponse renderResponse = (RenderResponse) getPortletResponse();
- PortletURL portletURL = renderResponse.createActionURL();
- portletURL.setParameter(AbstractExternalContext.NAMESPACE_PARAMETER, renderResponse.getNamespace());
- for (Iterator<Entry<String, String>> param = parameters.entrySet().iterator(); param.hasNext();) {
+ protected String createActionUrl(Map<String, String> parameters) {
+ RenderResponse renderResponse = (RenderResponse) getPortletResponse();
+ PortletURL portletURL = renderResponse.createActionURL();
+ portletURL.setParameter(AbstractExternalContext.NAMESPACE_PARAMETER,
+ renderResponse.getNamespace());
+ for (Iterator<Entry<String, String>> param = parameters.entrySet()
+ .iterator(); param.hasNext();) {
Entry<String, String> parameter = param.next();
portletURL.setParameter(parameter.getKey(), parameter.getValue());
}
- return portletURL.toString();
+ return portletURL.toString();
}
-
+
public void dispatch(String path) throws IOException {
if (null == path) {
throw new NullPointerException("Path to new view is null");
@@ -117,34 +125,40 @@
try {
RenderRequest renderRequest = (RenderRequest) getPortletRequest();
RenderResponse portletResponse = (RenderResponse) getPortletResponse();
- dispatcher.include(renderRequest,
- portletResponse);
+ dispatcher.include(renderRequest, portletResponse);
} catch (PortletException e) {
throw new FacesException(e);
}
}
-
+
/**
* @return
*/
@SuppressWarnings("unchecked")
private Map<String, String[]> getSavedRequestParameters() {
if (null == _requestParameters) {
- // Get parameters ( all or a View state only ) restored as requered in the JSR 301 PLT 5.1
+ // Get parameters ( all or a View state only ) restored as requered
+ // in the JSR 301 PLT 5.1
Object preserveRequestAttr = Boolean.FALSE;
PortletConfig portletConfig = (PortletConfig) getRequestAttribute(PORTLET_CONFIG_ATTRIBUTE);
if (null != portletConfig) {
String portletPreserveParamName = Bridge.PORTLET_ATTR_PREFIX
+ portletConfig.getPortletName()
+ Bridge.PRESERVE_ACTION_PARAM_ATTR_SUFFIX;
- preserveRequestAttr = getRequestAttribute(portletPreserveParamName);
+ preserveRequestAttr = getContextAttribute(portletPreserveParamName);
}
Map<String, String[]> parameters = (Map<String, String[]>) getRequestAttribute(PortletViewState.REQUEST_PARAMETERS_ATTRIBUTE);
if (Boolean.TRUE.equals(preserveRequestAttr)) {
_requestParameters = parameters;
- } else if (null != parameters){
+ } else if (null != parameters) {
_requestParameters = new HashMap<String, String[]>();
- _requestParameters.put(ResponseStateManager.VIEW_STATE_PARAM, parameters.get(ResponseStateManager.VIEW_STATE_PARAM));
+ String[] viewState = parameters
+ .get(ResponseStateManager.VIEW_STATE_PARAM);
+ if (null != viewState) {
+ _requestParameters.put(
+ ResponseStateManager.VIEW_STATE_PARAM, viewState);
+
+ }
}
}
return _requestParameters;
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletContextImpl.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletContextImpl.java 2007-11-30 01:16:58 UTC (rev 4370)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletContextImpl.java 2007-11-30 01:30:52 UTC (rev 4371)
@@ -15,6 +15,7 @@
import java.util.Locale;
import java.util.Map;
import java.util.Set;
+import java.util.Map.Entry;
import javax.faces.FacesException;
import javax.faces.context.FacesContext;
@@ -28,6 +29,7 @@
import javax.servlet.http.HttpSession;
import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.portlet.AjaxPortletBridge;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -163,6 +165,10 @@
}
public String getRemoteUser() {
+ Principal userPrincipal = getUserPrincipal();
+ if( null != userPrincipal){
+ return userPrincipal.getName();
+ }
return getHttpRequest().getRemoteUser();
}
@@ -300,9 +306,21 @@
}
@Override
- protected String createActionUrl(Map parameters) {
- String actionURL = getHttpRequest().getParameter(ACTION__PARAMETER);
- return actionURL;
+ protected String createActionUrl(Map<String, String> parameters) {
+ String url = getHttpRequest().getParameter(ACTION__PARAMETER);
+ if(null == url){
+ throw new FacesException("No portal action url availible");
+ }
+ PortalActionURL portalUrl;
+ try {
+ portalUrl = new PortalActionURL(url);
+ } catch (MalformedURLException e) {
+ throw new FacesException("Malformed Portal Action URL "+url);
+ }
+ for (Entry<String, String> parameterEntry : parameters.entrySet()) {
+ portalUrl.addParameter(parameterEntry.getKey(), parameterEntry.getValue());
+ }
+ return portalUrl.toString();
}
public String encodeResourceURL(String url) {
@@ -334,7 +352,15 @@
}
public Principal getUserPrincipal() {
- return getHttpRequest().getUserPrincipal();
+ Principal userPrincipal = getHttpRequest().getUserPrincipal();
+ HttpSession httpSession = getHttpRequest().getSession(false);
+ if(null != httpSession){
+ Principal portalPrincipal = (Principal) httpSession.getAttribute(PORTAL_USER_PRINCIPAL);
+ if(null != portalPrincipal){
+ userPrincipal = portalPrincipal;
+ }
+ }
+ return userPrincipal;
}
public boolean isUserInRole(String role) {
Added: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/java/org/ajax4jsf/portlet/seam/PortalIdentity.java
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/java/org/ajax4jsf/portlet/seam/PortalIdentity.java (rev 0)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/java/org/ajax4jsf/portlet/seam/PortalIdentity.java 2007-11-30 01:30:52 UTC (rev 4371)
@@ -0,0 +1,121 @@
+/**
+ *
+ */
+package org.ajax4jsf.portlet.seam;
+
+import static org.jboss.seam.ScopeType.SESSION;
+import static org.jboss.seam.annotations.Install.APPLICATION;
+
+import java.security.Principal;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.security.auth.login.LoginException;
+
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Startup;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.security.Identity;
+
+/**
+ * @author asmirnov
+ *
+ */
+@Name("org.jboss.seam.security.identity")
+@Scope(SESSION)
+@BypassInterceptors
+@Install(precedence = APPLICATION, classDependencies = "javax.portlet.Portlet")
+@Startup
+public class PortalIdentity extends Identity {
+
+ public PortalIdentity() {
+ super();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.seam.security.Identity#authenticate()
+ */
+ @Override
+ public void authenticate() throws LoginException {
+ if (!isLoggedIn()) {
+ throw new LoginException();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.seam.security.Identity#hasPermission(java.lang.String,
+ * java.lang.String, java.lang.Object[])
+ */
+ @Override
+ public boolean hasPermission(String name, String action, Object... arg) {
+ // TODO Auto-generated method stub
+ return super.hasPermission(name, action, arg);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.seam.security.Identity#getPrincipal()
+ */
+ @Override
+ public Principal getPrincipal() {
+ return FacesContext.getCurrentInstance().getExternalContext()
+ .getUserPrincipal();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.seam.security.Identity#getUsername()
+ */
+ @Override
+ public String getUsername() {
+ String userName = null;
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ if (null != facesContext) {
+ ExternalContext externalContext = facesContext.getExternalContext();
+ if (null != externalContext.getUserPrincipal()) {
+ userName = externalContext.getRemoteUser();
+ }
+ }
+ return userName;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.seam.security.Identity#hasRole(java.lang.String)
+ */
+ @Override
+ public boolean hasRole(String role) {
+ return FacesContext.getCurrentInstance().getExternalContext()
+ .isUserInRole(role);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.seam.security.Identity#isLoggedIn()
+ */
+ @Override
+ public boolean isLoggedIn() {
+ return null != getPrincipal();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.seam.security.Identity#isLoggedIn(boolean)
+ */
+ @Override
+ public boolean isLoggedIn(boolean attemptLogin) {
+ return isLoggedIn();
+ }
+
+}
Property changes on: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/java/org/ajax4jsf/portlet/seam/PortalIdentity.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/resources/components.properties
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/resources/components.properties (rev 0)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/resources/components.properties 2007-11-30 01:30:52 UTC (rev 4371)
@@ -0,0 +1 @@
+jndiPattern #{ejbName}/local
\ No newline at end of file
Property changes on: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/resources/components.properties
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/resources/seam.properties
===================================================================
Property changes on: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/resources/seam.properties
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Modified: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/pages.xml 2007-11-30 01:16:58 UTC (rev 4370)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/pages.xml 2007-11-30 01:30:52 UTC (rev 4371)
@@ -20,7 +20,10 @@
</page>
<page view-id="/home.xhtml">
-
+ <action execute="#{identity.login}" if="#{identity.loggedIn}"/>
+ <navigation from-action="#{identity.login}">
+ <render view-id="/main.xhtml"/>
+ </navigation>
<navigation>
<rule if="#{identity.loggedIn}">
<render view-id="/main.xhtml"/>
Modified: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/portlet.xml 2007-11-30 01:16:58 UTC (rev 4370)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/portlet.xml 2007-11-30 01:30:52 UTC (rev 4371)
@@ -12,6 +12,10 @@
<value>/home.xhtml</value>
</init-param>
+ <init-param>
+ <name>javax.portlet.faces.preserveActionParams</name>
+ <value>true</value>
+ </init-param>
<expiration-cache>-0</expiration-cache>
<portlet-info>
Modified: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/book.xhtml
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/book.xhtml 2007-11-30 01:16:58 UTC (rev 4370)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/book.xhtml 2007-11-30 01:30:52 UTC (rev 4371)
@@ -55,14 +55,14 @@
<s:decorate id="creditCardDecorate" template="edit.xhtml">
<ui:define name="label">Credit Card #:</ui:define>
<h:inputText id="creditCard" value="#{booking.creditCard}" required="true">
- <a:support event="onblur" reRender="creditCardDecorate"/>
+ <a:support event="onblur" reRender="creditCardDecorate" bypassUpdates="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="creditCardNameDecorate" template="edit.xhtml">
<ui:define name="label">Credit Card Name:</ui:define>
<h:inputText id="creditCardName" value="#{booking.creditCardName}" required="true">
- <a:support event="onblur" reRender="creditCardNameDecorate"/>
+ <a:support event="onblur" reRender="creditCardNameDecorate" bypassUpdates="true"/>
</h:inputText>
</s:decorate>
@@ -92,9 +92,9 @@
</s:decorate>
<div class="buttonBox">
- <h:commandButton id="proceed" value="Proceed" action="#{hotelBooking.setBookingDetails}"/>
+ <a:commandButton id="proceed" value="Proceed" action="#{hotelBooking.setBookingDetails}"/>
 
- <s:button id="cancel" value="Cancel" action="#{hotelBooking.cancel}"/>
+ <a:commandButton id="cancel" value="Cancel" action="#{hotelBooking.cancel}"/>
</div>
</fieldset>
Modified: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/hotel.xhtml
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/hotel.xhtml 2007-11-30 01:16:58 UTC (rev 4370)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/hotel.xhtml 2007-11-30 01:30:52 UTC (rev 4371)
@@ -3,6 +3,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a="http://richfaces.org/a4j"
xmlns:s="http://jboss.com/products/seam/taglib"
template="template.xhtml">
@@ -18,9 +19,9 @@
<div class="buttonBox">
<h:form id="hotel">
- <h:commandButton id="bookHotel" action="#{hotelBooking.bookHotel}" value="Book Hotel"/>
+ <a:commandButton id="bookHotel" action="#{hotelBooking.bookHotel}" value="Book Hotel"/>
 
- <h:commandButton id="cancel" action="#{hotelBooking.cancel}" value="Back to Search"/>
+ <a:commandButton id="cancel" action="#{hotelBooking.cancel}" value="Back to Search"/>
</h:form>
</div>
Modified: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/main.xhtml
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/main.xhtml 2007-11-30 01:16:58 UTC (rev 4370)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/main.xhtml 2007-11-30 01:30:52 UTC (rev 4371)
@@ -42,7 +42,7 @@
</h:form>
</div>
-
+<h:form id="hotels">
<a:outputPanel id="searchResults">
<div class="section">
<h:outputText value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
@@ -65,13 +65,13 @@
</h:column>
<h:column>
<f:facet name="header">Action</f:facet>
- <s:link id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
+ <a:commandLink id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
</h:column>
</h:dataTable>
- <s:link value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/>
+ <a:commandLink value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}" reRender="searchResults"/>
</div>
</a:outputPanel>
-
+</h:form>
<div class="section">
<h1>Current Hotel Bookings</h1>
</div>
Modified: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/template.xhtml
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/template.xhtml 2007-11-30 01:16:58 UTC (rev 4370)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/template.xhtml 2007-11-30 01:30:52 UTC (rev 4371)
@@ -3,11 +3,12 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a="http://richfaces.org/a4j"
xmlns:s="http://jboss.com/products/seam/taglib">
<div id="document">
<div id="header">
- <div id="title"><img src="img/hdr.title.gif" alt="JBoss Suites: seam framework demo"/></div>
+ <div id="title"><h:graphicImage value="/img/hdr.title.gif" alt="JBoss Suites: seam framework demo"/></div>
<div id="status">
Welcome #{user.name}
| <s:link id="search" view="/main.xhtml" value="Search" propagation="none"/>
@@ -25,5 +26,6 @@
</div>
</div>
<div id="footer">Created with JBoss Seam 2.0, JBoss EJB 3.0, JSF 1.2, Hibernate 3 and Facelets</div>
+ <!-- a:log hotkey="M" /-->
</div>
</f:view>
17 years, 1 month
JBoss Rich Faces SVN: r4370 - branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-29 20:16:58 -0500 (Thu, 29 Nov 2007)
New Revision: 4370
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java
Log:
http://jira.jboss.com/jira/browse/RF-1428
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java 2007-11-30 01:16:54 UTC (rev 4369)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java 2007-11-30 01:16:58 UTC (rev 4370)
@@ -70,7 +70,7 @@
protected static final OrderingComponentRendererBase.ControlsHelper[] HELPERS = new OrderingComponentRendererBase.ControlsHelper[] {
new OrderingComponentRendererBase.ControlsHelper("copyAll", "COPY_ALL_LABEL", DEFAULT_LABEL_COPY_ALL, ListShuttleIconCopyAll.class.getName(), FACET_COPY_ALL,
"-copyall", ATTRIBUTE_CLASS_COPY_ALL_CONTROL, "",
- CONTROL_ID_COPY_ALL, ATTRIBUTE_CE_ONCOPYALLCLICK, true) {
+ CONTROL_ID_COPY_ALL, ATTRIBUTE_CE_ONCOPYALLCLICK, true, "copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isFastOrderControlsVisible();
@@ -79,7 +79,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("disabledCopyAll", "COPY_ALL_LABEL", DEFAULT_LABEL_COPY_ALL, ListShuttleIconCopyAllDisabled.class.getName(), FACET_DIS_COPY_ALL,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, "-disabled",
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY_ALL), null, false) {
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY_ALL), null, false, "copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isFastOrderControlsVisible();
@@ -88,7 +88,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("copy", "COPY_LABEL", DEFAULT_LABEL_COPY, ListShuttleIconCopy.class.getName(), FACET_COPY,
"-copy", ATTRIBUTE_CLASS_COPY_CONTROL, "",
- CONTROL_ID_COPY, ATTRIBUTE_CE_ONCOPYCLICK ,true) {
+ CONTROL_ID_COPY, ATTRIBUTE_CE_ONCOPYCLICK ,true, "copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isOrderControlsVisible();
@@ -97,7 +97,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("disabledCopy", "COPY_LABEL", DEFAULT_LABEL_COPY, ListShuttleIconCopyDisabled.class.getName(), FACET_DIS_COPY,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, "-disabled",
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY), null, false) {
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY), null, false, "copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isOrderControlsVisible();
@@ -106,7 +106,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("remove", "REMOVE_LABEL", DEFAULT_LABEL_REMOVE, ListShuttleIconRemove.class.getName(), FACET_REMOVE,
"-remove", ATTRIBUTE_CLASS_REMOVE_CONTROL, "",
- CONTROL_ID_REMOVE, ATTRIBUTE_CE_ONREMOVECLICK, true) {
+ CONTROL_ID_REMOVE, ATTRIBUTE_CE_ONREMOVECLICK, true, "remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isOrderControlsVisible();
@@ -115,7 +115,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("disabledRemove", "REMOVE_LABEL", DEFAULT_LABEL_REMOVE, ListShuttleIconRemoveDisabled.class.getName(), FACET_DIS_REMOVE,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, "-disabled",
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE), null, false) {
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE), null, false, "remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isOrderControlsVisible();
@@ -124,7 +124,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("removeAll", "REMOVE_ALL_LABEL", DEFAULT_LABEL_REMOVE_ALL, ListShuttleIconRemoveAll.class.getName(), FACET_REMOVE_ALL,
"-removeall", ATTRIBUTE_CLASS_REMOVE_ALL_CONTROL, "",
- CONTROL_ID_REMOVE_ALL, ATTRIBUTE_CE_ONREMOVEALLCLICK, true) {
+ CONTROL_ID_REMOVE_ALL, ATTRIBUTE_CE_ONREMOVEALLCLICK, true, "removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isFastOrderControlsVisible();
@@ -133,7 +133,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("disabledRemoveAll", "REMOVE_ALL_LABEL", DEFAULT_LABEL_REMOVE_ALL, ListShuttleIconRemoveAllDisabled.class.getName(), FACET_DIS_REMOVE_ALL,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, "-disabled",
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE_ALL), null, false) {
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE_ALL), null, false, "removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isFastOrderControlsVisible();
17 years, 1 month