[JBoss JIRA] Created: (RF-3722) rich:tree inside modalPanel produces Javascript error
by Juergen Zimmermann (JIRA)
rich:tree inside modalPanel produces Javascript error
-----------------------------------------------------
Key: RF-3722
URL: http://jira.jboss.com/jira/browse/RF-3722
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.1
Environment: JSF 1.2_09-BETA1, IE 7
Reporter: Juergen Zimmermann
Using rich:tree inside rich:modalPanel yields a Javascript error with IE 7. Using FF 3.0RC3 it works fine.
I'll attach the generated html code.
The tag hierarchy is as follows:
...
<h:column>
<rich:modalPanel id="detailModalPanel" width="400" height="300">
<f:facet name="header">
<h:outputFormat id="detailModalTitle" value="#{i18n['modalPanel.details.title']}">
<f:param id="detailModalTitleId" value="#{kunde.id}"/>
</h:outputFormat>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage id="closeDetailModalPanel" value="/images/close.png" style="cursor:pointer" alt="#{i18n['modalPanel.button.close']}"/>
<rich:componentControl for="detailModalPanel" attachTo="closeDetailModalPanel" operation="hide" event="onclick"/>
</h:panelGroup>
</f:facet>
<a4j:include viewId="/kundenverwaltung/modalPanel.details.xhtml" />
</rich:modalPanel>
<h:outputLink id="openDetailModalPanel" value="#">
<h:graphicImage id="detailModalIcon" url="/images/details.gif" alt="#{i18n['modalPanel.button.details']}"/>
<rich:componentControl for="detailModalPanel" attachTo="openDetailModalPanel" operation="show" event="onclick"/>
</h:outputLink>
</h:column>
The included modalPanel.details.xhtml looks as follows:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich">
<rich:panelBar>
<rich:panelBarItem>
<f:facet name="label">
<h:panelGroup>
<h:graphicImage value="/images/stammdaten.gif"/>
 
<h:outputText value="#{i18n['panelGridDetails.kunde.stammdaten']}" />
</h:panelGroup>
</f:facet>
<h:panelGrid id="ausgewaehlterKunde"
columns="2"
columnClasses="kundendetailsBezeichner, kundendetailsDaten">
<h:outputText value="#{i18n['panelGridDetails.kunde.id']}"/>
<h:outputText value="#{kunde.id}"/>
<h:outputText value="#{i18n['panelGridDetails.kunde.nachname']}"/>
<h:outputText value="#{kunde.nachname}"/>
<h:outputText value="#{i18n['panelGridDetails.kunde.vorname']}"/>
<h:outputText value="#{kunde.vorname}"/>
<h:outputText value="#{i18n['panelGridDetails.kunde.kategorie']}"/>
<h:outputText value="#{kunde.kategorie}"/>
<h:outputText value="#{i18n['panelGridDetails.kunde.umsatz']}"/>
<h:outputText value="#{kunde.umsatz}">
<f:convertNumber type="currency" currencyCode="EUR"/>
</h:outputText>
<h:outputText value="#{i18n['panelGridDetails.kunde.seit']}"/>
<h:outputText value="#{kunde.seit}"/>
<h:outputText value="#{i18n['panelGridDetails.kunde.email']}"/>
<h:outputText value="#{kunde.email}"/>
<h:outputText value="#{i18n['panelGridDetails.kunde.creditCard']}"
rendered="#{kunde.creditCard ne 'NONE'}"/>
<h:outputText value="#{kunde.creditCard}"
rendered="#{kunde.creditCard ne 'NONE'}"/>
<h:outputText value="#{i18n['panelGridDetails.kunde.creditCardId']}"
rendered="#{kunde.creditCard ne 'NONE'}"/>
<h:outputText value="#{kunde.creditCardId}"
rendered="#{kunde.creditCard ne 'NONE'}"/>
<h:outputText value="#{i18n['panelGridDetails.kunde.art']}"/>
<h:outputText value="#{kunde.art}"/>
<h:outputText value="#{i18n['panelGridDetails.kunde.rabatt']}"
rendered="#{kunde.art eq 'F'}"/>
<h:outputText value="#{kunde.rabatt}"
rendered="#{kunde.art eq 'F'}">
<f:convertNumber type="percent" minFractionDigits="1" maxFractionDigits="2"/>
</h:outputText>
</h:panelGrid>
</rich:panelBarItem>
<rich:panelBarItem rendered="#{not empty kunde.dateiname}">
<f:facet name="label">
<h:panelGroup>
<h:graphicImage value="/images/bild.gif"/>
 
<h:outputText value="#{i18n['panelGridDetails.kunde.bild']}" />
</h:panelGroup>
</f:facet>
<h:graphicImage id="bild"
url="#{initParam.hskaUploadDir}/#{kunde.dateiname}"
alt="#{i18n['panelGridDetails.kunde.bild.alt']}"/>
</rich:panelBarItem>
<rich:panelBarItem rendered="#{not empty kunde.bestellungen}">
<f:facet name="label">
<h:panelGroup>
<h:graphicImage value="/images/bestellungen.gif"/>
 
<h:outputText value="#{i18n['tabelle.kunde.bestellungen']}" />
</h:panelGroup>
</f:facet>
<h:form id="bestellungenForm">
<rich:tree id="bestellungenTree">
<f:facet name="icon">
 
</f:facet>
<f:facet name="iconLeaf">
 
</f:facet>
<rich:treeNodesAdaptor id="bestellungenAdapter"
nodes="#{kunde.bestellungen}"
var="best">
<rich:treeNode id="bestellungKnoten">
<h:outputText value="#{i18n['bestellung']} #{i18n['nr']} #{best.id}"/>
</rich:treeNode>
<rich:treeNodesAdaptor id="bestposAdapter"
nodes="#{best.bestellpositionen}"
var="bp">
<rich:treeNode id="bestposKnoten">
<h:outputText value="#{bp.anzahl} #{bp.artikel.bezeichnung}"/>
</rich:treeNode>
</rich:treeNodesAdaptor>
</rich:treeNodesAdaptor>
</rich:tree>
</h:form>
</rich:panelBarItem>
</rich:panelBar>
</html>
--
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
16 years, 11 months
[JBoss JIRA] Created: (RF-3513) toolTip: "disable" JS API doesn't work for this component.
by Mikhail Vitenkov (JIRA)
toolTip: "disable" JS API doesn't work for this component.
----------------------------------------------------------
Key: RF-3513
URL: http://jira.jboss.com/jira/browse/RF-3513
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.1
Environment: IE6.IE7,Firefox,Opera,Safari(3.2.1.CR5)
Reporter: Mikhail Vitenkov
Assigned To: Nick Belaevski
Step 1. Add toolTip inside any rich component:
<rich:panel style="width:50px; height:50px; background-color: gray">
<rich:toolTip id="tooltipID" value="#{tooltip.value}" ...>
<h:outputLink value="http://www.jboss.com/"><f:verbatim>Link</f:verbatim></h:outputLink>
</rich:toolTip>
</rich:panel>
Step 2. Add "show", "hide", "enable" & "disable" JS API functionality:
<a4j:commandLink onclick="$('formID:tooltipSubviewID:toolTipID').component.show(event)" value="show"></a4j:commandLink>
<a4j:commandLink onclick="$('formID:tooltipSubviewID:toolTipID').component.hide(event)" value="hide"></a4j:commandLink>
<a4j:commandLink onclick="$('formID:tooltipSubviewID:toolTipID').component.enable" value="enable"></a4j:commandLink>
<a4j:commandLink onclick="$('formID:tooltipSubviewID:toolTipID').component.disable" value="disable"></a4j:commandLink>
Step 3. Click on "show" ajax link - toolTip appears.
Step 4. Click on "disable" ajax link - toolTip disappear just after delay, defined in hideDelay attribute.
Step 5. Click on "show" link again.
Actual behavior:
toolTip appears any way - "disable" JS API doesn't work.
--
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
16 years, 11 months
[JBoss JIRA] Created: (RF-3674) Cannot prevent node selection in rich:tree via onselected
by Bjoern Eickvonder (JIRA)
Cannot prevent node selection in rich:tree via onselected
---------------------------------------------------------
Key: RF-3674
URL: http://jira.jboss.com/jira/browse/RF-3674
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.1
Reporter: Bjoern Eickvonder
Since RF 3.2.1 it is longer possible to prevent node selection by setting "onselected='return false;'".
To be more precise if a node A is selected and the user tries to select a node B whose onselected method returns false, node A is toggled, then node B and again node A (see tree.js and tree-item.js). So far it works, the problem is that the selectedTextClassNames of B are not reset, such that visually A and B seem to be selected afterwards.
Reason for this is that selectedTextClassNames are added to previousTextClassNames on selection but not removed from this string on deselect, such that if the user moves out from the node B appears to be selected as well.
This could be fixed quite simple by adjusting the deselect method in tree-item.js as follows:
deselect: function() {
var eText = this.elements.textElement;
if (this.selectedTextClassNames) {
var classNames = this.selectedTextClassNames.split(' ')
for (var i = 0; i < classNames.length; i++) {
Element.removeClassName(eText, classNames[i]);
}
if (this.previousTextClassNames && this.previousTextClassNames.indexOf(this.selectedTextClassNames)!=-1) {
this.previousTextClassNames = this.previousTextClassNames.substring(0,this.previousTextClassNames.indexOf(this.selectedTextClassNames));
}
}
},
--
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
16 years, 11 months
[JBoss JIRA] Created: (RF-3340) tree: javax.faces.FacesException: Exception while validating component
by Aleksej Yanul (JIRA)
tree: javax.faces.FacesException: Exception while validating component
----------------------------------------------------------------------
Key: RF-3340
URL: http://jira.jboss.com/jira/browse/RF-3340
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.1
Environment: myfaces 1.2.2
Reporter: Aleksej Yanul
Assigned To: Nick Belaevski
Priority: Critical
Is reproduced when in treeNode to add ajaxSingle = "true"
1. open tree
2. expand node
3. to move node
<rich:tree id="tree" switchType="#{bean.switchType}" value="#{bean.data}" var="data" selectedClass="#{style.selectedClass}" styleClass="#{style.styleClass}" style="#{style.style}" highlightedClass="#{style.highlightedClass}"
nodeFace="#{data.name != 'param-value' ? 'input' : 'text'}" changeExpandListener="#{bean.onExpand}"
nodeSelectListener="#{bean.onSelect}" binding="#{bean.tree}" onselected="window.status='selectedNode: '+event.selectedNode;"
onexpand="window.status='expandedNode: '+event.expandedNode" oncollapse="window.status='collapsedNode: '+ event.collapsedNode"
ajaxSubmitSelection="true" reRender="outputText, selectOneListbox" preserveModel="none" dragIndicator="treeIndicator"
immediate="false" acceptedTypes="file1" dragType="#{bean.dragOn ? 'file1' : ''}" icon="#{bean.icon}" dropListener="#{bean.processDrop}">
<rich:dndParam name="treeParam" value="Tree Parameter" />
<rich:dndParam name="accept" value="accept" />
<rich:treeNode type="input" dropListener="#{bean.processDrop}" ajaxSingle="true"
oncollapse="Element.removeClassName(event['treeItem'].getElement(), 'colored')"
onexpand="Element.addClassName(event['treeItem'].getElement(), 'colored')" >
<h:outputText value="#{data} : " />
<h:inputText value="#{data.name}" required="true" styleClass="inputs">
</h:inputText>
<rich:dndParam name="nodeParam" value="Node Parameter" />
</rich:treeNode>
<rich:treeNode type="text" nodeClass="customNode" acceptedTypes="file2" onselected="return false;">
<h:outputText value="#{data}" />
</rich:treeNode>
</rich:tree>
////////////////////////////////////////////////////////
javax.faces.FacesException: javax.faces.FacesException: Exception while validating component with path : {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /Tree/Tree.jsp][Class: javax.faces.component.html.HtmlForm,Id: j_id_jsp_1410692482_1][Class: org.richfaces.component.html.HtmlTree,Id: tree][Class: org.richfaces.component.html.HtmlTreeNode,Id: j_id_jsp_1410692482_7][Class: javax.faces.component.html.HtmlInputText,Id: j_id_jsp_1410692482_9]}
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:155)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:260)
at org.richfaces.component.UITree.invokeOnComponent(UITree.java:971)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:161)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:260)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:161)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:260)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:238)
at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:451)
at org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:148)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.FacesException: Exception while validating component with path : {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /Tree/Tree.jsp][Class: javax.faces.component.html.HtmlForm,Id: j_id_jsp_1410692482_1][Class: org.richfaces.component.html.HtmlTree,Id: tree][Class: org.richfaces.component.html.HtmlTreeNode,Id: j_id_jsp_1410692482_7][Class: javax.faces.component.html.HtmlInputText,Id: j_id_jsp_1410692482_9]}
at javax.faces.component.UIInput.validate(UIInput.java:346)
at javax.faces.component.UIInput.processValidators(UIInput.java:144)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:658)
at org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:435)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:152)
... 33 more
Caused by: org.apache.jasper.el.JspPropertyNotFoundException: /Tree/Tree.jsp(31,4) '#{data.name}' Target Unreachable, identifier 'data' resolved to null
at org.apache.jasper.el.JspValueExpression.getType(JspValueExpression.java:61)
at org.apache.myfaces.shared_impl.renderkit._SharedRendererUtils.findUIOutputConverter(_SharedRendererUtils.java:58)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.findUIOutputConverter(RendererUtils.java:391)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedUIOutputValue(RendererUtils.java:743)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.getConvertedValue(HtmlTextRendererBase.java:219)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:380)
at javax.faces.component.UIInput.validate(UIInput.java:328)
... 37 more
--
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
16 years, 11 months