Richard's Tech Blog

Monday, 19 March 2012

RichFaces 4 rich:inputNumberSpinner Width

Trying to set the width of the rich:inputNumberSpinner control doesn't work with the 'width=' parameter, and using 'style="width: 24px"' produces odd results.

Setting up a style class - e.g. '.small {width: 18px;}' and then using it as follows does produce the correct result:

<rich:inputNumberSpinner inputClass="small"/>

Wednesday, 12 May 2010

RichFaces rich:picklist Backing Bean Value

Using the value parameter (e.g. value="#{SessionBean1.ASelect}) can be very confusing if you want the value of the backing bean to be updated correctly. I tried extensively to get it working properly with an ArrayList backing bean, but it just doesn't seem to work properly as far as I can see. On the other hand using a simple Object or String array does. Something like the following is fine:

    private String[] aSelect = {};
    public String[] getASelect() {return aSelect;}
    public void setASelect(String[] aSelect) {this.aSelect = aSelect;}

Thursday, 10 September 2009

No response to rich:datascroller in rich:datatable

Sometimes the rich:datascroller doesn't seem to work correctly, particularly when also using filtering and/or sorting. The underlying view seems to be updated correctly, but the table is not re-rendered.

I've found that it can be kicked back into life using a4j:support:

<f:facet name="footer">
 <rich:datascroller renderIfSinglePage="false">
  <a4j:support event="oncomplete" reRender="dtUsers"/>
 </rich:datascroller>
</f:facet>


Where dtUsers is my table id.

Problems can also occur if the data source object has too short a persistence, the source should have Session scope.

About Me

My photo
Blog to record technical tips regarding web application development using JSF, NetBeans, MySQL and RichFaces.

Search This Blog