I have a Collection of model objects in my backing bean, and I want to use the f:selectItems tag to display them in a h:selectOneMenu. I have read many tutorials that recommend using a collection of SelectItem objects instead of my model POJOs. However, I do not want to do this because it ties your model to a faces presentation. Is th...
I have a client who wants to use JSF2 and they like that XHTML is now the default (Facelets).
However, they have a huge amount of "legacy" JSP from their JSF1.x codebase.
I know it's probably not desirable, but will it be possible to support a mix of both in JSF2, at least for a transition period whilst they port?
I know it was possib...
I am going to develop a multilayered architecture web application in java using jsf framework. I want to create one data layer where all the database connection is avaliable for use my application, second layer is application layer etc.
Please give me any link where can I can get details about the n-layered architecture of web applicati...
I need to implement long-poll for a notification system, I current using Primefaces ajax framework but currently does not support long poll. I just wondering what is available for JSF developer if they want to implement long poll? Another question: between long poll and web push, for notification system, which one is prefer?
Note: I am ...
So I have an inputText that has its value hook to myBean.text, I want that if I click enter/return key, the inputText will invoke a method inside myBean to do something. Can any one help me?
EDIT
<p:inplace label="Add Comment">
<h:inputText id="keyword" value="#{PostComment.comment.comment}" style="width:100%;"
onk...
I'm trying to display a shopping cart in my application (Seam/RichFaces), and have included a "remove from cart" <a4j:commandLink /> next to each item to remove the item from the cart. When I click the link it is supposed to rerender the cart contents to show that the item has been removed. However, when I click the link, nothing happe...
Hello all !
i have one page index.jsf, i was use ui:include for include header and footer,i want to dynamic view in content, it mean when user click on register link just content change header and footer didn't change
i image my code sample is:
<ui:include render="#{mybean.include}"/>
and in backing bean my code will :
public void g...
Is it possible to prevent user from opening JSF page in more than one browser tab or window?
...
BeanClass code is:
public void validEmail(FacesContext context, UIComponent component,
Object value) throws Exception
{
//Set the email pattern string
Pattern p = Pattern.compile(".+@.+\\.[a-z]+");
//Match the given string with the pattern
Matcher m = p.ma...
I am trying to select/unselect all checkboxes in the datatable using a single checkbox. As I am trying to set it on the server, I am unable to do so. I have looked around for solutions but could not get how to accomplish on the server side.
Here is the code.
xhtml file###
<rich:column styleClass="center-aligned-text">
<f:fa...
Hello All!
i using PrettyFaces for Pretty URL
but i have first problem with PrettyFaces:
my mapping in pretty-config.xml
<url-mapping id="home">
<pattern value="/" />
<view-id>/faces/index.jsf</view-id>
</url-mapping>
i have one file index.xhtml
when deploy on server url http://localhost/myproject
it not found index.jsf
wh...
My webapp has users who login. There is a timeout. Before the session expires, I would like to execute a method to cleanup some locks.
I've implemented a sessionListener but once I reach public void sessionDestroyed(HttpSessionEvent event) the session is already gone and I need some data from it, so I would like to execute a method (whi...
The bug is the inputTextarea I have below. Only the last row can record any input from the inputTextarea, in other word, only the last row, hook it value to #{PostComment.comment.comment}. Why is this?
<h:form id="userCommentList" >
<p:dataTable value="#{CentralFeed.profileComments}" var="item">
<p:column>
...
Hello Everybody !
I'm new in JSF and JSF 2.0
i want to redirect in JSF how can i do it?
in html i can use tag for do this
but in JSF i use h:outputLink or h:commandLink for render user if he is logged , login link not display to him, but if he not logged login link will display to him. and i want redirect link to other page or redirect ...
Hello,
I used the rich: editor component to enter rich content and I save it in a database. but when I tried to display it in outputText field , rich tags are not interpreted and are displayed as simple text.
So my question is: how to make jsf component (or Richfaces) interpret this rich content and display it properly??
...
Hi!!
I wish to set items from a list to the selectonemenu in icefaces.
But when I do the same I get the following error:
java.lang.ClassCastException: cannot be cast to javax.faces.model.SelectItem
The is an entity class.
Please Help.
...
I don't really understand why this simple stuff won't work. I can see that I set the constructor is called everytime one property is set. The problem is that when I reach the sendInvitation method then all inviteEmails is null.
@Named(value = "adminBean")
@RequestScoped
public class AdminBean implements Serializable {
private Strin...
I am using a JSF data table. One of the columns in the table is a Command button.
When this button is clicked I need to pass few parameters (like a value of the selected row) using the Expression language. This paramaters need to be passed to the JSF managed bean which can execute methods on them.
I have used the following snippet of c...
I'm performing a validation task that takes a while and am spinning the validation process into a separate thread. I've got the progress bar side of things working, with PortableRenderer and a ViewScope allowing it to update the progress bar component.
However, I'm trying to redirect the user once the page either finishes or a error in...
Hello,
I have a litte radiobutton like this :
<h:selectOneRadio value="#{test.answer}" valueChangeListener="#{TestService.changeanswer}" immediate="true" id="answer">
<f:selectItem itemValue="A" itemLabel="Absolutely True"/>
<f:selectItem itemValue="B" itemLabel="True"/>
<f:selectItem itemValue="C" itemLabel="Partially True"/>
<...