jsf

Explicit directory for JSF template files

Hi everybody, I'm just getting into Seam/JSF development and looking for a way to lookup the XHTML template files from a different location. When configuring the JSF application like this: <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> </servlet> <servlet-mapping...

Why I can't use tags inside f:attribue for h:outputFormat?

Hello! Question appears during porting application from JSF 1.2 to JSF 2.0.3 (Mojarra). I have following code: <h:outputFormat value="#{m.t_if_you_forget_password}" escape="false"> <f:param value="<a href=\"/restore_password.jsf\">" /> <f:param value="</a>" /> </h:outputFormat> and got error: Error Traced[line: 22] The value o...

Get the request URL in a JSF bean?

How do you get the request URL in a bean backing a JSF page? I've been looking through the FacesContext docs and the best way I could find seems terribly long: public String getRequestURL() { Object request = FacesContext.getCurrentInstance().getExternalContext().getRequest(); if(request instanceof HttpServletRequest) { ...

Passing EL expressions or managed bean instance in jsp:include

I have a generic buttons jsp: <wow:button id="addButton" iconClass="add16 icon16x16" action="#{managedbean.addNew}" type="submit" immediate="true" value="#{lblMsg.label_add }" /> <wow:button id="deleteButton" iconClass="iconCancel" action="#{managedbean.delete}" type="submit" value="#{lbl...

IceFaces accumulate view problem

I am uploading a file in IceFaces application through thread. After file upload is done, I am showing javascript message. Message is shown after some action or event is fired from view page. I want to show them soon after uploading gets completed, in console it prints the successful message properly. Following warning message is shown...

JSF never renders page without redirect rule

We have two forms where we need to pass values from one to the other. We pass the parameters successfully, but the second page never renders in the browser. The browser just hangs and the request never completes. If we add the redirect rule to faces-config.xml, the page renders but the parameter value is reset to null. Here's our naviga...

JSF commandbutton - styling

Is it possible to style JSF commandbutton tags to look like the following example: http://www.bloggerswatch.com/internet/css-trick-submit-button-should-look-same-everywhere/ It works for the commandlink/ ...

h:dataTable problem - Target model Type is no a Collection or Array

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

ActiveMQ messagedriven bean to JSF

I am currently reading from ActiveMQ with a Message driven bean (EJB3) in the back end. The problem I am facing is that I have to update a table in my JSF page as soon as I receive the message from ActiveMQ in the message driven bean. Any suggestions of the technologies I can try would be great. I am currently using primefaces and glas...

Capture generated HTML output of JSF page

Does anyone have a class which I can run on the server side which will generate the HTML output of an xhtml JSF page that I can then use to email to clients? ...

WARNING: Target component for id thumbnailSelector not found

I am getting this warning in my jsf application when I upload an image through rich:fileUpload. <rich:fileUpload id="file" required="true" listHeight="50" immediateUpload="true" maxFilesQuanity="1" uploadData="#{entryHandler.uploadItems}" fileUploadListener="#{entryHan...

JSF tags not rendered

I am new to JSF, but my JSF tags are not rendered in xhtml file, i tried out every possible solution, but problem is not solved my web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2...

Making p:commandButton work like h:button

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

c:if test is not being invoked in facelet + JSF2

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

Managed Bean Per Page (JSF)

Is it possible to have a managed bean created only on some pages i.e. bean != null on page1.faces and bean == null on other pages? ...

JSF2: How to display a linebreak with outputText

I need to render a line break using outputText so that I can utilize the rendered attributed. I tried <h:outputText value="<br/>" escape="false" /> but it generated exception The value of attribute "value" associated with an element type "null" must not contain the '<' character. ...

Set JSF backing bean variable when clicking componentControl and displaying contentMenu

I have a rich:componentControl which sets a parameter called applicationId and displays a rich:contextMenu: <rich:componentControl event="onRowClick" for="ctxMenu" operation="show"> <f:param value="#{item[1].applicationId}" name="applicationId"/> </rich:componentControl> and here's the rich:contextMenu: <rich:contextMenu id="ctxMenu"...

Ajax with JSF -( No RichFaces / No Ajax4Jsf )

Hi, I am using jsf portlets (JSR 168), and i am implementing ajax with JSF ( i have a text field and select one menu, on entering a char on the text field, should get the matching strings on the menu, an auto completion functionality). but i am not using any jsf adv specs like richfaces / facelets etc.. our project is using jdk1.4 stil...

Problem with JSF form submit

public class MyBackingBean{ private List model; public String search(){ //change model data model = doSearch(); return "same_view" } @PostConstruct public void init(){ model = loadDefault() } //Other code omitted for clarity } And in JSP, for some reasons I use c:foreach to iterate over the model and display the items in a ...

JSTL in JSF2 Facelets... makes sense?

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