jsf

JSF + Spring + JPA + Hibernate: keep entitymanager alive when rendering view?

Totally new to Spring & Java development but working on a project for a class with some experienced developers. I believe we're using Spring MVC as our web layer(but I'm a C# guy so I may be mistaken in that regard). We have a view that gets an object with lazily loaded properties -- pretty straightforward stuff. Yet when I call one o...

Regarding JSF Expression Language

Hi, I noticed this behaviour of JSF EL. 1. <h:panelGroup rendered="#{!admissionBean.requestStatus=='PR'}"> ..some buttons without rendered attribute </h:panelGroup> 2. <h:inputText size="6" value="#{dimension.newWeight}" disabled="#{admissionBean.requestStatus=='PR'}"></h:inputText> 1 is not rendered. 2. text box is not disabled. ...

To open different links using window.open()

I have a dataTable in which one of the columns contains URLs. On click of those links I have to open respective link in a new page. I am using window.open() to open those links. It's opening a new window but not displaying the page. The javascript code I am using is: function openDisclaimer(objectId) { var disclaimerID = objectId.id; va...

How to emulate request scope behavior in session scope bean?

In my jsf application I have a button for sending mail. And each time it clicked I want to show message that mail was or wasn't sent. This is a typical request-scope functionality. But the problem is that I have 1 backing bean with session scope now. And all data is in this bean. And method 'send' referred by action attribute of the b...

JSF link in SelectItem label

Is it possible to set a <a href />around my <f:selectItem itemLabel="label" /> where my link text is the itemLabel? I'm using the plain sun components. ...

In JSF, What is the best way to prevent Form tampering?

We are using JSF 1.x with server-side state saving turned on. We have an issue where a malicious user, implemented as a web-bot, can submit a page w/o submitting all fields that are expected to be in the form. This results in some validators not being called that should be called, etc. We would like to prevent users from being able to ...

JSF rich:dataList rendered per row?

Hey, Seems like this should be possible but ...? Using richfaces and JSF I'm iterating over a List using rich:dataList ... all is fine except I'd like the ability to selectively 'render' each iteration, is that possible? For example: <rich:dataList value="#{list}" var="item"> <h:outputText value="#{item.something}" /> </rich:dataL...

How to access javascript value in a4j

Hi there. I need to set a Bean value with one javascript return value. Something like: <script type="text/javascript"> function getUserId(){ return 4; } </script> <h:inputText name="lala" value="getUserId()"/> Thanks ...

Netbeans 6.8 Facelets custom componentes autocompletion

I can create and use facelets custom components with netbeans. The steps I followed are: Create a Facelets tag library (mytaglib.xml). Declare the tag library in web.xml (javax.faces.FACELETS_LIBRARIES) Import the tagfile using namespace (xmlns:rde="http://test.com/mytaglib"). But I can not define the metadata of my custom components...

Does rich:messages tag need to be in an a4j:region?

The web app I'm working on sometimes has a <rich:messages> tag inside of an <a4j:region> tag, sometimes not. I'm guessing that the messages tag needs to be inside of an a4j region, but wasn't able to determine this from the RichFaces documentation. Any thoughts? Thanks in advance. ...

How to display the appropriate message (info or warn) in s:decorate?

I am actually checking for availability of a login name and would like to show the info image or warn image with an appropriate message. Currently we get 2 error messages on non availability of a login name. <s:decorate id="loginIdField" template="/layout/edit.xhtml"> <ui:define name="label">Desired Login Na...

newbie JSF question - How to achieve this layout?

Hi, I'm trying to achieve the layout shown here Each of the panels should be linked to a backing bean from which I will later add differrent components according to context. I tried using panelgrid but could not achieve this look. I would prefer to use just JSF for this but if impossible or too complicated RichFaces is ok too. Thanks...

Richfaces 3.3.2 - JSF 1.2 - Facelets in RAD 7.5 and IBM WAS 7.0

Hello, I'd like to know which is the best way to use JBoss richFaces (3.3.2) with SUN RI jsf implementation (1.2) under RAD 7.5 and WAS 7.0, with facelets. We inverted class loader policy at the application level to obtain this, but I'm not sure this is the best way to do it (parent last policy could be potentially harmful). Thank you ...

How to properly declare in a JSF page that an object is present in the sesion object with a given type?

I have a legacy JSF 1.0 application (using JSP, not facelets) which I have now migrated from MyEclipse to Eclipse 3.5 JEE, and I get a lot of errors from code similar to the following: <f:view locale="#{foo.connection.langLocale}"> where the problem is that "foo" is explicitly inserted in the session object from Java code, and not inj...

validate input field in jsf datatable

I have input field in jsf datatable which i am validating and adding error message but error message doesn't get displayed. What is the best approach in validating input field in jsf datatable and adding message. <h:inputTextarea id="textarea1" styleClass="inputTextarea" value="#{varreviewList.comment}"> <f:attribute name="msgRef" valu...

Example of Visio + Architechture of JSF application

Hi I was asked to display the tech design of my JSF application with Visio. Anyone has an example of uml Visio Diagram for that? ...

Error accessing a property from a sub class in JSF

Hi all, While accessing a property from a sub class in JSF, it fails with the error below: javax.el.PropertyNotFoundException: /grouptable/Create.xhtml @19,281 value="#{grouptableController.selected.grouptablePK.groupid}": Target Unreachable, 'null' returned null at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpressio...

Concatenate strings in JSF/JSP EL and Javascript

Hello, I'm having troubles with EL and javascript functions (JSF 1.2, Facelets, Richfaces 3.3.0GA). I have a page that includes another composition: <ui:include src="/pages/panels/examinationPanel.xhtml"> <ui:param name="prefix" value="new" /> And in my ui:composition I want to append the prefix to every id. For example: <rich:modalP...

In html/JSF - How to make any component respond to clicks?

Hi, I've replaced the content of this question since I didn't think the previous one was formulated right. I would like to know how to make a JSF/RichFaces component handle events like mouse click/hover etc... The goal is to create nice big buttons that respond to mouse hover and mouse click. Thank you!! ...

JSF a4j:commandButton not working when 'disabled' is set

Hello, When I include a 'disabled' attribute on an a4j:commandButton, the button's action is not performed. Taking the 'disabled' attribute out causes it to work properly. I am not doing any special validation (that I'm aware of) and am not seeing any validation error messages. Here is part of my page: <t:dataTable id="myTable" ...