Does RichFaces 4.0 contain notifyMessages? - jsf

I am following this link to learn about richfaces: http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=notify&sample=notifyMessages&skin=blueSky
But the problem is, when i try rich:notify or rich:notifyMessages, i get an error saying that "The component library http://richfaces.org/rich does not contain component notifyMessages". Can anyone tell me why? I can use other components of richfaces but there is no notify component here.
Thanks

rich:notify* components where introduce in RichFaces 4.1.
Refer to docs:
http://docs.jboss.org/richfaces/latest_4_0_X/Component_Reference/en-US/html/ (rich:notify is not listed)
http://docs.jboss.org/richfaces/latest_4_1_X/Component_Reference/en-US/html/ (rich:notify is there)

Related

JSF 2.2 displayValueOnly

Is there a possibility to use the option "displayValueOnly" (https://wiki.apache.org/myfaces/DisplayValueOnly) with JSF 2.2?
I think the link above is explaining the feature of Tomahawk which exists only for older JSF versions, right?
Is there a alternative for creating a read and edit mode without creating two elements and without using "readOnly" or "disabled"?
Thank you!
Tomahawk is not compatible with JSF 2.2 - I've tried a few components and they work fine for others you've to work on the Tomahawk source.

Using binding attribute causes javax.faces.FacesException: Cannot find component with identifier

I have a problem I can't quite get a handle on.
First the context: I am developing a web application using Primefaces 3.5 (yes, unfortunately I am stuck with this old version for now), running on JBoss 7.
There is a form with id "form" encompassing all following xhtml code.
I have a component in my view which is provided by usage of the binding attribute:
<p:dashboard id="dashboard" binding="#{myBackingBean.dashboard}" />
Then sometimes I would like to perform an ajax update on this component, this is done by using the RemoteCommand component of primefaces:
<p:remoteCommand
actionListener="#{myBackingBean.someActionListener()}"
process="#this" id="myRmtCmd" oncomplete="myJsFunction();"
update=":form:dashboard" name="myRemoteCommand" />
The RemoteCommand is triggered by a clicking on a Link:
Some Text
This works pretty well so far. However after deploying this code to production I sometimes get a FacesException:
javax.faces.FacesException: Cannot find component with identifier ":form:dashboard"
referenced from "form:myRmtCmd".
This is where my problem lies because I cannot reliably reproduce this exception. My question is this: What could lead to this exception being thrown? It seems to work 95 % of the time but being the perfectionist I am (and many of you reading this are as well, I'm sure ;) ) I would like this code to work 100 % of the time. What am I missing?
Before answering please consider these constraints:
yes, i have to use the binding attribute for providing the dashboard as I need a great deal of control over what gets added to the component
to avoid using IDs I also tried updating the dashboard by its css class via one of primefaces' advanced selectors: #(.ui-dashboard) - this also does not work!
yes, it would be possible to use a commandbutton/link instead of wiring up the remotecommand component to a simple html link but in this case the link is rendered by a JSF renderer component and I made some bad experiences with dynamically adding buttons etc (due to JSF Spec Issue 790)
Cheers,
p.s.
I also had this weird behavior.
There are probably more than one component bindded to #{myBackingBean.dashboard}, so the first one sets the id and there will be no one called "dashboard".

Omnifaces: Using CombinedResourceHandler with Richfaces

when using CombinedResourceHandler in a Richfaces application only stylesheets and user defiend scripts are combined. The standard JavaScript resource and all Richfaces specific resources remain as seperated resources.
The Omnifaces documentation states:
RichFaces has the same problem with several JS files, but this is so far not exactly trivial to workaround
So my question is what this 'non-trivial workaround' would be?
As far as I can see, CombinedResourceHandler wont handle resources when getRendererType() returns org.richfaces.renderkit.ResourceLibraryRenderer. These are then handled by org.richfaces.renderkit.html.ResourceLibraryRenderer.
I am not sure what would be the best way to combine RichFaces behaviour with OmniFaces here.
I was able to create a solution by modifying OmniFaces CombinedResourceHandler.
Details in short:
Richfaces utilizes a concept called ResourceLibrarys wich means a resource may not only be a single file but instead a collection of those files. For example, RichFaces uses a resource named base-component.reslib. RichFaces ResourceHandler interpretes this resource dependency as dependency to
javax.faces:jsf.js
jquery.js
richfaces.js
richfaces-base-component.js
So the CombinedResourceHandler needed some extra functionality to seperate dependencies to ordinary Resources from Richfaces ResourceLibraries. The latter needed to be resolved according to specifications obtained from RichFaces sources.
It was not trivial to work this around without modifying the CombinedResourceHandler itself. The CombinedResourceHandler itself has really to be modified to use a reflection hack which extracts the resources from RichFaces' org.richfaces.resource.ResourceLibraryFactoryImpl. The reflection hack is necessary in order to keep OmniFaces free of RichFaces dependencies so that it can be used together with other component libraries like PrimeFaces.
As per issue 107, this was implemented in 1.3-20121206.

<f:setPropertyActionListener> Parent is not of type ActionSource

I got this error when I upgraded from primefaces 3.0.M3 to 3.0.M4-SNAPSHOT
#60,114 Parent is not of type ActionSource, type is: javax.faces.component.html.HtmlForm#1d9c3e7
I understand that it is happening in other libraries like icefaces too, but I couldn't figure out how to fix it. Any help is appreciated.
The PrimeFaces tags/components are not been parsed at all and thus treated as plain HTML which caused that the real closest parent JSF component is a <h:form>.
This can have at least 2 causes:
You didn't update the taglib namespace URI from http://primefaces.prime.com.tr/ui to the new namespace http://primefaces.org/ui which was introduced in M4.
The PrimeFaces 3.0 M4 JAR file isn't in the webapp's runtime classpath. Verify if this is done right. This is to be achieved by dropping the JAR in /WEB-INF/lib, or if it's been dropped elsewhere, by including it in Deployment Assembly list in project's properties (assuming that you're using Eclipse).

Java - RichFaces - RTL

I'm looking for Java "Faces" that supports RTL (Right To Left) user interfaces. The only library that I've checked so far is RichFaces. It seems that it doesn't support it natively.
What is a good resource that talks about this issue?
What other "Faces" can be recommend that natively support RTL user interfaces?
RichFaces components support the dir attribute.
The JSF standard components already do it since ages. They just supports all of the HTML attribues, including the dir attribute, which you can set to "rtl". I would be surprised if any of the 3rd party component libraries didn't inherit it.
In richfaces, it does support dir="rtl" in all components, yep it does not say you can not set the attribute dir but when you put it on, it will not display correct. To do so, in richfaces you need override its style, replacing left with right and right with left, i have checked it for simple components but for others like tree, like menu it would not be easy as i say. I have no idea what other components would support that.
btw i speak for 3.1.5. GA.
I didn't used it on my own, but was just googling about it and wikipedia states it might be candidate:
http://myfaces.apache.org/trinidad/

Resources