jsf

adf - howto modify components in tree?

From the jsf 1.2 revB mrel2 spec: bottom of page 65 ■ It must be possible for the application to programmatically modify the component tree at any time during the request processing lifecycle (except during the rendering of the view) and have the system behave as expected. For example, the following must be permitted. Modification of th...

JSF, refresh problem when getting the url parameter from backing-bean

In my JSF project I have two pages, Page1 and Page2. And a backing-bean called Page2_backing. Page1: <html id="outputHtml1"> <head id="outputHead1"> <ice:outputStyle id="outputStyle1" href="./resources/stylesheet.css"/> <ice:outputStyle id="outputStyle2" href="./xmlhttp/css/xp/xp.css"...

jsf - how to pre-check selectmanycheckbox items?

I have a JSF page where I am need to pre-check one of the checkboxes on the page, when it is first loaded. How would I go about doing this? I know I can bind the control to the backing bean but at what point would I set the values to populate the selectmany item? My page contains:- <h:selectManyCheckbox disabledClass="selectManyCheckb...

JSF Link Parameter get null

I have a page with link http://localhost:8080/Test/Page.faces?id=asdasdasd The page got 2 text field and one button, after user key in the details and click submit, it works well when you first time click the submit button, the id will return me the exact value, but if the user never enter the value and click submit the validation will ...

Why won't my Facelets loop variable go out of scope?

Hi! I know this looks like a lot of text, but I think it's a pretty simple concept I'm missing. I'm writing a web application with Facelets. I've got a custom tag rq:request-list that takes a list of requests as a parameter and outputs a lovely table to display them. So far, so good. rq:request-list starts out like you'd expect: <!--...

Spring and JSF and JPA

I'm integrating these in a basic web application, being deployed in Glassfish. Upon startup, the error I am getting is: nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;) The closest solution I can find has something to do w...

Add message from methode in JSF.

I have request scope backing bean for login page( I am using Spring Security ). When authentication error occurs Spring put it to context and I am trying add error message to my page. public void doLogin() throws IOException { final FacesContext context = FacesContext.getCurrentInstance(); ExternalContext externalContext = conte...

Backing bean scopes. How they works?

I have some misunderstanding with JSF backing bean scope. I am newbie in JSF and now write simple project and all my beans mostly have session scope. But if my site will have many users that's mean my session will be very very big and this kill my server. Some people said my that solution is use request scope beans. But, for example, whe...

rich:orderingList usage example

Hi there, can anyone provide me with an example of how to use th rich:orderingList control? I've gotten to the point where I'm able to display the data as I wanted but now I'd actually like to have the modified order propagated to server. I can't find anything on that subject. <rich:orderingList value="#{countryHandler.data}" var="coun...

Invoke Rich Modal Panel Onclick

Hi, I am using the following code for displaying dynamic image in rich DataTable. Onclick of the thumbnail I need to display Full Image fetched from different location. But the second a4j:mediaOutput tag is fetching all the Full images and keeping in memory. (Ofcourse modalPanel is displayed on click only ) I want the second a4j:mediaO...

invoke a4j:mediaOutput onclick

How do I invoke a4j:mediaOutput to fetch image only after click ? ...

How to create a InputText Tag File with a value attribute and a backing bean?

I want to create a Tag (Source) File to get a custom tag in facelets (as described here). I want it to get used like this: <my:inputText value="#{myBean.someString}"/> <my:inputText inputText="#{myBean.inputText}"/> In the first case, one could bind it to a simple String property within my bean. In the second case myBean should provid...

Calling EJB3 from a Faces BackingBean

I have a simple web application, packed as an EAR, deployed on Glassfish. The EAR has a web module and an EJB module. The web module has a faces page, and a ManagedBean. The Faces page only has a button on it, and the button is tied to a method in the ManagedBean, and clicking the button does indeed fire the method. The managed bean: p...

How to disable <rich:inplaceInput> ?

There is some way to disable ? I want allow or not allow user to edit data. Maybe I need other component? ...

displaying errors in jsf fragment with <t:message> tag

I was just wondering if I could display errors on a separate jsp fragment. I have a requirement where I have to display hyperlink errors (i.e clicking any error would focus to respective input field) For example, if I have a form and there are 20 fields, then I am suppose to use 20 times <t:message> tag. I know I can use single <t:mess...

Validation for selected row in JSF h:datatable

Hi all, I am having a tough time trying to find a solution to the following design related to h:dataTable. I have certain number of rows predisplayed. The first column is only checkboxes. The rest of the columns are disabled by default. On selecting a checkbox the elements in the corresponding rows get enabled. On submit of the for th...

Breaking up radio buttons into columns in JSF

Hi When I am using h:selectOneRadio and supplying the list of values in a list as the entire radio button section is exposed as a single unbroken list. I need to arrange it in 3 columns. I have tried giving <h:panelGrid id="radioGrid" columns="3"> <h:selectOneRadio id="radio1" value="#{bean.var}"> <f:selectItems id="rval" value="#...

Css Style change with JSF Validation

Hi All, I am working on a requirement to highlight fields that have failed in red after JSF server side validation. No javascript can be used for validation. Is there a method to link server side validation with css style changes? ...

Resolving facelets components at runtime

Hello, do you know a way to select a different facelets component at runtime? I've got some of code similar to this: <s:fragment rendered="#{r== 'case1'}"> <div> <ui:include src="case1.xhtml" /> </div> </s:fragment> <s:fragment rendered="#{r== 'case2'}"> <div> <ui:include src="case2.xhtml" /> ...

Multiple messages for single JSF Validator

Hi all, I have run into a blocking scenario and need help. The problem is basically this: There is a field on the page which is attached to a validator. This validator in turn validates other fields in particular relation and should throw error messages for all the related fields that have failed validation. So basically I want a sin...