jsf

facelet composition control (custom tag) with binding

I'm having problems with creating a Facelet Composition Control (= custom tag). That's the component's template (numberinput.jspx). I declared the in my custom-taglib.xml. So far the inclusion works using this code: <ft:numberInput nullablenumber="true" cid="myId" bind="#{myBean.mySpecialComponent}" ...

Grails with GSP or JSF.

I am thinking of learning java web applications preferably grails but I like jsf as well especially primefaces. However currently I've not being able to successfully use grails with jsf 2+, if I can do that, that's all I need. Thus I would the experts out there those who know both technologies I mean and not a flame war, point out to me ...

JSF - Binding values of components added dynamically

I want to implement something like this using JSF.(part of search screen) More and more new rows will be added dynamically onclick of "+" button and the row will be removed on click of "-" button. The question is about binding the values (user input in those dynamically created rows) to the backing model. I have created a session scope...

How to change the input to uppercase as it is being typed

I am using onkeyup="this.value=this.value.toUpperCase();"to change input text value in uppercase. This is working but my need is to change a single letter in input box without using mouse event. If i use left arrow key to move cursor backward onkeyup event gets triggered and the cursor moves to end. How do I modify this script, so that I...

JSF2 ManagedBeans Lifecycle

Hey guys, I have a basic question about JSF and their ManagedBeans. Imagine we have set a ManagedBean that only contains data for and from my view: @ManagedBean(name = "dataBean") @SessionScoped public class DataBean { Next here is my controller with a dependency injection to connect controller with model: @ManagedBean @RequestScope...

JSF valueChangeListener reacting only on second try?

Hello all, I have JSF page has two drop down lists and I want to load the second one with values based on what was chosen in the first one. However, the "onchange" event is only detected the second time I change the selection! Web page Code snippet: <h:form id="selectRegion"> <h:selectOneMenu id="governorate" value="#...

JSF2 ignores Action attribut

Hey folks, my xhtml code: <h:commandLink action="#{detailController.updateProject}" class="positive" > <h:graphicImage library="img" name="tick.png" alt=""/> <h:outputText value="Save" /> </h:commandLink> This action (updateProject()) is not being called from JSF framework! Even if I delete it in the managedBean there is no except...

Keeping current JSF pagination state when going to another page and coming back to the page that contains the paginator

Hi. I'm using the Tomahawk t:dataScroller for pagination. It is working really well. There is only one issue that I'll try to explain: Page A contains the t:dataTable, which is paginated with the t:dataScroller. There are links in the dataTable that can redirect me to another page, say page B. When I go back from B to A, the state of t...

How to use ExternalContext.redirect() in JSF2.0?

Consider a page webapp/myPage.xhtml: ... <h:form id="myForm"> ... <h:selectOneMenu id="..." required="true" value="#{myController.aValue}"> <f:selectItems value="#{...}" var="..." itemValue="#{...}" itemLabel="#{...}"/> </h:selectOneMenu> ... <h:commandButton value="Go for it!" action="#{myController.goForIt(....

JSF preload list for datatable in page

I'm using EJB and JSF. I made a jsp simple page with a button "get list". When it's clicked, a managed bean method is called that sets the list, which is then displayed in the jsp with the dataTable tag. The question is, how can I pre load this list/dataTable on page load without having to click the button? This is the method that's ca...

JSF: weird behavior when clear inputTextArea with ajax

Here is what I have <h:inputTextarea id="comment" rows="3" cols="50" value="#{bean.comment}" /><br/> <p:commandButton value="Comment" actionListener="#{bean.postMessage}" update="comment"/> so postMessage() persist data, then set the the value of comment to empty like this comment.setComment(""); Work great. When I press the button...

panelGroup mess up my layout.

I have standard page layout: header + 2 blocks (left and right). Code are below <h:panelGroup rendered="#{false}"> <div id="center_header"> <h:outputText value="#{ScholarActiveHub.selectedGroup.groupName}"/> </div> <div id="center_left"> </div> <div id="center_right"> <h:dataTable value="#{Schol...

Page loading bar in JSF?

Is there a way to make a progess/loading bar while a JSF page is loading (something like the thing google has when you're loggin into gmail, the thin bar in the top left hand corner)? ...

Rendering Problem in IE8 with richFaces and JSF empty text node

I have a form of the following type: <rich:dataList var="var" value="#{bean}" styleClass="styleClass"><h:form> <h:commandLink value="#{var.prop}" action="#{bean.action}"> <a4j:actionparam name="var" value="#{var.id}" assignTo="#{bea.sel}" /> </h:commandLink> Now, this is all fine in Firefox and IE 7. However, in IE 8 it cre...

h:messages gives no output

Hello, I'm learning about bean validation. I have created simple form with username and password input fields which are bound through backing bean to model (User) properties username and password. I have marked them with annotation: @Id @NotNull(message="Username cannot be empty") private String username; @NotNull(message="Password can...

Problem passing boolean value from rich:ComponentControl in order to render rich:menuItems

We have the following rich:ComponentControl: <rich:componentControl event="onRowClick" for="ctxMenu" operation="show"> <f:param value="#{item.hasDocuments}" name="hasDocuments" /> </rich:componentControl> The value of #{item.hasDocuments} is being successfully passed from the bean as either true or false. Here's the contextMenu which...

How to merge cells (colspan) using jsf h:panelGrid?

Hello, Suppose I want display table: +--------------------------------+ | | | | ---------------------------------- | | | ---------------------------------- | | | ---------------------------------- | | | | --------------------...

Retrieve rendered output within same page

I have a page that is rendered correctly. On this page I have a button and I wish to save a selection of the page as html when the user click on the button. I saw in MyFaces and Tomahawk that they added the tag Buffer that allows you to render into a buffer, does anyone know of anything similar for standard JSF? ...

Is it possible to run MyFaces as OSGi Bundle with Equinox?

Hi all, i try to run JSF (MyFaces) Application as OSGi Bundle (Spring DM and Equinox).Is it possible at all? Are there any web resources with some examples? Thanx in advance ...

PropertyNotFoundException: Target Unreachable, 'null' returned null

Hello i have new Problem with Add Form my problem here WARNING: /test.xhtml @24,173 value="#{userController.users.username}": Target Unreachable, 'null' returned null javax.el.PropertyNotFoundException: /test.xhtml @24,173 value="#{userController.users.username}": Target Unreachable, 'null' returned null at com.sun.faces.face...