[JBoss JIRA] Created: (RF-4119) CDK's generates a table of InternetResources in component's renderer incorectly
by Piotr Kawiak (JIRA)
CDK's generates a table of InternetResources in component's renderer incorectly
-------------------------------------------------------------------------------
Key: RF-4119
URL: https://jira.jboss.org/jira/browse/RF-4119
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.2
Reporter: Piotr Kawiak
Priority: Trivial
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
here goes another script
and another one ...
</h:scripts>
that code, placed in .jspx template is used by cdk-plugin to generate component's renderer,
unfortunately, it won't work if developers use spaces instead of tabs for indentation.
The cause of that behaviour can be found in:
rg.ajax4jsf.templatecompiler.elements.vcp.HeaderResourceElement
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
String path;
if (token.startsWith(NEW)) {
keyz.add(token);
int idx = token.indexOf('(');
if (idx != -1) {
path = token.substring(0, idx).substring(NEW.length()).trim();
} else {
path = token.substring(NEW.length()).trim();
}
} else {
keyz.add("getResource(\"" + token + "\")");
path = token;
}
paths.add(path);
}
the token is simply not trimmed, and so the generated output looks like that:
getResource(" new org.ajax4jsf.javascript.PrototypeScript()")
which is incorrect. I would suggest putting following code right after calling tokenizer.nextToken():
token = trim.token();
that will solve the problem. I can commit that change to the trunk if needed.
--
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, 9 months
[JBoss JIRA] Created: (RF-3899) Tree component doesn´t work with adviseNodeOpened, immediate="true" and switchType="ajax" or switchType="server"
by Mauricio Noda (JIRA)
Tree component doesn´t work with adviseNodeOpened, immediate="true" and switchType="ajax" or switchType="server"
----------------------------------------------------------------------------------------------------------------
Key: RF-3899
URL: http://jira.jboss.com/jira/browse/RF-3899
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.1
Environment: BEA Weblogic 9.2
Sun Facelets 1.1.14
Microsoft Internet Explorer 6.0.2900.2180 and Mozilla Firefox 2.0.0.15.
Reporter: Mauricio Noda
Tree component renders the tree incorrectly when adviseNodeOpened returns false in an initial request, but returns true in a subsequent request. The tree node expand icon shows as expanded, but the node children are not rendered.
Only happens when using immediate="true" and switchType set as "ajax" or "server". Works fine in client mode or when immediate is set to false.
Works but triggers unwanted validation errors when expanding/collapsing nodes:
<rich:tree adviseNodeOpened="#{bean.adviseNodeOpened}" changeExpandListener="#{bean.changeExpandListener}">
<!-- tree content -->
</rich:tree>
Works but is too slow with large trees:
<rich:tree immediate="true" switchType="client" adviseNodeOpened="#{bean.adviseNodeOpened}" changeExpandListener="#{bean.changeExpandListener}">
<!-- tree content -->
</rich:tree>
Initial request works, but subsequent requests doesn´t if adviseNodeOpened return changes:
<rich:tree immediate="true" adviseNodeOpened="#{bean.adviseNodeOpened}" changeExpandListener="#{bean.changeExpandListener}">
<!-- tree content -->
</rich:tree>
After some bugtracking, I found this:
Richfaces 3.2.1, inside org.richfaces.component.state.TreeState class, line 156, "return expandedNodes.contains(rowKey);" is ignoring expanded nodes queued in line 72 "queuedExpandedNodes.add(nextKey);" since it runs before line 278 "expandedNodes.addAll(queuedExpandedNodes);".
--
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, 9 months