Hi guys,
I set up a JSF2.0 project with maven. Everything works fine exept action handling :-(
Here is my .xhtml page:
<h:form>
<h:commandButton
id="submit"
value="Absenden"
action="#(projectController.saveProject)">
</h:commandButton>
</h:form>
and here my managed bean:
@ManagedBean
@SessionScoped
pub...
I'm having trouble redirecting from a view scoped bean in the case that we don't have the required info for the page in question. The log entry in the @PostContruct is visible in the log right before a NPE relating to the view trying to render itself instead of following my redirect. Why is it ignoring the redirect?
Here's my code:
@Ma...
I have a a4j:commandButton which is supposed to redirect me to an appropriate "Edit" page based on an Id, which I wanted to pass as a parameter, something like this:
<h:commandButton action="/details.jsf?faces-redirect=true" value="details">
<f:attribute name="id" value="#{bean.id}" />
</h:commandButton>
The problem is, it doesn't...
I have a JavaEE6-application running on Glassfish v3.0.1 with EJB 3.1 (app is packaged as WAR), and all my EJBs are @LocalBeans.
Currently, i'm writing a FacesConverter for use in JSF2, in which i need the EntityManager to get an Entity back from an id.
Now i wonder, which is the best and cleanest way to get the Entitymanager inside th...
Hi folks,
I have got Controller-ManagedBeans and Model-ManagedBeans (like MVC-Pattern).
Here my Controller:
@ManagedBean
@RequestScoped
public class ProjectController {
private ProjectData projectBean; //The Model-ManagedBean (see below)!
private IProjectService projectService; //My Service-Layer
public ProjectCon...
Hello,
I'm starting a small project, using JSF 2.0.
I'm having problems right in the start, in the CRUD of the first model implemented.
What I want to do is pretty simple:
The page has some filters to search, and using ajax, it populates a h:dataTable with the results.
The user should now select the line with the result he wants to se...
Recently I've been playing around with JSF2.0+Richface 3.3.3, I'm using STS as my IDE and Maven to build my project, but somehow I can't get the following JSF2.0 tags to work:
h:button
h:link
f:metadata
f:viewParam (this is the only one my STS autocomplete recognizes)
It just fails during runtime saying it can't find X component.
I ...
I'm trying to implement proper logout for my Java EE / JSF2 application.
It requires two things:
I need to logout from JAAS and invalidate the session
I then have to navigate to an external URL to fire Siteminder logout
The Siteminder logout URL (configured on the Policy server -> I cannot change it) is outside my applications conte...
Hi,
I've been literally struggling with this, although there are tons of tutorials on the topic. I'm testing the functionality of the h:dataTable component in JSF 2.0. I have the following list:
<h:dataTable border="1" styleClass="data zebra" value="#{testTableWB.testList}" var="items">
<h:column>
<...
This is from the Primefaces docs:
Button Icons
An icon on a button is displayed using
CSS and image attribute.
<p:commandButton value=”With Icon” image=”disk”/>
<p:commandButton image=”disk”/>
.disk is a simple css class with a
background property:
.disk {
background-image: url(‘disk.png’) !important; }
...
I have this working code in my webapp:
<h:button value="Edit user..." outcome="/public/user" >
<f:param name="userName" value="#{authBean.authUser}"/>
</h:button>
What it does:
It makes the button send a GET
It passes the specified parameter in the URL, making it bookmarkable.
What I need:
It should work like h:button above ...
Hi,
if i want to bind the value-attribute of a h:selectmanycheckbox to a map, with the ri of the jsf 2.0.3 i would do something like the following
the bean:
private Map<String, String[]> values = new HashMap<String, String[]>();
public Map<String, String[]> getValues() {
return values;
}
public void setValues(Map<String, String[]...
Hi!
I am using facelet and JSF2.
I define a parameter in a page:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui"
template="../templates/ui.xhtml">
<ui:param na...
Hi all,
I would like to output a bit of XHTML code conditionally.
For that purpose, the JSTL tags seem to work fine:
<c:if test="${lpc.verbose}">
...
</c:if>
However, I'm not sure if this is a best practice? Is there another way to achieve my goal?
Thx
J.
...
I have one page that does something and when the user clicks a button, the user is redirected to another page and a message is displayed. Here is my code:
public String confirm() {
FacesContext context = FacesContext.getCurrentInstance();
Flash flash = context.getExternalContext().getFlash();
flash.setKeepMessages(true);
...
I have a simple login.xhtml facelet which contain a username and password input and a command button. The command button simply have an action="welcome" outcome which display the welcome.xhtml facelet.
I'm very new to JSF. As i read the JSF lifecycle, when i click the button then the invoke application lifecyle handle the navigation and...
My result tables/images will be displayed in the same page. But the submit button is not invoked. I have two drop downs on which the values of the other two drop downs are dependent. If I am writting immediate="true" the method is invoked but only two values are set with whom I have associated processValueChange action the other selected...
I have this login.xhtml JSF page:
<?xml version="1.0"?>
<jsp:root version="2.0"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<jsp:directive.page contentType="text/html"/>
<f:view>
<h:inputText value="#{userBean.id}"/>
</f:view>
</jsp:root>
Output HTM...
I have 7 drop down in my jsp(Using JSF tag-Select One Menu), 2 drop downs are dependent on other 2 drop downs. The scope of my Managed Bean is session.I have a single page and my result is a graph/table depending on the drop down menu selection. But my selection is getting cached and at times on refreshing the code my bean and my jsp pag...
I have a simply facelet which display a list of products in tabular format. In the last column of each row, there is a checkbox used to mark the product for deletion. Until now i have to put a selectBooleanCheckBox on each row and have a "mark for deletion" property in the Product entity but i think it's ugly because i have some presenta...