[JBoss JIRA] Created: (RF-2811) a4j:repeat doesn't support java.util.Set
by Sergey Halipov (JIRA)
a4j:repeat doesn't support java.util.Set
----------------------------------------
Key: RF-2811
URL: http://jira.jboss.com/jira/browse/RF-2811
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.0
Environment: JDK 1.5
Reporter: Sergey Halipov
a4j:repeat interprets Sets as simple type not a collection. Example bellow doesn't work correctly. But it would work if we replaced HashSet with ArrayList.
JSP code:
<a4j:repeat value="#{bean.testLists}" var="list" id="repeat">
<h:outputText value="#{list}"></h:outputText><br />
</a4j:repeat>
Java bean:
public class Bean {
private Collection<String> testLists = new HashSet<String>();
public Bean() {
for (int i = 0; i < 30; i++) {
testLists.add(new Integer(i).toString());
}
}
public Collection<String> getTestLists() {
return testLists;
}
public void setTestLists(Collection<String> testLists) {
this.testLists = testLists;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[JBoss JIRA] Created: (RF-5955) a4j push fails(sometimes) to rerender target component
by Atul Kshirsagar (JIRA)
a4j push fails(sometimes) to rerender target component
------------------------------------------------------
Key: RF-5955
URL: https://jira.jboss.org/jira/browse/RF-5955
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.3.0
Environment: JBoss AS: 4.2.2 GA
JBoss Seam: 2.1.1GA
JBoss RichFaces: 3.3.0 GA
OS: Windows XP
Browser: Firefox 3.0.5 and IE 7
Reporter: Atul Kshirsagar
a4j push tag fails to reRender the target component (specified in reRender attribute) sometimes.
In our project we are using a4j:push tag to dynamically refresh certain portions of our web page depending upon events generated on server side. The problem that I am seeing is that some times (not always) a4j push does not reRender the target id specified even though PushEventListener is notified of an Event.
Note that I have 8 a4j push tags refreshing different components on our web page and we can see burst of events (approx 200 events in less than 1 min).
Below given is the example code:
xhtml that uses a4j:push tag:
<a4j:push reRender="myTableId" eventProducer="#{myBean.addListener}" interval="10000"
ignoreDupResponses="true" action="#{mybean.populateViewModel}"/>
<rich:dataTable id="myTableId" value="#{myBean.data}" var="_data">
<rich:column>
<h:outputText value="#{_data.name}" />
</rich:column>
</rich:dataTable>
Backing bean definition is as follows:
@Stateful
@Local( {
MyBeanLocal.class
})
@Name("myBean")
@Scope(ScopeType.SESSION)
@Restrict("#{identity.loggedIn}")
public class MyBean implements MyBeanLocal, Serializable {
@EJB
private MyEJB ejb;
private MyBeanListener eventListener;
/**
* DataModel
*/
private List<Data> data;
public List<Data> getData() {
return this.data;
}
@Create
public void create() {
this.data = new ArrayList<Data>();
populateViewModel();
}
// destroy method de-registers the listener from DataModel
@Remove
@Destroy
public void destroy() {
DataModel dataModel = ejb.getDataModel();
if (dataModel != null) {
dataModel.removeChangeListener(eventListener);
}
}
/**
* Adds listener for conveying AJAX events.
*
* @param listener
*/
public void addListener(EventListener listener) {
DataModel dataModel = ejb.getDataModel();
eventListener = new MyBeanListener();
eventListener.addListener(listener);
dataModel.addChangeListener(eventListener);
}
/**
* Constructs the view data model required for the link utilization widget on dashboard
*/
public void populateViewModel() {
data.clear();
DataModel dataModel = ejb.getDataModel();
data = dataModel.getData();
}
}
public class MyBeanListener implements Serializable {
private PushEventListener listener;
public void addListener(EventListener l) {
this.listener = (PushEventListener)l;
}
public void dataChanged() {
listener.onEvent(new EventObject(this));
}
}
public class DataModel implements MessageListener {
private List<MyBeanListener> listeners;
public void addChangeListener(MyBeanListener l) {
listeners.add(l);
}
public void removeChangeListener(MyBeanListener l) {
listeners.remove(l);
}
public void fireEvent() {
for (MyBeanListener l: listeners) {
l.dataChanged();
}
}
// This method is called on JMS message
public void onMessage(Message message) {
// update internal data structure and then notify listeners
fireEvent();
}
}
So what is happening here is that class MyBean is SFSB and registers MyBeanListener with DataModel when addListener is called (by virtue of eventProducer attribute of a4j:push). DataModel is a JMS listener and upon receiving JMS message it notifies the registered listener of change in data.
What I am seeing here is that all the above described flow happens and a4j:push gets notified of the event (I verified this by checking that populateViewData method of MyBean gets called) but the reRender of 'myTableId' component does not happen (this happens only intermittently...e.g If I repeat the test for about 4 to 5 times I will see it happening once). I debugged it using a4j:log component and found that sometimes the ajax response does not contain the component with id 'myTableId'.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[JBoss JIRA] Created: (RF-4129) Expanding/collapsing a rich:tree nodes from model
by Francisco Jose Peredo Noguez (JIRA)
Expanding/collapsing a rich:tree nodes from model
-------------------------------------------------
Key: RF-4129
URL: https://jira.jboss.org/jira/browse/RF-4129
Project: RichFaces
Issue Type: Feature Request
Reporter: Francisco Jose Peredo Noguez
Lets say I bind my Rich Tree to a list of object using the recursiveTreeNodesAdaptor:
Code:
<rich:recursiveTreeNodesAdaptor roots="#{rootNodes}" var="node" nodes="#{node.childNodes}">
<rich:treeNode rendered="#{node.visible}">
#{node.name}
</rich:treeNode>
with this code:
rendered="#{node.visible}"
I can control if it is visible or not... I would like something similar to control if it is collapsed or not, something like:
Code:
collapsed="#{node.collapsed}"
It would look like this:
<rich:recursiveTreeNodesAdaptor roots="#{rootNodes}" var="node" nodes="#{node.childNodes}">
<rich:treeNode rendered="#{node.visible}" collapsed="#{node.collapsed}">
#{node.name}
</rich:treeNode>
It would be extra-nice if it could propagate back automatically (if a leaf node has collapsed = false, all its parent nodes would be expandend)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[JBoss JIRA] Created: (RF-5166) fileUpload: fileUploadListener isn't call under myfaces.
by Mikhail Vitenkov (JIRA)
fileUpload: fileUploadListener isn't call under myfaces.
--------------------------------------------------------
Key: RF-5166
URL: https://jira.jboss.org/jira/browse/RF-5166
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.3.0
Environment: myfaces 1.2.5, IE6, IE7, FF 3.1.3, Safari 3.1, Opera 9.62(3.3.0.BETA1)
Reporter: Mikhail Vitenkov
Assignee: Nick Belaevski
#1. Set org.apache.myfaces.CHECK_EXTENSIONS_FILTER context parameter to "false" in web.xml;
#2. Set fileUploadListener="#{fileUpload.fileUploadListener}", where listener defined following way:
public void fileUploadListener(UploadEvent event) throws Exception{
UploadItem upload = event.getUploadItem();
if (upload.isTempFile()) {
File file = upload.getFile();
System.out.println("FileUpload.fileUploadListener()");
} else {
ByteArrayOutputStream b = new ByteArrayOutputStream();
b.write(upload.getData());
}
System.out.println("FileUpload.fileUploadListener()");
}
#3. Navigate to page with component & try to upload any valid file(satisfied with maxFilesQuantity, size restriction and so on).
#4. Verify "FileUpload.fileUploadListener()" message in console.
Actual behavior:
fileUploadListener was not fired.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months