jsf

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> ...

Problem trying to send file to browser in JSF

Hi I've tried two different techniques for sending a file to a browser(making the user download a file). I've tried an example from myfaces wikipage FacesContext context = FacesContext.getCurrentInstance(); HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse(); int read = 0; byte[] b...

jsp TextField binding

I have a panel in my Page1.jsp: <webuijsf:panelLayout binding="#{Page1.dynamicFieldsPanel}" id="dynamicFieldsPanel" -rave-layout: grid"/> Then I have this in Page1.java: private PanelLayout dynamicFieldsPanel = new PanelLayout(); public void setDynamicFieldsPanel(PanelLayout pl) { this.dynamicFieldsPanel = pl; } public Pane...

running jboss-el with tomcat 6 and jsp2.1

Hi! I need to send parameters in my EL Expression. So i put jboss-el jar. as well, I added the tag: <context-param> <param-name>org.apache.myfaces.EXPRESSION_FACTORY</param-name> <param-value>org.jboss.el.ExpressionFactoryImpl</param-value> </context-param> in my web.xml of the project. But it seems to me that it stil uses...

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...

How can I load txt file from internet into my jsf app?

Hi all! It's me again) I have another problem. I want to load file (for example - txt) from web. I tried to use the next code in my managed bean: public void run() { try { URL url = new URL(this.filename); URLConnection connection = url.openConnection(); bufferedReader = new BufferedReader(new InputStreamReader(connecti...

Does NavigationHandler.handleNavigation() clear the flash?

I am using JSF2.0 Mojarra 2.0.2. I have a method that logs out a user and puts a logout message in the flash, forwards to the login page (which has a div that prints out the flash). However, when I use navigationHandlers handleNavigation method for some reason the flash is not being displayed. I have a similar method that forwards a use...

What future JS libraries have against ASP.Net and JSF components libraries?

Could you people share your opinions about future of JavaScript libraries as compared to ASP.NEt and JSF component libraries? Do you feel that Pure JS components are going to live around us for quite a some time? Or ASP or JSF would be a safe investment? ...

Which implemtation of JSF 1.1 to use MyFaces or Sun RI

We want make a choice between SUN RI 1.1 JSF implementaiton and MyFaces. Appserver we will be using is Weblogic 8.1. Could you please provide main points for Comparison between the two Which one is better. Can we use Facelets in SUN RI 1.1_02. Which is the better choice if want to move the Application to JSF 1.2 and JDK 1.5 in Future. ...

JSF 2 f:ajax lifecycle problem

The problem is, that if a property is changed during an f:ajax request and a binded panelGroup should be newly created depending on that changed value, the old value is used. This code will explain the problem. Here is the backingbean TestBean: public String getFirst() { return first; } public void setFirst(String firs...

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? ...

jsf datatable lazy load filter and sorting

Hi, I have worked on several projects with a lot of data tables. The tables had sorting, filtering and paging of course on server side and with help of the db (all databases has implemented sording, filtering -where and limit the returned results). When workig on real application there are a thousands of even a millions rows. But I ha...

Seam:token tag not being respected

When I click a command button, and then hit the browser back button to the form and click it again, it submits a second time without throwing the proper exception... Even stranger, the form id itself is DIFFERENT when I come back, which implies it has regenerated a "valid" form id at some point. Here's the relevant code: Any ideas? <h...

image viewer website

i asked to make a website to view images and manage it's actions like max, min, autofit,..... (some thing like picasa but as a web application ) what is the suitable tool for that. JSF, JBoos Seam, dojo, digit ? and if any reference to enhance my skills on that branch will be appreciated. ...

User forms authentication in JSF

I'm a novice at JSF and I got a couple of questions concerning organizing user authentication there. 1) How can i redirect the registered user to a welcome page (for example welcome.xhtml)? I heard about using Filter or navigation-rule tag, but i didn't found a full-blown tutorial of how it works. 2) How can i tell the server that unau...

How to get JSF2 working with Seam2

Hi all, Is it possible to get JSF2 working on the latest production Seam release (2.2.1.GA)? I get this error on startup: javax.faces.view.facelets.FaceletException: Must have a Constructor that takes in a ComponentConfig at com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.<init>(AbstractTagLibrary.jav...

Conditionally setting the font color of an item in a drop down box in JSF

I'm a newbie to web programming, so please bear with me. I am using JSF 1.2 and I want to conditionally set the color of the items in my drop down list. In other words, I have a collection of items that, along with a key and a value, also have a boolean property, warning, that is dynamically set by user action. I want the drop down to ...

Why is this simple file upload not working? JSF

Hello, Why is this code not working? I always get size() = 0, whenever i upload file. xhtml file :- <?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"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.su...

Introducing Ajax support in a MyFaces (JSF) + Tomahawk application

Hi, we have a project where we are using MyFaces + Tomahawk, recently I have been requested to provide enhancements to many of the existing screens by using AJAX and provide functionality such as partial refresh. As I see, Tomahawk's components don't have special support for Ajax, so it may be a lot of work to hack Tomahawk in order to ...