[JBoss JIRA] (RF-12212) Accordion - Javascript error - "this.getTogglePanel() is undefined" with ui:repeat
by Jean ANDRE (JIRA)
Jean ANDRE created RF-12212:
-------------------------------
Summary: Accordion - Javascript error - "this.getTogglePanel() is undefined" with ui:repeat
Key: RF-12212
URL: https://issues.jboss.org/browse/RF-12212
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Environment: WAS/RAD - Firefox 12 - JSF 2.1.7 - commons-lang-2.4 - commons-logging-1.1.1 - cssparser-0.9.6 - guava-11.0.1 - hibernate-validator-4.2.0.Final - junit-4.10 - log4j-1.2.16 - org.springframework 3.0.6 - sac-1.3
Reporter: Jean ANDRE
Fix For: 4.2.1.Final, 4.2.0.Final
When we use accordion inside an ui:repeat we got a javascript exception - The accordion does not work at all.
Error is : togglePanelItem.js.jsf?ln=org.richfaces (ligne 43)
{code}
this.getTogglePanel() is undefined
[Stopper sur une erreur]
>>>>>>> this.getTogglePanel().getItems()[this.index] = this;
this.disabled = this.options.disabled || false;
this.index = options["index"];
this.getTogglePanel().getItems()[this.index] = this;
this.__addUserEventHandler("enter");
{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
11 years, 12 months
[JBoss JIRA] (RF-12160) rich:validator does not validate on the client side the @Pattern constraint
by Juraj Huska (JIRA)
Juraj Huska created RF-12160:
--------------------------------
Summary: rich:validator does not validate on the client side the @Pattern constraint
Key: RF-12160
URL: https://issues.jboss.org/browse/RF-12160
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-validators
Affects Versions: 4.2.1.Final
Environment: application: generated project from richfaces-kitchensink-archetype 4.2.1-SNAPSHOT
browser: Chrome, Firefox
Reporter: Juraj Huska
When trying to validate input which has annotation based constraint @Pattern, validation for this constraint is triggered only after the submitting of the form. The other constraints (@NotNull, @Size) are triggered as expected, after the BLUR event fired on that input.
The issue is noticeable on the project generated by the kitchensink archetype with RichFaces 4.2.1-SNAPSHOT libraries.
The facelet for the input validation with pattern annotation-based constraints looks like:
{code:xml}
<h:panelGrid columns="3" columnClasses="titleCell">
<h:outputLabel for="name" value="Name:"/>
<h:inputText id="name" value="#{cc.attrs.member.name}">
<rich:validator/>
</h:inputText>
<rich:message for="name" errorClass="invalid"/>
</h:panelGrid>
{code}
The model entity field which is validated in the above mentioned input:
{code}
@NotNull
@Size(min = 1, max = 25)
@Pattern(regexp = "[A-Za-z ]*", message = "must contain only letters and spaces")
private String name;
{code}
Note that I have tried to reproduce this issue on metamer and I was not successful.
--
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
11 years, 12 months
[JBoss JIRA] (RF-12254) kitchensink archetype - accessing wrong facelet is held in session and consequently accessing a correct one causes HTTP Status 500
by Juraj Huska (JIRA)
Juraj Huska created RF-12254:
--------------------------------
Summary: kitchensink archetype - accessing wrong facelet is held in session and consequently accessing a correct one causes HTTP Status 500
Key: RF-12254
URL: https://issues.jboss.org/browse/RF-12254
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: archetype, mobile
Affects Versions: 4.2.2.Final
Environment: project generated from kitchensink archetype
Reporter: Juraj Huska
Priority: Minor
When accessing wrong facelet on mobile device and consequently the right application context, then the HTTP Status 500 is returned with error message, which can be viewed in the attached screenshot.
It is caused because the {{PageBean}} hold the wrong part of the URL in the session,
{code}
public void setLocation(String location) {
this.location = location;
this.page = String.format("/mobile/%s.xhtml", location);
}
{code}
Note that I have tried to change the scope of the PageBean to RequestScoped, but then the list with members what not updated with the new created ones.
--
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
11 years, 12 months
[JBoss JIRA] (RF-12281) rich:tree is iterated multiple times when item is selected
by Alex Vb (JIRA)
Alex Vb created RF-12281:
----------------------------
Summary: rich:tree is iterated multiple times when item is selected
Key: RF-12281
URL: https://issues.jboss.org/browse/RF-12281
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-tree
Affects Versions: 4.2.2.Final
Reporter: Alex Vb
I have a decently sized tree and I'm using the selectionChangeListener in combination with toggleType="client" selectionType="ajax" render="node" to trigger a selection event on the server. The panelGroup "node" is re-rendered afterwards but it takes 1-2 seconds for each request. After enabling some debug logging I noticed that the entire tree is iterated 4 times for each request. Note a small test-tree exhibiting the same behavior:
2012-05-22 08:39:29.287 DEBUG CustomPhaseListener - Before phase: APPLY_REQUEST_VALUES 2
2012-05-22 08:39:29.287 DEBUG TreeNodeBase - getChildrenKeysIterator(0)
2012-05-22 08:39:29.287 DEBUG TreeNodeBase - getChild(1)
2012-05-22 08:39:29.287 DEBUG TreeNodeBase - getChildrenKeysIterator(1)
2012-05-22 08:39:29.287 DEBUG TreeNodeBase - getChild(2)
2012-05-22 08:39:29.287 DEBUG TreeNodeBase - getChild(2)
2012-05-22 08:39:29.287 DEBUG TreeNodeBase - getChild(2)
2012-05-22 08:39:29.287 DEBUG Bean - selectionChanged()
2012-05-22 08:39:29.287 DEBUG CustomPhaseListener - After phase: APPLY_REQUEST_VALUES 2
2012-05-22 08:39:29.287 DEBUG CustomPhaseListener - Before phase: PROCESS_VALIDATIONS 3
2012-05-22 08:39:29.287 DEBUG TreeNodeBase - getChildrenKeysIterator(0)
2012-05-22 08:39:29.287 DEBUG TreeNodeBase - getChild(1)
2012-05-22 08:39:29.287 DEBUG TreeNodeBase - getChildrenKeysIterator(1)
2012-05-22 08:39:29.287 DEBUG TreeNodeBase - getChild(2)
2012-05-22 08:39:29.302 DEBUG TreeNodeBase - getChild(2)
2012-05-22 08:39:29.302 DEBUG CustomPhaseListener - After phase: PROCESS_VALIDATIONS 3
2012-05-22 08:39:29.302 DEBUG CustomPhaseListener - Before phase: UPDATE_MODEL_VALUES 4
2012-05-22 08:39:29.302 DEBUG TreeNodeBase - getChildrenKeysIterator(0)
2012-05-22 08:39:29.302 DEBUG TreeNodeBase - getChild(1)
2012-05-22 08:39:29.302 DEBUG TreeNodeBase - getChildrenKeysIterator(1)
2012-05-22 08:39:29.302 DEBUG TreeNodeBase - getChild(2)
2012-05-22 08:39:29.302 DEBUG TreeNodeBase - getChild(2)
2012-05-22 08:39:29.302 DEBUG CustomPhaseListener - After phase: UPDATE_MODEL_VALUES 4
2012-05-22 08:39:29.302 DEBUG CustomPhaseListener - Before phase: INVOKE_APPLICATION 5
2012-05-22 08:39:29.302 DEBUG CustomPhaseListener - After phase: INVOKE_APPLICATION 5
2012-05-22 08:39:29.302 DEBUG CustomPhaseListener - Before phase: RENDER_RESPONSE 6
2012-05-22 08:39:29.302 DEBUG TreeNodeBase - getChild(2)
2012-05-22 08:39:29.318 DEBUG TreeNodeBase - getChildrenKeysIterator(0)
2012-05-22 08:39:29.318 DEBUG TreeNodeBase - getChild(1)
2012-05-22 08:39:29.318 DEBUG TreeNodeBase - getChildrenKeysIterator(1)
2012-05-22 08:39:29.318 DEBUG TreeNodeBase - getChild(2)
2012-05-22 08:39:29.318 DEBUG TreeNodeBase - getChild(2)
2012-05-22 08:39:29.318 DEBUG CustomPhaseListener - After phase: RENDER_RESPONSE 6
On the rather large tree each iteration takes 300-500 ms which explains the slow behavior. I have played around with every setting I could find, if selectionType is set to "client" the tree is iterated only once (during the render response phase) but the selection event does not seem to be triggered. If toggleType is set to ajax, only the "expanded" parts of the tree are iterated.
I have no idea why the iteration is necessary for all these phases but I "fixed" it in my implementation by recompiling the org.richfaces.component.TreeRange class with an updated method:
public boolean shouldIterateChildren() {
if (tree.isLeaf())
return false;
else {
char separatorChar = UINamingContainer.getSeparatorChar(FacesContext.getCurrentInstance());
String clientId = tree.getClientId();
boolean render = false;
for (String idToRender : FacesContext.getCurrentInstance().getPartialViewContext().getRenderIds()) {
// render the tree if you explicitly mention either the client id (e.g. "menuForm:tree") or the parent component client id (e.g. "menuForm")
// note that when clicking on an object in the tree, the following render target is requested: menuForm:tree@selection
if (clientId.equals(idToRender) || clientId.matches(idToRender + separatorChar + ".*")) {
render = true;
break;
}
}
// always render if it's not a postback
return render || !FacesContext.getCurrentInstance().isPostback();
}
}
--
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
11 years, 12 months