jsf

How to pass a action string into a JSF 2 composite component?

I'm creating a simple menuing composite component in JSF 2. However, I am unable to pass a String attribute into the composite component to use in the action attribute of the <h:commandLink>. My component looks like: <composite:interface> <composite:attribute name="title" required="true" type="java.lang.String"/> <composite:at...

JSF form does not get submitted when form is disabled by JavaScript

This is the submit button: <h:commandButton actionListener="#{regBean.findReg}" action="#{regBean.navigate}" value="Search" /> This is the form: <h:form onsubmit="this.disabled=true;busyProcess();return true;"> If the submit button is pressed, the page shows a "busy" icon until request is processed. The problem is, the f...

What are the principles of developing web-applications with action-based java frameworks?

Background I'm going to develop a new web-application with java. It's not very big or very complex and I have enough time until it'll "officially" start. I have some JSF/Facelets development background (about half a year). And I also have some expirience with JSP+JSTL. In self-educational purpose (and also in order to find the best...

Using h:outputFormat to message-format the f:selectItems of a h:selectOneRadio

I am having some trouble with using h:selectOneRadio. I have a list of objects which is being returned which needs to be displayed. I am trying something like this: <h:selectOneRadio id="selectPlan" layout="pageDirection"> <f:selectItems value="#{detailsHandler.planList}" /> </h:selectOneRadio> and planList is a List of Plans. Pla...

Why does my JSF + Spring web application output JSF source code instead of interpreted HTML page?

I'm new to both JSF and Spring Framework and I'm trying to figure out how to make them work together. My current problem is that application outputs my JSF files without interpreting them. Here are some snippets of my code which I believe might be relevant: dispatcher-servlet.xml <bean id="urlMapping" class="org.springframework.web.se...

onload script does not work in subview page in JSF

I have written two JSP pages: outerPage.jsp and innerPage.jsp. The outerPage.jsp includes innerPage.jsp. The innerPage.jsp has one textfield and one button. I need to set focus on textFiled in innerPage.jsp while the page loads. I wrote JavaScript which is called during body onload of outerPage.jsp, but it does not work. Here is the ou...

Reference the oncomplete event by an external java script function

Hi , I want to do some logic at the oncomplete attribute of the a4j:commandButton ,but my logic is too complicated , can I reference the code using a java script functions located in a external java-script file to have a better maintenance ? I found it has error because the JavaScript file cannot understand the EL expression . For exa...

JSF session issue

I have got a situation where I have list of records say 10,000, I am using datatable and I am using paging,(10 records per display). I wanted to put put that list in the session as: facesContext........put("mylist", mylist); And in the getters of the mylist, I have public List<MyClass> getMyList() { if(mylist== null){ my...

JSF 2 Content Controller (pull in content based on URI)

Hey All, I'm new to JSF and am trying to make a content controller. Basically whenever someone makes a request to www.myapp.com/external/** I'd like to forward to a controller that pulls external content into a page template and spits it out to the user. For example /external/test/test.html might pull in content from a location XXYYZZ...

JSF Managed Property question

I have a search page that I'll called "Parent." The search page references a country lookup page that I'll call "Child." When the user selects a country on Child's page and clicks on OK, I set the country back into the parent page. I do this by calling a method on the Parent page called "UpdateCountryCodeWithLookupValue(Child child)" ...

Accessing selected node of richfaces tree from Javascript

Hello This should be a very simple question. I have a richfaces tree that is rendered using JSF. When the user clicks on a node I want a javascript function to run. Nothing more nothing less. No redirects, no re-submit, no-rerender, no Ajax. Just plain old Javascript. I have seen the onselected attribute of the tree and it indeed fires...

JSF: How to get the selected item from selectOneMenu if its rendering is dynamic?

At my view I have two menus that I want to make dependent, namely, if first menu holds values "render second menu" and "don't render second menu", I want second menu to be rendered only if user selects "render second menu" option in the first menu. After second menu renders at the same page as the first one, user has to select current it...

Why does the JSF action tag handler in JSP invoke rendering immediately after creation?

Dear fellows, I read the article "Improving JSF by Dumping JSP" from Hans Bergsten. There I read the following: The JSP container processes the page and invokes the JSF action tag handlers as they are encountered. A JSF tag handler looks for the JSF component it represents in the component tree. If it can't find the component, it c...

What web UI framework is most suitable for building dynamic pages / forms?

Hello, We are at a stage where we are considering different Web UI frameworks (most likely component based ones such as GWT, JSF, Wicket, Vaadin, etc). One of the main use cases / constraints is that it must support generating dynamic pages. I.e., the page/form layout and components is stored in a database and is changeable at runtime,...

jsf seam and java cms

Hi, Is there any good java cms compatible with jsf seam ? Regards ...

Assign a unique client ID to each <rich:dataTable /> row?

I'm relatively new to working with the UI in Seam, so I'm hoping there is something simple I can replace the three instances of UNIQUE_ID with in the following example. The goal is to have a <rich:dataTable /> wherein each row has the ability to show/hide a <rich:modalPanel /> with more details about the particular object instance. <ri...

URL getRequestParameterMap not working

I'm using IceFaces 1.8.2 and trying to get a parameter from the URL using: ((HttpServletRequest) FacesContext.getCurrentInstance() .getExternalContext().getRequest()).getParameter(name); This works fine on the inital request. However, when I do a partialSubmit on a component, it stops working. I'm assuming that its to do with how...

Printing the contents of a <rich:modalPanel />?

Attempting to print the contents of a <rich:modalPanel /> in my application results in a complete mess on the printed page. The complete HTML underlying the <rich:modalPanel /> appears on the printed page, but completely faded out (as it sort of appears on screen). And somewhere on that page, is the <rich:modalPanel /> content itself - ...

JSF 2.0: use Enum values for selectOneMenu

I'm using JSF 2.0 and want to fill a selectOneMenu with the values of my Enum. A simple example: // Sample Enum public enum Gender { MALE("Male"), FEMALE("Female"); private final String label; private Gender(String label) { this.label = label; } public String getLabel() { return this.label; } } Unfortunately, ...

JSF Deferred EL conditional syntax problem

Hello I can't find any resources which can answer why I'm getting an error with this: oncomplete="#{MyBacking.oError ? #{rich:component('oErrorPanel')}.show() : return false;}" in a richfaces a4j:commandButton. oError is referring to a method in my bean called isOError. I'm getting the error SEVERE: Servlet.service() for servlet F...