jsf

Can one suppress the conversation propagation with an `<h:link>`?

I'm using the new JSF2 <h:link> tag, with a nested <f:param> to link to a page using a get request. However, the conversation id (cid) is propagated via the query parambeters of the link to the new page. Can one suppress the conversation propagation with an <h:link>? ie. no cid=# in the url...? ...

JSF, actionlistener at facelets

Hi there, I'm using JSF (Mojarra 1.2) with Richfaces (3.3.2) within some facelets which are used as portlets (I'm using the Jboss Portlet Bridge 2.0 here). Now I'm facing something strange: I've got an actionlistener on my <h:commandButton> which is triggered, when the button is clicked but when I simply reload the page, the action is e...

f:convertDateTime displays wrong Date

Hi! In my Web Application I retrieve data using Hibernate and display it in a RichFaces dataTable. In my MySQL-table there is a field of type "date". When I print this field to the log in my Bean, it shows the correct date from database (e.g. 2010-04-21). But in the rich:dataTable it shows up like this: 4/20/10 So there is a disc...

JSF Resource sends 304 not modified afer redeployment

Hi! I use outputStylesheet and outputScript for some resources. But when I've made changes to the development project and want to redeploy in the production environment (upload the WAR to Glassfish admin console) the response code for the resources are 304 (not modified) which means that the browser wont pickup the changes before the c...

Why does a subTable break a4j:commandLink's reRender?

Here is a minimal rich:dataTable example with an a4j:commandLink inside. When clicked, it sends an AJAX request to my bean and reRenders the dataTable. <rich:dataTable id="dataTable" value="#{carManager.all}" var="item"> <rich:column> <f:facet name="header">name</f:facet> <h:outputText value="#{item.name}" /> </r...

Rich Tooltip for SelectItem

How to attach a rich:tooltip to the list generated by f:selectItems when using a variable for the attribute for inside the rich:tooltip. This code works fine (the value of #{prefix} is theprefixvalue <ui:composition> <a4j:form id="#{prefix}_form"> <h:selectOneRadio style="text-align:left" id="#{prefix}_rating"> <f:selectItems value="#{...

@Intertceptors does not work for web bean for JSF page.

@Named @ConversationScoped @Interceptors(MyInterceptor.class) public class BeanWeb implements Serializable { public String methodThrowException throws Exception() { throws new Exception(); } } public class MyInterceptor { @AroundInvoke public Object intercept(InvocationContext ic) throws Exception { try {...

Internet Explorer won't display facelets .xhtml files

I'm just starting to work with JSF and Facelets and I've put together a very simple page that is just taking a template from another file and inserting some text (just to show that it pulls inormation from both the template and the calling page) However whenever I try to view the page in Internet Explorer 7, it attempts to download the ...

jsf custom control strange behaviour

hi, I have a jsf custom control which contains this: <rich:column> <c:if test="#{not empty columnTitle}"> <f:facet name="header"> <rich:spacer/> </f:facet> </c:if> <s:link view="#{view}" value="#{messages['edit']}" propagation="#{propagation}"> <f:param name="${para...

Richfaces: rich:datatable rowspan using rich:subtable

Hi, I use Richfaces, Seam and JSF, and I want something like the following: and I have managed it to a degree using a rich:subtable like this: <rich:dataTable value="#{backingBean.companyList}" rows="100" var="company"> <f:facet name="header"> <rich:columnGroup> <rich:column>Company Name</rich:column> <rich:colum...

JSF getter methods called BEFORE beforePhase fires

I got a recommendation to put all data lookups in the beforePhase for a given page, however, now that I am doing some deeper analysis it appears that some getter methods are being called before the beforePhase is fired. It became very obvious when I added support for a url parameter and I was getting NPEs on objects that are initialize...

Am I using EJBs properly?

I am using a JEE6 stack including JPA 2.0, JSF 2.0, EJB 3.1 etc. The way my architecture is setup is the following: I have JPA annotated DAOs using hibernate as my JPA provider. I have JSF Managed beans which correspond to my facelet/xhtml pages. I have EJBs that handle all of my database requests. My XHTML pages have JSF EL which ma...

How do i create a group of h:selectOneRadio in JSF?

Hello, I am trying to create a grooup of h:selectOneRadio but ui:repeat gives it different id for each row. This is my code :- <ui:repeat id="themes" value="#{RegisterBean.objBlogTemplateList}" var="item"> <p:graphicImage alt="#{item.templatePicName}" style="border: s...

JSF, datatable and onRowClick

Hi there, I want a commandlink to be executed when the row is clicked in my datatable. I've created a <h:commandLink> in one of my columns, where a parameter is passed through <f:setActionPropertyListener/> Is there a clean solution to fire this link by a rowClick? Sure I could workaround my missing knowledge with some jQuery but there ...

endless loop / StackOverflowError when using Apache MyFaces 2.0

I just like to give JSF 2.0 (MyFaces 2.0) a try using Tomcat 6.0. I am completely new to JSF. I just put a static xhtml as test.jsf in the application root. When request the URL, a StackOverflowError will always be thrown: java.lang.StackOverflowError at org.apache.catalina.core.ApplicationHttpRequest$AttributeNamesEnumerator.<init>(A...

JSF Custom EL function works only on the first load of the page.

I created a ( JSP-based) custom EL function to use in the rendered tag. The function will return a boolean to decide if a page component needs to be rendered on a page or not. I import it onto the jsp page using <%@ taglib uri = "/WEB-INF/mine.tld" prefix = "g" %>. Everything works perfect on the first load of the jsp page. Once a but...

JSF, How to set a property in a different page/backing bean and then navigate to that page?

I am using JSF 2.0 and attempting to pass values between different pages in my App. The setup is as follows: I have a page called userSelect that has a backing bean userSelectBacking. On this page I display a list of users that can be selected and submit using an h:commandbutton, when the page is submit the navigation goes to a userEdit...

Text input for multi-valued attribute

I need to create an input form that will allow a user to enter any number of values for a particular attribute. I've tried several approaches, all of which seem to have various levels of failure. The latest model bean looks something like: public class Product { private String name; private ArrayList<String> tags = new ArrayList(5...

Java EE 6: JSF vs Servlet + JSP. Should I bother learning JSF?

I am trying to get familiar with Java EE 6 by reading http://java.sun.com/javaee/6/docs/tutorial/doc/gexaf.html. I am a bit confused about the use of JSF. Usually, the way I develop my Web App would be, Servlet would act like a controller and JSP would act like a View in an MVC model. So Does JSF try to replace this structure? Below are ...

What is the most up-to-date way to write Java web applications and web-based front-end ?

What is the most up-to-date way to write Java web-based applications and front-end ? What is it? JSF, JSF2 or some framework like Spring MVC or Tapestry? What are pros and cons of each framework? ...