value « Component « JSF Q&A

32.Web Service
JSF Q&A » Component » value 

1. How do i retrieve a JSF component value by using EL?

Before going on, see this question Its JSF form is shown again as follows


2. How do i validate two component's value are same or not? JSF

As we have comparevalidator in Asp.Net, what do we have in JSF to validate whether two field's value are same or not? I want to validate password and confirmPassword field.

3. JSF table component with high demo value

As part of an ongoing quest for a nice web demo in a couple of weeks we now have a list of customers where we are considering presenting an HTML table ...

4. JSF - Binding values of components added dynamically

I want to implement something like this using JSF.(part of search screen)alt text More and more new rows will be added dynamically onclick of "+" button and the row will ...

5. JSF 2 UIRepeat. When my composite component is nested in a repeat I can access a valueExpression but not its value?

I declare my repeater in a form (lets say in main.xhtml):

<!--<itemRenderer:MetaFieldRenderer item="{kueditmeta.metaFieldFirst}" >
    <ui:repeat var="foo" value="#{kueditmeta.metaFields}"  >

6. How to pass the node value as the attribute in Composite Component in JSF 2.0

I am developing a JSF 2.0 composite component. I am trying to create a box component to which my required HTML will be set as attribute. Some thing like..


7. Custom component user object value

I want to create a custom component in JSF2 (kind of improve outputLink), is it possible to use custom user object in the attribute?

<my:cLink param="#{bean.userObject}" />

private MyUserClass userObject
Do you know tutorial ...

8. hide component, then show it, values are not saved

I have a JSF 2.0 web app with ajaxified tabs. To switch tabs I show one and hide the others (Either with a conditional render="#{x==y}" or with with display:none/block through conditional styleClass`ing. In ...

9. Component value binding (setter getter) with parameter[s]?

Im using tomcat7, primefaces 2.2.1, jsf impl 2.0.4-b09 I would like to know whether it's possible to have value binding, but with parameters ?

  id="#{}" label="#{cc.attrs.label}"
Notice ...

10. How to insert special characters like & and < into JSF components' value attribute ?

How to insert special characters like & and < into JSF components value attribute ? For example: I want something like this:

  <h:outputText value="Tom & Jerry Show" />
When I try ...

11. How to access Composite Component attribute values in the backing UIComponent?

We can access the Composite Component attribute values (defiled in the interface section), in the implimentation like #{cc.attrs.attributeName} How can we access this value in the backing component?

12. Persisting JSF2 Composite Component value

I have a datatable which loops through a List and has a value column which renders as such:

<h:dataTable var="assessmentFieldValue" value="#{assessmentBean.assessmentFieldValues}">
    <ui:fragment rendered="#{assessmentFieldValue.field.type eq 'TEXT'}">

13. UIInput values inside cc:insertChildren are not redisplayed after validation failure

Update: Updated once more now. I think my previous analysis was wrong, because I have now been able to create an example for this. It appears to be related to composite ...

14. How to access component value programmatically

Lets assume I want to access the value of a sibling component in an ActionListener. The following fragment is not working as expected, resulting in a ClassCastException: java.util.HashSet cannot be cast ...

15. JSF. How to get the value of a necessary component using its id in a custom validator?

I use a custom validator. The difficulty is that I just need to check two fields inputText and compare them. The first field must be greater than the second field. If ...

16. How to extend UISelectOne component for enum property to automatically populate all enum values as select items?

I want to use simplified select one tag, which would generate select items list for enums automatically. So, the result would be:

<s:enumSelectOneMenu value="#{myBean.enumValue}"/>
So, inside the component I can get the enum ...

17. How to validate that a value is entered in at least one of the components?

In my JSF application I have two <h:inputText> components. I need to make sure that value is entered in at least one of them. How can I implement such a validator? I ...

18. Enum values in Composite Component attribute

My issue is quite simple : I want to create a composite component with a String attribute, Type. <cc:attribute name="type" /> This attribute will have 3 acceptable values, [TYPE1, TYPE2, TYPE3] Is it ...

20. Why is value not part of a component's state?

Hi, A very fundamental question about JSF. I was expecting the value to be a part of the component's saved state, but apparently it's not. So my question is - why is value not considered as a part of the state of a UI Component? Let me illustrate with an example I have: And I've deliberately declared ...

21. JSF Component to move values from one list box to another

Hi All, Can anyone please tell me if there is any JSF Control (component) which can be used to move the values from one list box to another? The idea is that you would have list of available values in one list box. And in the other list box,we can bring in the values from the former one. These values would ...

22. component doesnt remeber value

23. Backing method should be called before the value set in the databean for UI Component

Hi, I am having one h:selectOneMenu which is having three items. As the value changes, i want to call a Backing bean method before it set to the databean. Accordingly that, i want to set other data. Which attribute will be required to call the backing bean method? Can somebody help me in this.

29. Change values on dynamic generated components

Hi, Im new in JSF and get the task to create a Chat based on JSF 1.2 and the RichFaces framework. Now I get a problem with the buddy administration. The idea is to use a PanelMenu. Later, each PanelMenuItem should contain one buddy. In addition, the chat users are able to change their status e.g. available, incognito Before I try ...

37. set value in a composite component

My scenario is that once a user types in a SSN and clicks on Search, I should display all matching SSN results in a masked pattern. And once the user has selected an SSN , I should disply the SSN all across the application in a masked pattern ( 123-XX-XXX). Since this is something that is quite repetetive I thought I ...

39. JSF AJAX rerenders outputText component but EL value ends up stale in javascript function

Using JSF 2.0 AJAX functionality to rerender some components and it works great. Here's the code:

The actionListener add function updates productInstances.newObjectId and when my commandButton is clicked, the newObjectId outputText shows the new value as expected through ...  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.