Messages posted by: sreynolds  XML
Profile for sreynolds -> Messages posted by sreynolds [56] Go to Page: 1, 2, 3, 4 Next 
Author Message
Found some info in another thread. Apparently, having both the "url" and "actionListener" attributes on a menuItem causes the actionListener to be ignored. I'm guessing that the navigation to the URL causes things to get reconstructed, so that the information needed to invoke the listener is no longer available.

Just by way of explanation, my object in this is to update a crumbBar to reflect the current navigation location after moving via the menuBar. I was hoping to use something like the logic in the crumbBar showcase demo, but with a menu driving things rather than the tree used in the demo. Seems like I may have to rethink this.
A very simple test, adapted from the icefaces showcase example...
(Files attached. I don't know if the copy here will be readable.)

Currently, I can't get the action event to fire from either the static or dynamic menu. This is the static version. I've tested this in Firefox and Chrome browsers. The app is hosted on tomcat 8.0.24.

The showcase functions as expected from my browser, so I don't understand what would cause my usage to fail.

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   <icecore:setEventPhase events="ValueChangeEvent" phase="INVOKE_APPLICATION">
   <f:view contentType="text/html">
     <h:form id="menuForm" style="overflow:visible;">
       <ace:menuBar id="menuBar" autoSubmenuDisplay="true">
           icon="ui-icon ui-icon-home"
           <ace:ajax event="activate" execute="@this" render="@all" />
           icon="ui-icon ui-icon-document">
             <ace:ajax event="activate" execute="@this" render="@all" />
       <h:outputText value="#{testBean.lastAction}" />

 import java.io.Serializable;
 import javax.faces.bean.CustomScoped;
 import javax.faces.bean.ManagedBean;
 import javax.faces.component.UIComponent;
 import javax.faces.event.ActionEvent;
 @ManagedBean(name = TestBean.BEAN_NAME)
 @CustomScoped(value = "#{window}")
 public class TestBean implements Serializable 
     private static final long serialVersionUID = 1L;
     public static final String BEAN_NAME = "testBean";
     public String getBeanName() { return BEAN_NAME; }
     public final String MENU_BAR_ID = "menuBar";
     private String _lastAction = "None";
     public TestBean() {
     public String getLastAction()
         return _lastAction;
     public void menuAction(ActionEvent event)
         System.err.println("menuAction: ENTER");
         UIComponent comp = event.getComponent();
         _lastAction = comp.getClientId();
         System.err.println("lastAction: " + _lastAction);
         System.err.println("menuBarAction: EXIT");

Has this old problem resurfaced in 4.1.1?
I have a menu being constructed in a bean. I've tried all of the various recommended methods of associating an actionListener method with the individual menuItems, but none of them seem to work. No matter what I do, the listener is never invoked.
Here's a fragment:
<f:selectItems value="#{aSessionBean.itemList}" />
<ace:ajax execute="@this theList" render="@all" />

The itemList is dynamically constructed as an ArrayList<SelectItem> with each item having a String value.
The button action removes selected string value from its backing data -- the itemList would be reconstructed the next time it is fetched. It also currently removes the corresponding entry from selectionList.

It looks like maybe the problem arises when I remove the end item from the list, and then subsequent processing is using the now-invalid selection index to try to access data in the model.

The error that occurs is:
SEVERE: javax.faces.model.NoRowAvailableException
at javax.faces.model.ListDataModel.getRowData(ListDataModel.java:149)
at org.icefaces.impl.component.UISeriesBase.getRowData(UISeriesBase.java:111)
at org.icefaces.ace.component.list.ListDecoder.processSelections(ListDecoder.java:53)
at org.icefaces.ace.component.list.ListRenderer.decode(ListRenderer.java:74)
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:832)
I have an ace:list component and a separate ace:pushButton that causes the selected item in the list to be removed. Invoking the button action sometimes, but not always, results in a NoRowAvailableException from the list component.

Any ideas as to what causes this or how to get around it?
I have a simple ICEfaces 4.0 app.
When I have an ace:dialog on the page and refresh the browser (Chrome or IE 11), the content of the dialog is duplicated and a JasperException is thrown complaining about the first duplicate ID encountered as a result. Happens even when the dialog is the only thing on the page and regardless of what the actual dialog content is.

Anyone recognize this as a bug or know of something silly I might be doing to cause it?

Update: I think I figured this out. I had a binding on the dialog (leftover code ported from an old app and no longer needed). Removing the binding fixes the duplication issue.

ken.fyten wrote:

sreynolds wrote:
I've been having a similar issue with the ICEfaces 4 beta and menuitems used with ace:breadcrumbMenu. I find that I can assign either a URL or an actionListener to a menuItem and it works as expected. But if I try to assign both, the actionListener is ignored. 

This is a distinctly separate issue from the one originating the thread. Please create a new thread for it.


Done. Thanks, Ken.
I've been having an issue with the ICEfaces 4 beta and menuitems used with ace:breadcrumbMenu. I find that I can assign either a URL or an actionListener to a menuItem and it works as expected. But if I try to assign both, the actionListener is ignored.

Some poking around suggests that this behavior is inherited from primeFaces, not something that ICEfaces created intentionally.

My intent in trying to use both the URL and the actionListener was to allow the breadcrumb handler to notify other components that navigation is happening. I think I have a valid workaround using setActionListener and setAction where the action method returns the URL to be navigated to. That just seemed a bit clumsy and it isn't clear to me why setUrl should cause the actionListener to be ignored. Perhaps I'm just going about this the wrong way and there is a better approach.
I've been having a similar issue with the ICEfaces 4 beta and menuitems used with ace:breadcrumbMenu. I find that I can assign either a URL or an actionListener to a menuItem and it works as expected. But if I try to assign both, the actionListener is ignored.
In ICE4, I'm trying to use a tree as a navigation mechanism. It mostly works -- click a node and appropriate associated content gets displayed.

The issue is that clicking on the selected node then deselects it. What I want is basically radio button type behavior so that there is always exactly one node selected. Any suggestions as to how best to do this with the tree widget?
Ran into an issue with ace:linkButton
When I set value="#{myBean.someInteger}"
I get an error complaining that the integer cannot be converted to a string.
ace:pushButton doesn't seem to have a problem rendering a numeric value as its text label, but linkButton does.
Workaround seems to be to stringify the value by setting into a variable with <c:set>, then reference the variable as the linkButton value.
I'm migrating a site from ICEfaces 1.8 to 4.0
Is there an obvious replacement for the old ice:panelStack component?
I've looked at the guide for converting 1.8 to 3, but it's pretty sketchy and doesn't seem to go into detail about specific components. Is there some place I can look for guidance on converting obsolete 1.8 components into whatever the appropriate replacement might be?

Edit: Playing around, looks like maybe the panelStack could be simulated by using ace:tabSet and hiding the tabs with CSS.
ICE-9859 addresses issues with row state (selection, etc.) across pages of a lazy loaded table. That's nice. However, as far as I can tell, it has nothing to do with sortBy and filterBy EL expressions not being evaluated.

Currently, when the LazyDataModel.load() method is called, it receives incorrect information. When an ace:column uses a dynamic expression such as filterBy="#{rowObject[colModelItem.propName]}", the load method receives the string "propName]" instead of the resolved name of the property. That makes it impossible to to use c:forEach to generate ace:column elements from a model and have the sorting or filtering work.

A number of people have tracked this down in the ICEfaces source code and verified that your code simply extracts the variable name from the EL expression and passes it to load() as-is rather than resolving it. We understand that you may have inherited this code from primefaces and just haven't gotten around to fixing it. The question here is: When do you plan to fix it? The built in sorting and filtering is a significant part of the appeal of the new ace:dataTable. Finding that those features simply do not work in combination with dynamic columns greatly reduces the attractiveness.
Is there any anticipated release in which the problems with expressions in dynamic column attributes will be resolved?
Presently, when the load method of the LazyDataModel is called, EL expressions used to specify sortBy and filterBy for dynamic columns are not properly resolved before being passed in. This makes it impossible to use sortBy or filterBy in combination with dynamic columns.

ICEfaces responses I've seen to other queries about this seem to suggest that the ICEfaces team does not view this as a significant problem. One response even stated that users should submit an "enhancement" request if the issue is important to them. I would have to say that this is not an enhancement situation. It is a bug and should be addressed as such without the need for users to beg for a fix.
I'm just starting to play with the ace dataTable and its lazy loading ability.
My table display comes up with the first page no problem. But as soon as I click in of the paginator controls, I get a popup "Server Internal Error To reconnect click the Reload button on the browser or click the button below", with no further details. My bean never sees a request to load anything other than the first page and there don't seem to be any logged messages relating to the error.

I imagine that I'm doing something wrong somewhere, but am at a loss as to how I can figure out what the actual problem is. My app runs in tomcat and I'm viewing with a Chrome browser. Does anyone have an idea where I can look for more information?

Ah, POP. For others who might encounter this...
Discovered a message in the javascript console.

[window] received error message [code: 200]: <?xml version='1.0' encoding='UTF-8'?>
<partial-response><error><error-name>class javax.el.PropertyNotWritableException</error-name><error-message><![CDATA[/foo/myDataTable.xhtml @128,22 rows="#{rows}": /foo/myPage.xhtml @90,68 rows="20": Illegal Syntax for Set Operation]]></error-message></error><changes><extension aceCallbackParam="validationFailed">{"validationFailed":false}</extension></changes></partial-response>

Changing the component on the page to use a fixed value rows="20" eliminates the error and paging works again. Not sure why exactly, but using an expression for the rows parameter seems to be a no-no.
Profile for sreynolds -> Messages posted by sreynolds [56] Go to Page: 1, 2, 3, 4 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team