jsf

PrimeFaces wizard component resets values in <h:select* /> components when form is submitted

I have the following selectManyCheckbox inside a p:wizard component: <p:wizard id="wizard"> <p:tab id="page1" > <h:selectManyCheckbox value="#{userController.user.roles}" layout="pageDirection" converter="securityRoleConverter"> <f:selectItems value="#{userController.rolesSelectMany}" /> </h:selectM...

jsf navigation from one outcome to diff viewId

Hi all! I need your help! I have a jsf app, which now have 2 versions - one for mobile and one for desktop browsers. The pages for desktop lie in folder /html, and for mobile - /html/mobile. I want one outcome decide what exactly pages to show - from /html or from /html/mobile. I create session attribute isMobileBrowser - which indicates...

Architecture of a Java EE web application

Hello! I want to realize the following scenario: The frontend is based on HTML5 / CSS3 / JavaScript (with a JavaScript framework like ExtJS or jQuery). I have full HTML pages with forms, buttons, text fields, which have submit buttons which should send the data to the webserver. On the other hand I also have a website in this web applic...

JSF - How to determine the current JSP page from inside backing bean action method

I have a JSF application containing two JSP pages that both display some of the same data from a session-scoped container object. Each page displays the data differently, each in a data table that varies between pages. This all works properly so far. My problem is that I have been cheating a bit with how I figure out what page was req...

JSP form parameters disappear when I POST my form to another page.

If I leave the action attribute out of my form so it posts back to the same JSP I have no trouble reading the request parameters. However when I add an action attribute to handle the form with a separate JSP, the request parameters are null. Here's a short example (FormTest.jsp) that illustrates how I'm reading the request. <HTML> ...

Dynamic locale switching in a JSF app?

I have an application where the user can dynamically switch between locales from the welcome page of my application. I see that the earlier developer (inherited the code without much documentation) has overridden the following three methods from ViewHandler and tells me that this is required for dynamic switching of the Locale...any help...

Data transfer between Servlet and JSP

I have a JSF/JSP page, a managed bean, and a separate file/class that extends HttpServlet with the doPost method. I have a separate test program that sends a xml object to the doPost method via a HttpURLConnection. What is wanted: Start the JSP page with temporary data (works). At a later time, send a new xml object to the doPost met...

how to choose JSF Bean Scope transfer data on one page with dialog ?

Hello All! i have one trouble with beanscope in one page i know if i want redisplay in one page i can use viewscope but now i want get value form datatable pass from dialog to dialog in one page and i use sessionscope. I can get this value but the first select the value not show, i must press f5 (refresh) page the value is show, i know i...

How to inactive the Tabs in Richfaces

Hi All, I am using jsf with Richfaces. I've created a tabpanel using <rich:tabpanel>. I have taken 4 tabs like tab1, tab2, tab3 and tab4. if I run the application tab1 is default one. If I go to next tab I use navigation for every tab like NEXT<< and PREV>> . If I click on a tab label, it is also changing the tabs. if I run the applic...

Can't define a event and bind an <a4j:support/> on this event at the same time

Hello, Let's consider this simple code: <h:form id="myForm"> <h:inputText id="myInput"> <a4j:support event="onchange" actionListener="#{myBean.doSomething}"/> </h:inputText> </h:form> this will generate the following HTML code: <input id="myForm:myInput" type="text" name="myForm:myInput" onchange="A4J.AJAX.Submit(......

How to develop application using facelets in XHTML by the Eclipse IDE?

I am using Eclipse ide, i am creating .xhtml pages using facelets and JSF, how can i configure my ide to work with facelets and JSF. i need get command help assistence for tags. Give me information regardig jars i need to include and how to configure? ...

How to do client side updates in JSF 2.0

I'd like to do client side component updates. Example: disable a button when a checkbox is clicked: <h:selectBooleanCheckbox value="true" onchange="button.disabled=true" /> <h:commandButton id="button" value="Save" /> The above doesn't work. Is there a way to do this declaratively in JSF? ...

Data flow between views in JSF 2

Hello. I'm currently building my first JSF 2 application and I have some questions regarding flow of data between views. Background The application keeps track of competences of IT-consultants. To illustrate my questions, I will just describe a small part of it. A Competence entity has a many-to-one relation to a Area entity, putting ...

Jsf ActionListener for custom security implementation

I've developed custom ActionListener: public class SecureActionListener extends ActionListenerImpl implements ActionListener { private ActionListener _delegate; public SecureActionListener(ActionListener delegate) { _delegate = delegate; } @Override public void processAction(ActionEvent actionEvent) { ...

How can I gracefully handle JSF application failures?

If my JSF applications, I'll sometimes come across a bug that, for example, corrupts a user session bean somewhere and the user is stuck looking @ a bunch of java exception gobbly-gook on their screen. The only way they can fix this is to restart their browser. Instead, I would like the application to handle something like this gracefu...

how to distinguish a jsf action or direct url link invoked the page

Hi, All I have a situation, I have a session bean with list, this list I show in html data table. When the user hits the url from browser or normal href, I have to show all records. There is provision to search for the data also, where I have to show the filtered list. Now after a user has made the search, the list contains filtered rec...

Advice on ASP.NET MVC to Java migration?

I'm an ASP.NET developer trying to learn Java web dev. I would like to migrate a small ASP.NET MVC site to Java. I have the ASP.NET code and the SQL Server database. I'm comfortable with Netbeans and Eclipse. I know the basics of servlets and JSPs. I'm wondering whether it would make sense to use a web framework instead of using JSP/...

How to access html components in JSF EL?

I want some code in facelet (jsf 2.0) to work: <h:inputText id="q" /> <h:button outcome="/search.xhtml?q=#{q.value}" /> but when I press the button, search page opens without any parameters. I think, my EL expression is wrong. Is it possible to access inputText value from EL expression? If not, how can I achieve the same function...

Is it true that you must not use any plain HTML in RichFaces? Why?

Can someone point to me or explain if this is true, you must not use plain any plain HTML tags in JSF or JSF libraries like RichFaces? We're using JSF 1.2, RichFaces 3.3.3 and Facelets on JBOSS server. Someone said to me that we must use only <rich:> or <f:> or <a4j:> and the components they offer. Reason being that the JSF component ...

JSF Handle served-side exception in browser with A4J

Can A4J handle a situation in which ajax call to a server ends with an exception? By handle I mean can it for instance present user with a dialog box stating that an exception has occured? The default behaviour of A4J in presence of a server side exception is to just do nothing which is somewhat misleading. ...