jsf

In JSF How can I understand of multi checkboxes whether all of them is checked or not?

As you understand from the title above, I have a datatable and checkboxes in each row. I want to enable a button when at least one checkbox is selected, and disable it when there is no selected checkboxes (I mean all of them is unselected). I could achieve this as like if one of the checkboxes is selected, the button becomes enable. How...

JSF - Updating Model Values in Controller Bean

I have a Controller bean (SearchController) that has two managed bean as managed properties (SearchCriteria, SearchResults; both of which are session scoped). When the user hits the find button, the action method that is executed is in SearchController. The SearchCreteria managed bean has a method called search(). This method returns ...

Forcing a save as dialogue from any web browser from JSF application

Hello I've created a JSF application, and I want to embed a link in a page which when clicked causes the backing bean to marshall out some xml and force the opening of a save-as download dialogue box so the user can choose a location to save the file. I've already written the JAXB code. How is this done? Thanks ...

FacesMessages in MyFacesServlet Wrapper

I throw NullPointerException in a java bean and catch the exception in FacesServletWrapper. in FacesServletWrapper I gets always only ServletException. how can I catch the specific exception that I throw? How can I continue from where I throws the exception? in my bean: public String getSize() { try { Object object = null; ...

rich:suggestionBox with s:convertEntity for multiple items?

I have a scenario in which, given an object, I'd like to be able to provide a suggestion box where users can enter the keywords that apply to that object (very similar to the 'tags' feature here on stackoverflow). My keywords are entities themselves, and maintained in their own table. I do a many-to-many join on the objects and the key...

Can I not submit a form to a servlet from JSF?

* Unable to find matching navigation case with from-view-id '/home.xhtml' for action 'MemoServlet' with outcome 'MemoServlet' I try to accomplish it through: <h:commandButton type="submit" value="add" action="MemoServlet"/> but all the tutorials in the world only do it with a bean, which i don't want. I've come across any navigat...

Why does my session id (JSESSIONID) change while switching from https to http? java jsf

Hello, I have a page that uses https and when i do a redirect from the bean that uses that https page to some http page. Then my session id changes. How can i stop this from happening? Please help me. Thanks in advance :) ...

How to bind a servlet to a context?

I got javax.servlet.ServletException: Error instantiating servlet class servlets.MemoServlet javax.naming.NameNotFoundException: Name servlets.MemoServlet is not bound in this Context when using <form action="MemoServlet"> I know I could use managedbeans, but I've to use servlets. I suspect the problem has to do with JSF. context...

How to remove FacesMessages from the FacesContext?

In my screen, I have a drop down(select box), on selection of any of the options in that drop down , i display one or more text boxes beside the select box using javascript/css - display:none and display:block. All these input controls are in the same jsf form. Each of the input controls have their own validator. The problem is suppose t...

How do I convert this h:form into xhtml form

<h:form id="login"> Email: <h:inputText id="email" value="#{user.email}"/> <h:commandLink id="signupLink" value="signup" action="#{userManager.validate}"/> </h:form> To something like this: <form action="#{userManager.validate}"> Email: <input type="text" id="email" value="#{user.email}"/> <button type="submit" value=...

jsf h:inputText and Double value

I use: <h:inputText id="costsPerPallet" value="#{globalReportSelectionForm.palletCost}" size="5"> <f:convertNumber pattern="0.00"/> </h:inputText> palletCost is a Double; When entering a value of "1.00" and submit it is fine. When I enter "1" and submit I get the error: java.lang.ClassCastException: java.lang.Long cannot be cast ...

set/unset checkboxes in JSF

Hello, i've got one problem with checkboxes in JSF. I want them to behave dependently on each other, e.g., when i check a box which belongs to some object that has children then all checkboxes that belong to these children components must be checked either. And also when i uncheck one of child's checkbox the parent should be unchecked to...

<rich:datatable> and <rich:datascroller> problem

Hi all, I am developing a Seam-Jsfv1.2-EJB3 web app. I have a datatable and checkboxes in each row. Moreover, I have a datascroller at the bottom of my table as well. My problem is when I click the next page number from the scroller, the selected checkboxes at the first page of the datatable is gone. I mean, even if they were selected...

how to pass javascript function argument within JSF component?

Hello everybody! I have the folowing code: <script Language="JavaScript"> function load(url) { var load = window.open(url,'','scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no'); } </script> <h:commandLink value="aaa" onclick="load('<h:outputText value="http://www.google.com" /> '); /> I wan...

Are all "GET" requests to JSF "Initial Request"s?

Hi, In JSF 1.1, I am assuming that GET requests are treated as initial requests (resulting in the creation of a new view), and POST requests are treated as Postbacks (resulting in the restoration of the old view). However, my application is behaving differently - it restores the same old view even for GET requests. Why does this happen...

How can I convert one slide of a PowerPoint file to flash in jsf app (using javaSE/javaEE)?

I need to show the first slide of a PowerPoint presentation in my jsf app. It must look something like that: user upload the .ppt file to jsf app the app take the first slide and converts it to Flash user sees the converted slide in the separate (not as part of the another page) I suppose that I couldn't use any external converters b...

How to access string[] in xhtml page

I am having a simple string array in my bean as public String[] colors = new String[]{"red", "blue", "green"}; and trying to display these colors from my xhtml as <h:outputText value="#{myBean.colors[0]}"/> but I am getting a java.lang.NumberFormatException: For input string: "colors" java.lang.NumberFormatException: For i...

jsf 2.0 composite components - how to modify outer beans / attributes

Hello community, I am just learning JSF 2 and playing with simple custom components. Imagine an ajax enabled custom component with two inputText fields: ... <h:body> <composite:interface> <composite:attribute name="domId" required="true" /> <composite:attribute name="value" required="true" /> </composite:interface> <compo...

Facelets error page as the response has already been committed. jsf

Hello, I perform this redirect :- objExternalContext.redirect("http://blogger.blogdns.com:8080/Blogger/Common/LoginRequestProcessor.jsp;jsessionid=" + objHttpSession.getId() + "?j_username="+ userName + "&j_password=" + password + "&rememberMe=" + rememberMe); to page LoginRequestProcessor.jsp :- <%@page contentType="text/html" p...

JSF Templating without RAD

I have a set of jsp's based off a jtpl template. The template (jtpl file) looks like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <%-- tpl:metadata --%> <%-- jsf:codeBehind language="java" location="/JavaSource/pagecode/my.java" --%> <%-- /jsf:codeBehind --%> <%-- /tpl:metadata --%> <%@taglib uri="http://www.ibm...