[JBoss JIRA] (RF-11365) onbeforedomupdate and oncomplete not working in Portlet environment
by Dipali Pandya (JIRA)
[ https://issues.jboss.org/browse/RF-11365?page=com.atlassian.jira.plugin.s... ]
Dipali Pandya commented on RF-11365:
------------------------------------
I added a fix in richfaces.js to have it accept any prefix in front of the ID, as outlined in the bug description. Seems to be okay so far. Is this fix going to be officially available in a build anytime soon?
> onbeforedomupdate and oncomplete not working in Portlet environment
> -------------------------------------------------------------------
>
> Key: RF-11365
> URL: https://issues.jboss.org/browse/RF-11365
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.0.0.Final
> Reporter: Detlef Pleiss
> Fix For: 5-Future
>
>
> example page:
> {code}
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich">
> <h:head/>
> <h:form>
> <h:panelGrid columns="2">
> <h:outputText value="Text:" />
> <h:inputText value="#{echoBean.text}" >
> <a4j:ajax event="keyup"
>
> onbeforesubmit="alert('beforesubmit')"
> onbegin="alert('begin')"
> onbeforedomupdate="alert('beforedomupdate')"
> oncomplete="alert('complete')"
>
> render="text,count" listener="#{echoBean.countListener}"/>
> </h:inputText>
> <h:outputText value="Echo:" />
> <h:outputText id="text" value="#{echoBean.text}" />
> <h:outputText value="Count:" />
> <h:outputText id="count" value="#{echoBean.count}" />
> </h:panelGrid>
> </h:form>
> </ui:composition>
> {code}
> The alerts for onbeforedomupdate and oncomplete do not appear in a portal environment; they do in a non-portal web environment.
> The Ajax XML response in a non portal web environment contains the tag <extension id="org.richfaces.extension"> with the Javascript code from the named attributes.
> But, in a portal environment the id gets prefixed like i.e. <extension id="A3331org.richfaces.extension">
> In fact Richfaces asks for this prefix in richfaces-core-api-4.0.0.Final-sources : org.richfaces.renderkit.util.CoreAjaxRendererUtils.java
> line 96 by calling facesContext.getExternalContext().encodeNamespace(EXTENSION_ID))
> In a Servlet environment this leaves EXTENSION_ID = "org.richfaces.extension" unchanged, but in a Portlet environment its function is to
> "Return the specified name, after prefixing it with a namespace that ensures that it will be unique within the context of a particular page" (quoted from Javadoc).
> Only, the Javascript meant to react on the extension tag is hardcoded to react on the ID "org.richfaces.extension" only without any prefix:
> META-INF/resources/richfaces.js line 333 :
> {code}
> var getExtensionResponseElement = function(responseXML) {
> return jQuery("partial-response extension#org\\.richfaces\\.extension", responseXML);
> };
> {code}
> So, in a Portlet environment the partial-response/extension is ignored due to the prefixed ID.
> A possible solution might be to have the Javascript accept any prefix in front of the ID, like:
> {code}
> var getExtensionResponseElement = function(responseXML) {
> return jQuery("partial-response extension[id$='org\\.richfaces\\.extension']", responseXML);
> };
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-11365) onbeforedomupdate and oncomplete not working in Portlet environment
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-11365?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-11365:
------------------------------------
[~dipalik] do you have a proposed fix in mind?
> onbeforedomupdate and oncomplete not working in Portlet environment
> -------------------------------------------------------------------
>
> Key: RF-11365
> URL: https://issues.jboss.org/browse/RF-11365
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.0.0.Final
> Reporter: Detlef Pleiss
> Fix For: 5-Future
>
>
> example page:
> {code}
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich">
> <h:head/>
> <h:form>
> <h:panelGrid columns="2">
> <h:outputText value="Text:" />
> <h:inputText value="#{echoBean.text}" >
> <a4j:ajax event="keyup"
>
> onbeforesubmit="alert('beforesubmit')"
> onbegin="alert('begin')"
> onbeforedomupdate="alert('beforedomupdate')"
> oncomplete="alert('complete')"
>
> render="text,count" listener="#{echoBean.countListener}"/>
> </h:inputText>
> <h:outputText value="Echo:" />
> <h:outputText id="text" value="#{echoBean.text}" />
> <h:outputText value="Count:" />
> <h:outputText id="count" value="#{echoBean.count}" />
> </h:panelGrid>
> </h:form>
> </ui:composition>
> {code}
> The alerts for onbeforedomupdate and oncomplete do not appear in a portal environment; they do in a non-portal web environment.
> The Ajax XML response in a non portal web environment contains the tag <extension id="org.richfaces.extension"> with the Javascript code from the named attributes.
> But, in a portal environment the id gets prefixed like i.e. <extension id="A3331org.richfaces.extension">
> In fact Richfaces asks for this prefix in richfaces-core-api-4.0.0.Final-sources : org.richfaces.renderkit.util.CoreAjaxRendererUtils.java
> line 96 by calling facesContext.getExternalContext().encodeNamespace(EXTENSION_ID))
> In a Servlet environment this leaves EXTENSION_ID = "org.richfaces.extension" unchanged, but in a Portlet environment its function is to
> "Return the specified name, after prefixing it with a namespace that ensures that it will be unique within the context of a particular page" (quoted from Javadoc).
> Only, the Javascript meant to react on the extension tag is hardcoded to react on the ID "org.richfaces.extension" only without any prefix:
> META-INF/resources/richfaces.js line 333 :
> {code}
> var getExtensionResponseElement = function(responseXML) {
> return jQuery("partial-response extension#org\\.richfaces\\.extension", responseXML);
> };
> {code}
> So, in a Portlet environment the partial-response/extension is ignored due to the prefixed ID.
> A possible solution might be to have the Javascript accept any prefix in front of the ID, like:
> {code}
> var getExtensionResponseElement = function(responseXML) {
> return jQuery("partial-response extension[id$='org\\.richfaces\\.extension']", responseXML);
> };
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13278) rich:tab : label, placed in header-facet, can not be refreshed per ajax
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13278?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13278:
-------------------------------
Fix Version/s: 4.3.5
> rich:tab : label, placed in header-facet, can not be refreshed per ajax
> -----------------------------------------------------------------------
>
> Key: RF-13278
> URL: https://issues.jboss.org/browse/RF-13278
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-panels-layout-themes
> Affects Versions: 4.3.4
> Environment: java 7,
> tomcat 7, JBoss AS,
> mojarra, myfaces
> chrome, firefox
> Reporter: Alexey Shakov
> Labels: regression
> Fix For: 4.3.5
>
>
> I use ajax to update the header label of rich:tab. That is why label is placed in a header-facet. Since RF 4.3.4 this does not work:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
> xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j"
> xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en">
> <h:head>
> </h:head>
> <h:body>
>
> <a4j:log hotkey="M" mode="popup" />
> <h:form id="form" prependId="false">
> <rich:tabPanel id="tabPanel">
> <rich:tab header="tab 1">
> <a4j:commandLink value="click me" action="#{testBean.put('clicks',testBean.clicks + 1)}" render="label" execute="@this" />
> </rich:tab>
> <rich:tab>
> <f:facet name="header">
> <h:outputText id="label" value="#{testBean.clicks} clicks" />
> </f:facet>
> </rich:tab>
> </rich:tabPanel>
> </h:form>
> </h:body>
> </html>
> {code}
> testBean is a simple session-scoped HashMap.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13278) rich:tab : label, placed in header-facet, can not be refreshed per ajax
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13278?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13278:
-------------------------------
Labels: regression (was: )
> rich:tab : label, placed in header-facet, can not be refreshed per ajax
> -----------------------------------------------------------------------
>
> Key: RF-13278
> URL: https://issues.jboss.org/browse/RF-13278
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-panels-layout-themes
> Affects Versions: 4.3.4
> Environment: java 7,
> tomcat 7, JBoss AS,
> mojarra, myfaces
> chrome, firefox
> Reporter: Alexey Shakov
> Labels: regression
>
> I use ajax to update the header label of rich:tab. That is why label is placed in a header-facet. Since RF 4.3.4 this does not work:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
> xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j"
> xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en">
> <h:head>
> </h:head>
> <h:body>
>
> <a4j:log hotkey="M" mode="popup" />
> <h:form id="form" prependId="false">
> <rich:tabPanel id="tabPanel">
> <rich:tab header="tab 1">
> <a4j:commandLink value="click me" action="#{testBean.put('clicks',testBean.clicks + 1)}" render="label" execute="@this" />
> </rich:tab>
> <rich:tab>
> <f:facet name="header">
> <h:outputText id="label" value="#{testBean.clicks} clicks" />
> </f:facet>
> </rich:tab>
> </rich:tabPanel>
> </h:form>
> </h:body>
> </html>
> {code}
> testBean is a simple session-scoped HashMap.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13293) accordion: JS API: bugs of function switchTo()
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13293?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13293:
-------------------------------
Fix Version/s: 4.5-Tracking
> accordion: JS API: bugs of function switchTo()
> ----------------------------------------------
>
> Key: RF-13293
> URL: https://issues.jboss.org/browse/RF-13293
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-output
> Affects Versions: 4.3.4, 5.0.0.Alpha1
> Reporter: Jiří Štefek
> Fix For: 4.5-Tracking
>
>
> Bug #1 -- @cycledSwitching
> Cannot switch to next item, when there is a disabled item in the way when @cycledSwitching=false.
> E.g.:When you use function _switchTo(nextItem())_
> * it switches to next item, but
> ** if you use @cycledSwitching=false, then it cannot switch to an item after a disabled item.
> ** if you use @cycledSwitching=true, then it switches to next available item after a disabled item (plus it can cycle through items from beginning).
> ----
> Bug #2 -- result of function _switchTo()_ can be used without params
> Function _switchTo_ can be used without parameters and this behaviour is undocumented. When you use it without parameters (or null) it simply switches to next item.
> The catch: When you use _switchTo(previousItem())_ , you use @cycledSwitching=false and you have first item active, then it switches to next item instead of doing nothing (the _previousItem()_ returns null).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13294) Broken caching of static resources in IE
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13294?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13294:
-------------------------------
Fix Version/s: 3.Future
> Broken caching of static resources in IE
> ----------------------------------------
>
> Key: RF-13294
> URL: https://issues.jboss.org/browse/RF-13294
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.3.3.Final
> Reporter: Nicholas Oxhøj
> Fix For: 3.Future
>
>
> There seems to be a problem with the caching headers sent by RichFaces in relation to IE (IE8 at least which is the one I have tested).
> The default for RichFaces, is to tell the browser to cache static resources for 24 hours:
> {code}
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Cache-control: max-age=86400
> Last-Modified: Tue, 29 Oct 2013 13:01:56 GMT
> Expires: Wed, 30 Oct 2013 13:02:39 GMT
> Content-Type: text/javascript
> Content-Length: 117992
> Date: Tue, 29 Oct 2013 13:02:39 GMT
> {code}
> But it seems that when IE, after 24 hours, validates the file with a "If-Modified-Since" and receives a "304 Not Modified" response
> {code}
> HTTP/1.1 304 Not Modified
> Server: Apache-Coyote/1.1
> Date: Tue, 29 Oct 2013 13:07:56 GMT
> {code}
> it will *keep* re-validating the file on all subsequent pages/uses, whereas e.g. FireFox _seems_ to reapply the "max-age" of 24 hours, that it was told on the initial GET of the file.
> I haven't been able to find any specifications, blog posts or anything else related to how the browser should react _after_ having received a "304 Not Modified" response.
> But it seems that if you add a "Cache-control: max-age=..." header to the "304 Not Modified" response in InternetResourceService#serviceResource(), IE will not re-validate the file until that max-age has expired.
> {code}
> HTTP/1.1 304 Not Modified
> Server: Apache-Coyote/1.1
> Cache-control: max-age=86400
> Date: Tue, 29 Oct 2013 13:07:56 GMT
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13294) Broken caching of static resources in IE
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13294?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-13294:
------------------------------------
Thanks for sharing your findings!
> Broken caching of static resources in IE
> ----------------------------------------
>
> Key: RF-13294
> URL: https://issues.jboss.org/browse/RF-13294
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.3.3.Final
> Reporter: Nicholas Oxhøj
> Fix For: 3.Future
>
>
> There seems to be a problem with the caching headers sent by RichFaces in relation to IE (IE8 at least which is the one I have tested).
> The default for RichFaces, is to tell the browser to cache static resources for 24 hours:
> {code}
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Cache-control: max-age=86400
> Last-Modified: Tue, 29 Oct 2013 13:01:56 GMT
> Expires: Wed, 30 Oct 2013 13:02:39 GMT
> Content-Type: text/javascript
> Content-Length: 117992
> Date: Tue, 29 Oct 2013 13:02:39 GMT
> {code}
> But it seems that when IE, after 24 hours, validates the file with a "If-Modified-Since" and receives a "304 Not Modified" response
> {code}
> HTTP/1.1 304 Not Modified
> Server: Apache-Coyote/1.1
> Date: Tue, 29 Oct 2013 13:07:56 GMT
> {code}
> it will *keep* re-validating the file on all subsequent pages/uses, whereas e.g. FireFox _seems_ to reapply the "max-age" of 24 hours, that it was told on the initial GET of the file.
> I haven't been able to find any specifications, blog posts or anything else related to how the browser should react _after_ having received a "304 Not Modified" response.
> But it seems that if you add a "Cache-control: max-age=..." header to the "304 Not Modified" response in InternetResourceService#serviceResource(), IE will not re-validate the file until that max-age has expired.
> {code}
> HTTP/1.1 304 Not Modified
> Server: Apache-Coyote/1.1
> Cache-control: max-age=86400
> Date: Tue, 29 Oct 2013 13:07:56 GMT
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13301) Favor use of Page Fragments in Framework Tests
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13301?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-13301:
------------------------------------
Let's attempt this in 5.0.0.Alpha2 as the QA cycle complete. We'll bump it if time does not permit us to complete this task. I'm keen on doing it early as a an additional means of vetting the page fragments we will ship in 5.0.0.Alpha2.
> Favor use of Page Fragments in Framework Tests
> ----------------------------------------------
>
> Key: RF-13301
> URL: https://issues.jboss.org/browse/RF-13301
> Project: RichFaces
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: tests - functional
> Affects Versions: 5.0.0.Alpha2
> Reporter: Lukáš Fryč
> Fix For: 5.0.0.Alpha2
>
>
> Since we have introduced Page Fragments in Alpha2, we could favor their usage in fragment tests.
> We could start to refactor tests for components rewritten in Alpha2 and continue as we rewrite other components.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months