jsf

I18n - JSF variable value translation

Hi! I am using Bundle Internationalization in my project. I have initialized bundle via <f:loadBundle basename="ui.all.bundles.AppResources_en" var="msg"/> When i need to translate some text, i am using a key to resourceBundle, to get a value of it, for example: #{msg.someText}. But, now i want to translate text, which key is a value...

JSF - Unhide jsf component when clicking another component.

Hi, I'm trying to have a button that brings up an upload dialog. The way i'm trying to achieve this is similar to this: <h:outputText value="Click Me" id="testit"> <a4j:support reRender="hideme" event="onclick" action="#{actions.switchTestRendered}"/> </h:outputText> <h:outputText id="hideme" value="back" rendered="#{actions.t...

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

Can we use Facelets in JSF1.1_02?

Can we use Facelets in JSF RI 1.1_02? If we can please send me some piece of code relating to that? Can anyone tell me which version of Tomcat will support Sun RI 1.1_02? I have a restriction of JSF 1.1 in my project, so if anyone know the thing related to this please share with me. ...

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

Why is this redirect not working? JSF

Hello, Why is this redirect not working in my managed bean? HttpServletRequest objHttpServletRequest = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); FacesContext.getCurrentInstance().getExternalContext().redirect(objHttpServletRequest.getRequestURI() + "?abc=" + 1 + "&def=" + 2); I ...

best approach to do jsf form validation

If I have many input controls in a form (There are separate validators for each of these input controls - like required,length and so on ) , there is a command button which submits the form and calls an action method. The requirement is - though the input control values are , say , individually okay - the combination of these values shou...

managed beans as managed properties

I am using JSF 1.1 on WebSphere 6.1. I am building search functionality within an application and am having some issues. I've stripped out the extras, and have left myself with the following: 4 managed beans: SearchController - Controller bean, session scope SearchResults - session scope (store the results) ProductSearch - session s...

Primefaces Tree set checkboxes

I have a JSF application using Primefaces. I use the multiselect tree component which includes a checkbox on each tree node. My problem is that I need to preselect the tree nodes with values coming from the backing bean. It seems that jquery will be the way to go but I don't know how to retrieve the object values from the managedbean in ...

Adding a row to an existing datatable in JSF

Hi, I have a requirement of changing an existing JSF 1.1 project where I need to add an additional row to a datatable on click of a button. Currently the datatable loads 3 rows from the backing bean and this new button should add additional rows to the datatable on each click. Using the suggestion provided by http://balusc.blogspot.com...

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

JSF - How to run javascript expression from code.

Hi, Trying to do this programatically <a4j:commandLink ... onclick="#{rich:component('modalPanelID')}.show()"/> This doesn't work: HtmlAjaxCommandLink commandLinkObject = new HtmlAjaxCommandLink(); ... commandLinkObject.setOnClick("#{rich:component('modalPanelID')}.show()"); Any idea why and how to make it work? Thanx. ...

Loading a set of images with primefaces

Hi people! I have the next code to load a set of images whose streams are in a datamodel called names. My problem is when I declare the var inside the p:datatable tag seems like has nothing. Any idea? thx! <p:dataTable value="#{controlador.names}" var="nombre" rendered="true"> <p:column rendered="true"> ...

a4j:commandButton causes full page reload on IE7

Our process allows users to activate their account, and then configure e-mail preferences. We're using the tag: <a4j:commandButton id="activate" action="#{controller.agreeAction}" image="/img/ok.png" styleClass="activate-button" reRender="mainContent, sideBar" ...

Primefaces TreeView node expansion

Being new to primefaces, I have been researching a way to have TreeView in dynamic mode update a separate tab pane given the id on Node expansion. This works great for node selection with the "update" attribute. Can it work the same way on Node Expansion was well? Here is my code that works when a node is selected: <p:tree id="tree" dy...

JSF 2.0: Validate equality of 2 InputSecret Fields (confirm password) without writing Code?

I'm developing a pure JavaEE6 application with JSF 2.0 and Glassfish. My JSF implementation is Primefaces (beside Mojarra provided by Glassfish). I want to verify if the values of 2 password fields in a JSF form are equal. With Seam, there is the neat component <s:validateEquality for="pw1"/>. I want do to the same without Seam, just us...

Is jQuery support rich:hotKey feature?

Hi, i have used rich:hotKey for h:inputText in my jsp page. And also i wrote jQuery for get the textBox value. When i use jquery, that time rich:kotKey not worked sample.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsf/html"...

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

Desktop.getDesktop().browse(uri); will open web page on server or client side?

Hello everybody, I have a JSF application and when user click on button I want to open a web page. Desktop.getDesktop().browse(uri); probably opens a web page on server side, how to do it on client side? when i try Desktop.getDesktop().browse(uri); it works, but maybe its because I open the JSF application on localhost so I dont know i...

not able to get getExpressionFactory method in jsf 1.2_12

Hi, I am using jsf 1.2_12, here i am not able to find Method Expression or getExpressionFactory in Facescontext.getcurrentInstance().getApplication. What could be the problem. kindly help. ...