Burferd Grabarkowitz

Greenhorn
+ Follow
since May 29, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Burferd Grabarkowitz

The question still remains, how can that be done.
Could anyone give an example?
11 years ago
JSF
Using JSF 2.0.

I have a need to generate components in my backing beans and have them displayed on the page when rendered.
Creating the component is not an issue, I can do that with the code listed below.
However I want to add ajax functionality and I do not know how to do that in the backing bean.

A simple example of an ajax enabled component on an xhtml page would be something like:



To create something similar in a backing bean I use the following code in my backing bean:



I then add this as a child of a component on the page.

What I don't know how do do is add the ajax behavior to this compponent.

Does anyone know how to do this?

Thanks.



11 years ago
JSF
Thanks for the feedback.

I need to do the redirect from within a backing bean, because there are sometimes conditions that I need to check to determine the page.
I could probably get around this in most cases, but I am trying to migrate a fairly large application from JSF 1.2 where this behavior was acceptable and was trying to lessen the migration pains.
When you mention "JSF Navigation rules" are you referring to navigation coded in the page itself (action="newpage.xhtml")?
Or do you mean JSF 1.2 navigation rules in an xml file?
I am trying to get away from the xml file becsuse it ended up being over 5000 lines for this application (so far) and I really want to avoid propigating that.
Most pages have conditions that need to be met before I can allow navigation away from that page.

This might be an answer to most of the navigation issues, however how do I get around warnings for the other references to thinds like css files and javascript files that are referenced in the web page and the images that are referenced in the css files?
11 years ago
JSF
Using JSF 2, Facelets, NetBeans 7.0, Glassfish 3.2, Mojarra 2.1.0

I get the folllowing Warnings in my server log when changing pages or referencing resources.

Navigation:
WARNING: JSF1015: Request path '/faces/faces/EnrollPage.xhtml' begins with one or more occurrences of the FacesServlet prefix path mapping '/faces'.
I am doing navigation through redirect with the following method:

I've tried leaving off the "faces/" prefix like the warning suggests, but when I do that, I cannot navigate.
I leave on the prefix and it navigates, but I get the warning message.

Web page resources:
WARNING: JSF1015: Request path '/faces/faces/resources/css/common.css' begins with one or more occurrences of the FacesServlet prefix path mapping '/faces'.
WARNING: JSF1015: Request path '/faces/faces/resources/scripts/calendar-setup.js' begins with one or more occurrences of the FacesServlet prefix path mapping '/faces'.

Here is how I refernce the resources in the <head> section of the page xhtml code:


Css file resources:
WARNING: JSF1015: Request path '/faces/faces/resources/Images/backgroundPage.jpg' begins with one or more occurrences of the FacesServlet prefix path mapping '/faces'.
Here is how I refernce the image resources in the css file:

My directory structure is:
Web Pages -> resources ->Images

I am at a loss to understand how to get rid of the warning messages.
I have tried several different permutations of the reference addresses, but nothing else I have tried works.

Any suggestions?

Thanks.
11 years ago
JSF