Author: lfryc(a)redhat.com
Date: 2011-02-18 08:05:10 -0500 (Fri, 18 Feb 2011)
New Revision: 21757
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml
Log:
added common ajax attributes bindings for dropTarget + fixed panelMenu itemChangeListener
output and activeItem bindings
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-02-18
11:31:54 UTC (rev 21756)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-02-18
13:05:10 UTC (rev 21757)
@@ -371,6 +371,7 @@
/**
* An action that does nothing.
+ *
* @return null
*/
public String dummyAction() {
@@ -380,7 +381,7 @@
/**
* An action listener that does nothing.
- *
+ *
* @param event
* an event representing the activation of a user interface component (not
used)
*/
@@ -390,7 +391,7 @@
/**
* An action listener that does nothing.
- *
+ *
* @param event
* an event representing the activation of a user interface component (not
used)
*/
@@ -400,28 +401,29 @@
/**
* An item change listener that logs to the page old and new value.
- *
+ *
* @param event
* an event representing the activation of a user interface component
*/
public void itemChangeListener(ItemChangeEvent event) {
- logToPage("* item changed: " + event.getOldItem().getId() + "
-> " + event.getNewItem().getId());
+ logToPage("* item changed: " + (event.getOldItem() == null ? null :
event.getOldItem().getId()) + " -> "
+ + event.getNewItem().getId());
}
/**
* A value change listener that logs to the page old and new value.
- *
+ *
* @param event
* an event representing the activation of a user interface component
*/
public void valueChangeListener(ValueChangeEvent event) {
logToPage("* value changed: " + event.getOldValue() + " ->
" + event.getNewValue());
}
-
+
public boolean getExecuteChecker() {
return true;
}
-
+
public void setExecuteChecker(boolean executeChecker) {
logToPage("* executeChecker");
}
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java 2011-02-18
11:31:54 UTC (rev 21756)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java 2011-02-18
13:05:10 UTC (rev 21757)
@@ -46,7 +46,7 @@
private static final long serialVersionUID = -1L;
private static Logger logger;
private Attributes attributes;
-
+
private Object activeItem;
/**
@@ -56,9 +56,9 @@
public void init() {
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
-
+
attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanelMenu.class,
getClass());
-
+
attributes.setAttribute("rendered", true);
attributes.setAttribute("style", "width: 200px;");
@@ -83,13 +83,14 @@
*/
public void itemChangeListener(ItemChangeEvent event) {
activeItem = event.getNewItem();
- RichBean.logToPage("* item changed: " + event.getOldItem() + "
-> " + event.getNewItem());
+ RichBean.logToPage("* item changed: " + (event.getOldItem() == null ?
null : event.getOldItem().getId())
+ + " -> " + event.getNewItem().getId());
}
-
+
public void setActiveItem(Object activeItem) {
this.activeItem = activeItem;
}
-
+
public Object getActiveItem() {
return activeItem;
}
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml 2011-02-18
11:31:54 UTC (rev 21756)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml 2011-02-18
13:05:10 UTC (rev 21757)
@@ -86,10 +86,16 @@
acceptedTypes="#{richDropTargetBean.attributes['acceptedTypes'].value}"
bypassUpdates="#{richDropTargetBean.attributes['bypassUpdates'].value}"
+ data="#{richDropTargetBean.attributes['data'].value}"
immediate="#{richDropTargetBean.attributes['immediate'].value}"
execute="#{richDropTargetBean.attributes['execute'].value}"
+ limitRender="#{richDropTargetBean.attributes['limitRender'].value}"
+ onbegin="#{richDropTargetBean.attributes['onbegin'].value}"
+ onbeforedomupdate="#{richDropTargetBean.attributes['onbeforedomupdate'].value}"
+ oncomplete="#{richDropTargetBean.attributes['oncomplete'].value}"
render="#{richDropTargetBean.attributes['render'].value}"
rendered="#{richDropTargetBean.attributes['rendered'].value}"
+ status="#{richDropTargetBean.attributes['status'].value}"
value="#{richDropTargetBean.attributes['value'].value}"
/>
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml 2011-02-18
11:31:54 UTC (rev 21756)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml 2011-02-18
13:05:10 UTC (rev 21757)
@@ -153,7 +153,7 @@
<legend>selected item</legend>
<a4j:outputPanel id="selectedPanel"
ajaxRendered="true">
- <h:outputText id="current"
value="#{richPanelMenuBean.activeItem}" />
+ <h:outputText id="current"
value="#{richPanelMenuBean.activeItem.id}" />
</a4j:outputPanel>
</fieldset>
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml 2011-02-18
11:31:54 UTC (rev 21756)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml 2011-02-18
13:05:10 UTC (rev 21757)
@@ -175,7 +175,7 @@
<legend>selected item</legend>
<a4j:outputPanel id="selectedPanel"
ajaxRendered="true">
- <h:outputText id="current"
value="#{richPanelMenuBean.attributes['activeItem'].value}" />
+ <h:outputText id="current"
value="#{richPanelMenuBean.activeItem.id}" />
</a4j:outputPanel>
</fieldset>
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml 2011-02-18
11:31:54 UTC (rev 21756)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml 2011-02-18
13:05:10 UTC (rev 21757)
@@ -94,7 +94,7 @@
<legend>selected item</legend>
<a4j:outputPanel id="selectedPanel"
ajaxRendered="true">
- <h:outputText id="current"
value="#{richPanelMenuBean.attributes['activeItem'].value}" />
+ <h:outputText id="current"
value="#{richPanelMenuBean.activeItem.id}" />
</a4j:outputPanel>
</fieldset>
Show replies by date