jsf

JSF / CSS attribute conflicts

It's our first JSF app, and I'm in the middle of integrating our graphic designer's CSS into our facelets files. He tells me that he needs the name and id attributes of the input tags to be the same as the for attribute of the label tag. His request: <label for="username">User Name:</label> <input id="username" type="text" name="userna...

Storing web content in a JAR file

Is it possible to store web content (such as JSPs, HTML, images, CSS etc) in a JAR file? I've been looking at various options at modularising our web applications and this is one possibility. We are currently using JSF and Facelets for our view technology - I'm thinking it may be possible to write some form of custom view resolver whic...

Can you have JSF custom components in different OSGi bundles?

Has anyone used OSGi and JSF together? I ask because JSF uses class-loader magic to find custom components. From a tutorial (emphasis mine): This configuration file will end up being META-INF/faces-config.xml in the .jar file that represents this component. JSF will look for such a file name in each of the .jar files that ...

How do you get the length of a list in the JSF expression language?

How would I get the length of an ArrayList using a JSF EL expression? "#{MyBean.somelist.length}" does not work. ...

Passing parameters between JSPs

Hi. Please bear with me here, I'm a student and new to Java Server Pages. If I'm being a complete idiot, can someone give me a good link to a tutorial on JSP, since I've been unable to find info on this anywhere. Okay, here goes... I'm using Netbeans and trying to pass an object that connects to a database between the pages, otherwi...

NullPointerException getCommandLinkOnClickScript

Im using the latest updated version of Glassfish server and JSF 1.2. There are several command links on this JSP that have null as values of their params. I read about the known issue with command links that do not handle null values (https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=583.). But this page loads fine the first ...

jsf login times out

Ok simple question. I have a JSF application, containing a login page. The problem is if the user loads the login page, leaves it for a while, then tries to login the session expires and a ViewExpiredException is thrown. I could redirect back to the login when this happens, but that isn't very smooth. How can I allow this flow to properl...

Using JavaScript with JSF and Facelets

I would like to use JavaScript to manipulate hidden input fields in a JSF/Facelets page. When the page loads, I need to set a hidden field to the color depth of the client. From my Facelet: <body onload="setColorDepth(document.getElementById(?????);"> <h:form> <h:inputHidden value="#{login.colorDepth}" id="colorDepth" /> </h:form> ...

How can I maintain scroll position across postbacks in JSF?

I am using JSF frontend for a page where an image is uploaded or deleted. Clicking on the upload or delete button causes a postback and the page to reload with the updated status. This however, resets the scroll position of the page. How should I go about retaining the scrollback of this page on the postback actions. ...

myfaces datalist not able to see backing bean properties

I am using myfaces extension in JSF to use extended components. The component x:inputFileUpload is working for me. I tried to replace an h:dataTable component with myfaces x:dataList component to get rid of the table elements in rendered HTML. It seems as if this component is not able to see any properties from the backing bean. Here is ...

JSF and SunOne Webserver 6.1

Hi guys, Does anybody know which JSF version is most suitable to use when deploying to SunOne 6.1 SP2 Webserver? More important where I can find that type of information? Thanks, Alejo ...

JSF & Facelets Flow

I have a dynamic Facelets page that needs to show information from database when the page loads. At this point in the flow, there have not been any form submissions. Every JSF example I can find only shows a form submission with dynamic results on the next page. Every call I make to our database is currently takes place after an action ...

Hibernate CRUD à la Ruby on Rails' Scaffolding

Guys, Do you know of any tool that would do like Ruby on Rails' Scaffolding (create simple CRUD pages for any particular class to allow quickly populating a database with dummy data), only which used Java classes with Hibernate for database access, and JSP/JSF for the pages? It is a drag when you are programming one part of an applica...

How do I have multiple components respond to a single event in JSF?

Here's the sit: I have a JSF component which is basically a list of 'documents' I have any number of document viewer components on the same page. None of these components "know" about each other. In other words, they cannot be configured at design time to link to each other or anything like that. When the user clicks a document link ...

JSF Header with Login Component?

I'm pretty new to JSF and the many many related technologies out there. I'm trying to make a website that has a header which includes a logo, navigation links, and a login box, such that this header can easily be included in all of the site's pages unless the user logs in, in which case a different header will appear. Something similar ...

Why is tomcat looking for JSF classes?

I am trying to get my development environment up and running, and I am having trouble with Tomcat trying to load JSF classes for some reason. My application does not use JSF; in fact, I haven't even deployed my application to tomcat yet. I am getting a number of stack traces in the startup logs and I cannot load the default tomcat home...

Grouping columns under a single header in JSF

Hey guys, is there a way using JSF to group two or more columns under a single parent column in JSF? I have a dataTableEx with hx:columnEx columns inside of it. What I want is something like this: [MAIN HEADER FOR COL1+2 ][Header for Col 3+4] [ COL1 Header][COL2 Header][COL3 ][COL 4 ] Data Data Data ...

JSF getValue() v.s. getSubmittedValue()

Hey all, I've been developing a few JSF applications lately and am disturbed with the inconsistency in the web component APIs. I've noticed that there is extremely unpredictable behavior when calling .getValue() or .getSubmittedValue() on a JSF component object in server side code. Sometimes when I call .getValue() on a drop down list...

Modifying the structure of a HTML table with jQuery

Hi all, I have a list of elements (the X in the following examples) displayed either in a row or in a column of an HTML table. In HTML code point of view, I have either (horizontal display): <table id="myTable"> <tr> <td>A</td> <td>B</td> <td>C</td> ... </tr> </table> or (vertical display): <table id="myTable"> ...

JSF commandLink action firing before Updating Model Values

Hey all, I have a JSF application that consists of two JSPs: login.jsp & main.jsp. I have the following faces-config.xml: <lifecycle> <phase-listener>package.programs.scorecard.beans.EventBean</phase-listener> </lifecycle> <managed-bean> <managed-bean-name>FormBean</managed-bean-name> <managed-bean-class>package.programs.scoreca...