[JBoss JIRA] (RF-12020) Reduce number of absolute opened files
by Marek Novotny (JIRA)
Marek Novotny created RF-12020:
----------------------------------
Summary: Reduce number of absolute opened files
Key: RF-12020
URL: https://issues.jboss.org/browse/RF-12020
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: cdk
Affects Versions: 4.2.0.Final
Environment: linux
Reporter: Marek Novotny
While RF Components is compiled, it normally over goes under limit for maximum open files.
I did some change which helped a little, but there will be probably bigger effect if the logic is re-factored to not open all files at the same time in generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassGenerator.java of render method.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (RF-12053) Picklist : valueChangeListener does not work when user moves items between left and right sides
by Andrew Cheung (JIRA)
Andrew Cheung created RF-12053:
----------------------------------
Summary: Picklist : valueChangeListener does not work when user moves items between left and right sides
Key: RF-12053
URL: https://issues.jboss.org/browse/RF-12053
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-selects
Affects Versions: 3.3.3.Final
Environment: RichFaces 3.3.3Final
JBOSS EPP5.1.1
browsers : Firefox 10.0.2 and IE8
Reporter: Andrew Cheung
The valueChangeListener for picklist does not fire when a user moves items between the left and right hand sides of the picklist.
Code as follows:
index.xhtml:
<a4j:form id="ModifyUserForm">
<rich:pickList id="pkAuxOffices" sourceListWidth="377px" targetListWidth="377px" showButtonsLabel="false" copyAllVisible="false" removeAllVisible="false" value="#{myBean.selectedAuxOffices}" converter="sibcvtr" valueChangeListener="markAuxOfficesModified" >
<f:selectItems value="#{myBean.auxOffices}"/>
</rich:pickList>
<h:commandButton styleClass="btn-go" id="btnSubmit" action="#{myBean.modifyUser}" value="Go" />
</a4j:form>
-----------------
In the bean (myBean.java):
private List<SIBean> selectedAuxOffices = null; //for picklist right hand side
private ArrayList<SelectItem> auxOffices = null;
public List<SIBean> getSelectedAuxOffices() {
return selectedAuxOffices;
}
public void setSelectedAuxOffices(List<SIBean> selectedAuxOffices) {
this.selectedAuxOffices = selectedAuxOffices;
}
public ArrayList<SelectItem> getAuxOffices() {
return auxOffices;
}
public void setAuxOffices(ArrayList<SelectItem> auxOffices) {
this.auxOffices = auxOffices;
}
public UA() throws java.lang.Exception {
initializeMyBean();
}
private void initializeMyBean() throws java.lang.Exception {
....
auxOffices = demo.createSIList(...); //retrieves the list of available offices from the database
//get selected attribute values on the right side of the picklist
List<SIBean> userSelectedAuxOffices = createSIBeanList(...); //retrieves the list of selected offices from the database
if (selectedAuxOffices == null) {
selectedAuxOffices = new ArrayList<SIBean>();
}
if (auxOffices == null) {
auxOffices = new ArrayList<SelectItem>();
}
selectedAuxOffices = userSelectedAuxOffices;
}
public void markOfficesModified(ValueChangeEvent event) {
ArrayList<SIBean> auxOfficesBeanChanged = (ArrayList<SIBean>)event.getNewValue();
String[] auxOfficesChanged = new String[auxOfficesBeanChanged.size()];
int i = 0;
for (SIBean sib : auxOfficesBeanChanged) {
auxOfficesChanged[i] = sib.getValue();
_Logger.error("DEBUGXXX : auxOfficesChanged = " + auxOfficesChanged[i]);
i++;
}
}
-------------------
Code in SIBean.java :
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.log4j.Logger;
public class SIBean {
private String label;
private String value;
public SIBean(String newlabel, String newvalue){
label = newlabel;
value = newvalue;
}
public SIBean(){
label = "";
value = "";
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public boolean equals(Object obj) {
if (obj == null)
return false;
if (obj == this)
return true;
if (obj.getClass() != getClass())
return false;
SIBean rib = (SIBean) obj;
return new EqualsBuilder().
append(value, rib.value).
isEquals();
}
}
--------------
Code in converter :
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import org.apache.log4j.Logger;
import demo.SIBean;
public class SIBeanConverter implements Converter {
@Override
public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) {
// TODO Auto-generated method stub
int index = arg2.indexOf(':');
if (index == -1) {
return new SIBean(arg2,arg2); //workaround for index out of range issue (arg2 should contain "label:value"; but sometimes it only contain "value" due to the bug reported in JIRA)
}
else {
return new SIBean(arg2.substring(0, index), arg2.substring(index + 1));
}
}
@Override
public String getAsString(FacesContext arg0, UIComponent arg1, Object arg2) {
// TODO Auto-generated method stub
if (arg2 instanceof SIBean) {
return ((SIBean)arg2).getLabel() + ":" + ((SIBean)arg2).getValue();
}
else {
return arg2.toString();
}
}
}
----------------------
faces-config.xml :
<converter>
<converter-id>sibcvtr</converter-id>
<converter-class>demo.SIBeanConverter</converter-class>
</converter>
<managed-bean>
<description>myBean</description>
<managed-bean-name>myBean</managed-bean-name>
<managed-bean-class>demo.myBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
-------------------------
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] Created: (RF-5765) ExtendedDataTable: Drag and Drop for columns does not work if column id contain '-' symbol.
by Andrei Markavtsov (JIRA)
ExtendedDataTable: Drag and Drop for columns does not work if column id contain '-' symbol.
-------------------------------------------------------------------------------------------
Key: RF-5765
URL: https://jira.jboss.org/jira/browse/RF-5765
Project: RichFaces
Issue Type: Bug
Environment: RF 3.3.0
Reporter: Andrei Markavtsov
Assignee: Nick Belaevski
<h:form id="form">
<rich:extendedDataTable value="#{test3.rows}" var="row" tableState="#{test3.tableState}">
<rich:columns
sortBy="#{row[ind]}"
sortOrder="#{column.ordering}"
filterBy="#{row[ind]}"
filterValue="#{column.filterValue}"
id="column-#{column.name}"
value="#{test3.columns}"
label="#{column.name}"
var="column"
index="ind">
<f:facet name="header">
<h:outputText value="#{column.name}" />
</f:facet>
<h:outputText value="#{row[ind]}" />
</rich:columns>
</rich:extendedDataTable>
</h:form>
Erroneus code: AbstractExtendedTableRenderer.doDecode(1239).
--
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
12 years, 8 months
[JBoss JIRA] (RF-11978) Graph Validator - does not mark context to fail validation
by Lukáš Fryč (JIRA)
Lukáš Fryč created RF-11978:
-------------------------------
Summary: Graph Validator - does not mark context to fail validation
Key: RF-11978
URL: https://issues.jboss.org/browse/RF-11978
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Lukáš Fryč
GraphValidator is using BeanValidator to check that instance does not failed [1],
and it calls [{{facesContext.renderResponse()}}|http://docs.oracle.com/javaee/6/api/javax/faces/context/FacesContext.html#renderResponse()] when beanValidation returns some message.
However it does not call [{{facesContext.validationFailed()}}|http://docs.oracle.com/javaee/6/api/javax/faces/context/FacesContext.html#isValidationFailed()].
[1] https://github.com/richfaces/components/blob/develop/validator/ui/src/mai...
----
This causes problem when another component reads the [{{FacesContext.isValidationFailed()}}|http://docs.oracle.com/javaee/6/api/javax/faces/context/FacesContext.html#isValidationFailed()] flag in order to distinguish is it should proceed or not, like in following snippet.
----
Following snippet is part of the wizard using togglePanel and toggleControl in order to switch panels.
When user hits Continue button, togglePanel is switched regardless the graphValidator validation failed or not - when validation for another component like {{h:inputText}} fails, toggleControl does not switch.
{code:XML}
...
<rich:togglePanelItem>
<!-- Step 3: password -->
<rich:graphValidator id="passwordsValidation" value="#{passwordBean}">
<rich:messages for="passwordsValidation" />
<h:panelGrid columns="3">
<h:outputLabel for="password" value="Password" />
<h:inputSecret id="password" value="#{passwordBean.password}" />
<rich:message for="password" />
<h:outputLabel for="passwordConfirmation" value="Confirmation" />
<h:inputSecret id="passwordConfirmation" value="#{passwordBean.passwordConfirmation}" />
<rich:message for="passwordConfirmation" />
</h:panelGrid>
<a4j:commandButton value="Back">
<rich:toggleControl event="click" targetItem="@prev" />
</a4j:commandButton>
<a4j:commandButton value="Continue">
<rich:toggleControl event="click" targetItem="@next" />
</a4j:commandButton>
</rich:graphValidator>
</rich:togglePanelItem>
...
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months