richfaces

Error with JSF2 and RichFaces

Hi, I'm trying to use RichFaces on a working JSF2 application. I incorporated the RichFaces jars, changed the web.xml but got the following error: 17:49:13,097 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] Error Rendering View[/login.xhtml]: java.lang.NullPointerExcept ion at com.sun.faces.application.Applicat...

Reference the oncomplete event by an external java script function

Hi , I want to do some logic at the oncomplete attribute of the a4j:commandButton ,but my logic is too complicated , can I reference the code using a java script functions located in a external java-script file to have a better maintenance ? I found it has error because the JavaScript file cannot understand the EL expression . For exa...

Accessing selected node of richfaces tree from Javascript

Hello This should be a very simple question. I have a richfaces tree that is rendered using JSF. When the user clicks on a node I want a javascript function to run. Nothing more nothing less. No redirects, no re-submit, no-rerender, no Ajax. Just plain old Javascript. I have seen the onselected attribute of the tree and it indeed fires...

Assign a unique client ID to each <rich:dataTable /> row?

I'm relatively new to working with the UI in Seam, so I'm hoping there is something simple I can replace the three instances of UNIQUE_ID with in the following example. The goal is to have a <rich:dataTable /> wherein each row has the ability to show/hide a <rich:modalPanel /> with more details about the particular object instance. <ri...

Printing the contents of a <rich:modalPanel />?

Attempting to print the contents of a <rich:modalPanel /> in my application results in a complete mess on the printed page. The complete HTML underlying the <rich:modalPanel /> appears on the printed page, but completely faded out (as it sort of appears on screen). And somewhere on that page, is the <rich:modalPanel /> content itself - ...

Can my Facelets converter depend on a `ui:repeat` loop var?

The following doesn't work as I'd hoped: <ul> <ui:repeat var="i" value="#{fn:split('1,2,3,4', ',')}"> <li> <h:outputText value="1.2345"> <f:convertNumber minFractionDigits="#{i}" maxFractionDigits="#{i}" /> </h:outputText> </li> ...

Ajax request using suggestionbox

Hi, I am experimenting with richfaces and am stuck with the problem of autopopulating a second suggestion/combo box based on selection of a value from the first suggestion/combo box. Here is my xhmtl excerpt : <h:outputLabel value="Brand:" for="brand" /> <rich:comboBox id="brand" selectFirstOnUpdate="false" defaultLabel="Enter some va...

How to embed jQuery/javascript in JSF XML

Hello I'd like to focus on the first h:inputSecret component in my RichFaces rich:modalPanel. I've read I need to use the javascript I've included in the list below but it simply doesn't work (Win FF). Can anyone tell me why not? I've tried autofocussing on id="Form" and giving the panelGrid an id and using that to no avail. Any help...

Seam reRender component in partial; reRender across naming containers

Hello, I'm using seam to develop a simple web app. Using a4j commandButton in many places, with the property reRender="componentName" componentName is in most places a a4j outputPanel Which always worked, until I used a template. with include of two different views. reRender applied to the whole view does work, but reRender applied t...

JSF, Richfaces: How to run Javascript method each time rich:datatable (re)renders?

I have a rich:datatable which may be reRendered my multiple components in my page. I want to run a Javascript method each time it is rendered, including the first time the page loads. How can I do this? ...

Calling another a4j:jsFunction in an a4j:jsFunction oncomplete event

Hi all , I define some java script function which will call the back-end functions using a4j:jsFunction.For example : <a4j:jsFunction name="function1" action="#{Bean1.action1}" oncomplete="function2();"/> <a4j:jsFunction name="function2" action="#{Bean1.action2}" oncomplete="SomeJSFunc2();"/> Then in the a4j:commandButton , I s...

JSF - Creating an overlay for popup panels.

Hi, I've created an overlay that will popup whenever someone wants to upload a file to the system. The Gui looks like this (when the overlay is up) I have two problems with this: I attached a a4j:support object that, onclick, makes the overlay disappear. The problem with this is that when I click the upload button on the upload comp...

To handle Window.open in request Scope in jsf

I am using JSF 1.2 here i have a managed bean in request scope, my scenario is to open a seperate window. After action is performed oncomplete i am opening a new window since the managed bean in request scopes the values are not populated in new window. Because new object is being created while opening a new window. i can use session sc...

What is viewstate in JSF, and how is it used?

In JSF, there is a viewstate associated with each page, which is passed back and forth with submits etc. I know that viewstate is calculated using the states of the various controls on the page, and that you can store it either client side or server side. The question is: how is this value used? Is it used to validate the values sent a...

In JSF How can I understand of multi checkboxes whether all of them is checked or not?

As you understand from the title above, I have a datatable and checkboxes in each row. I want to enable a button when at least one checkbox is selected, and disable it when there is no selected checkboxes (I mean all of them is unselected). I could achieve this as like if one of the checkboxes is selected, the button becomes enable. How...

rich:suggestionBox with s:convertEntity for multiple items?

I have a scenario in which, given an object, I'd like to be able to provide a suggestion box where users can enter the keywords that apply to that object (very similar to the 'tags' feature here on stackoverflow). My keywords are entities themselves, and maintained in their own table. I do a many-to-many join on the objects and the key...

<rich:datatable> and <rich:datascroller> problem

Hi all, I am developing a Seam-Jsfv1.2-EJB3 web app. I have a datatable and checkboxes in each row. Moreover, I have a datascroller at the bottom of my table as well. My problem is when I click the next page number from the scroller, the selected checkboxes at the first page of the datatable is gone. I mean, even if they were selected...

How to access string[] in xhtml page

I am having a simple string array in my bean as public String[] colors = new String[]{"red", "blue", "green"}; and trying to display these colors from my xhtml as <h:outputText value="#{myBean.colors[0]}"/> but I am getting a java.lang.NumberFormatException: For input string: "colors" java.lang.NumberFormatException: For i...

How to customize s:formattedText

I am using <s:formattedText> for formatting my page.It works fine as expected, but the padding around the text seams to be large. So I applied my own styleClass to this element but it didn't take effect. Firebug shows that the paragraph has styleClass 'seamTextPara'. Where will I be able to find details on the above styleClass and how t...

How to hide some nodes in Richfaces Tree (do not render nodes by condition)?

I have a tree of categories and courses in my SEAM application. Courses may be active and inactive. I want to be able to show only active or all courses in my tree. I've decided to always build complete tree in my PAGE scope component since building this tree is quite expensive operation. I have boolean flag courseActive in the data wra...