jsf-1.2

what dictates JSF version? Container or faces-config?

别来无恙 提交于 2019-11-28 00:48:54
问题 I am currently running a legacy JSF application on JBoss AS 4.3. I believe that this implements JSF 1.2. However, when I looked at the faces-config, I saw that it was using the JSF 1.1 DTD. Which version of JSF am I using? 回答1: The exact JSF implementation version information is available in /META-INF/MANIFEST.MF file of the JSF implementation JAR file. It's usually located near the bottom of the manifest file as follows: Implementation-Title: Mojarra Implementation-Version: 1.2_12-b01-FCS

What is Mojarra?

▼魔方 西西 提交于 2019-11-27 11:02:37
问题 How is Mojarra different from Sun's JSF Reference Implemenation? Is it just a later version? Is it simply a rename? 回答1: The Sun JSF Reference Implementation, also known as Sun JSF RI, was named like that, just "JSF RI", from the beginning on until version 1.2_08. The dev team found it an extremely boring and nothing-saying name. They would like to participate with the fancy product code name hype and wanted to have it in line with the "Glassfish" project which JSF RI is part of. After some

How to make a redirection on page load in JSF 1.x

断了今生、忘了曾经 提交于 2019-11-27 10:52:58
I have a web-application where the users can be sent directly to some specific pages (such as a page where he can view or edit an item). To achieve that, we provide a specific url. These urls are located outside the current web-application (i.e. they can be present in another web-application, or in an email). The url looks like http://myserver/my-app/forward.jsf?action=XXX&param=YYY , where: action represents the page where the user will be redirected. You can consider this as the from-outcome of any JSF action in navigation-case in faces-config.xml . actionParam is a parameter for the

How to Dynamically add a row in a table in JSF?

蓝咒 提交于 2019-11-27 05:10:38
In my application i need to add a row on a click of a button and this button will be in all the rows. Need help to do this? Item Class public class Item { public Item() { } private String value; public Item(String value) { this.value = value; } public void setValue(String value) { this.value = value; } public String getValue() { return value; } } Manage Bean Class public class MyMB { private List<Item> list; public void addItem() { // JSF action method list.add(new Item("Default")); Iterator<Item> iterator = list.iterator(); while(iterator.hasNext()) { Item item = (Item)iterator.next(); System

Input fields hold previous values only if validation failed

五迷三道 提交于 2019-11-27 04:07:21
I came up with a strange problem. I tried to isolate the problem so following is my simplified code. public class MyBean { private List<Data> dataList; Data selectedData; public MyBean() { dataList = new ArrayList<Data>(); dataList.add(new Data("John", 16)); dataList.add(new Data("William", 25)); } public List<Data> getDataList() { return dataList; } public void edit(Data data) { selectedData = data; } public void newData() { selectedData = new Data(null, null); } public Data getSelectedData() { return selectedData; } public class Data { String name; Integer age; Data(String name, Integer age)

Uses of javax.faces.PROJECT_STAGE

谁说我不能喝 提交于 2019-11-27 03:51:40
问题 I wanted to understand impact of 'javax.faces.PROJECT_STAGE' property for a JSF application. A nice use case was presented in below links http://css.dzone.com/news/jsf-20-new-feature-preview-ser http://www.java-tutorial.ch/java-server-faces/jsf-project-stage Except presenting validation error messages, is there any other use case where this property really helps? I understand that we can check this variable to identify the environment and change certain functionality, however is there

How to make a redirection on page load in JSF 1.x

此生再无相见时 提交于 2019-11-26 15:20:04
问题 I have a web-application where the users can be sent directly to some specific pages (such as a page where he can view or edit an item). To achieve that, we provide a specific url. These urls are located outside the current web-application (i.e. they can be present in another web-application, or in an email). The url looks like http://myserver/my-app/forward.jsf?action=XXX&param=YYY , where: action represents the page where the user will be redirected. You can consider this as the from

Input fields hold previous values only if validation failed

随声附和 提交于 2019-11-26 11:03:27
问题 I came up with a strange problem. I tried to isolate the problem so following is my simplified code. public class MyBean { private List<Data> dataList; Data selectedData; public MyBean() { dataList = new ArrayList<Data>(); dataList.add(new Data(\"John\", 16)); dataList.add(new Data(\"William\", 25)); } public List<Data> getDataList() { return dataList; } public void edit(Data data) { selectedData = data; } public void newData() { selectedData = new Data(null, null); } public Data

Invoking methods with parameters by EL in JSF 1.2

扶醉桌前 提交于 2019-11-26 08:26:43
问题 I am using a datatable and for each row I have two buttons, an \"Edit\" and a \"Delete\". I need these buttons to be read-only, i.e. disabled, if a certain condition is met for the row in question. I have seen in JSF 2 that it is possible to pass parameters to method calls. Is there anything equivalent in JSF 1.2? Ideally what I would like it something like (the looping variable is loop and there is another bean, helper , which contains the method I would like to invoke): <h:commandButton