inputText « Control « JSF Q&A

32.Web Service
JSF Q&A » Control » inputText 

1. JSF inputText and inputSecret differ in size

again just a short one: I've done a login page in JSF which contains an inputText for the username and a inputSecret for the password. Size is set to 20 for both. FF manages ...

2. Setting focus to a JSF inputtext

I need to direct the input focus to a specific inputtext component upon loading the page (to allow entering a value using a barcode scanner). In plain HTML I would add a ...

3. Correct way to manage multiple h:inputText?

I've an h:dataTable to display my item information (in my case a customer support request) and for each row I'd like to put an h:inputText and h:commandButton to add a comment ...

4. jsf h:inputText and Double value

I use:

<h:inputText id="costsPerPallet" value="#{globalReportSelectionForm.palletCost}" size="5">
   <f:convertNumber pattern="0.00"/>
palletCost is a Double; When entering a value of "1.00" and submit it is fine. When I enter "1" and submit I get the error:
java.lang.ClassCastException: ...

5. JSF ui:repeat and f:ajax giving wrong value for h:inputText after rerender

I have a list of questions and I can display them ok using a ui:repeat, but after clicking the Edit button the rerendered inputText is given the wrong For some ...

6. jsf : setfocus to inputText on pageload

I want to set focus on inputText field in JSF on page load. How can I implement this?

7. Default value for h:inputText

Imagine a text box, bound to a ManagedBean:

<h:inputText id="name" value="#{}"/>
I would like to default the field to a value. I know I can set the value in the ManagedBean at construction time, ...

8. How to add dynamically in JSF?

I my application I want to add more dynamically for ex: my application asks to input city and provides one but is the user wants to add more cities, ...

9. JSF 2.0 h:inputText inside ui:repeat

How I should change following example that after changes values in inputText not disappears after commandButton was submitted? I'm understanding why it happens, but I don't know how to fix it.


10. Entering double value through h:inputText

I am getting double input value through h:inputText component.

<h:inputText value="#{bean.testValue}" />
And the bean is
class Bean{
private Double testValue;

    public Double getTestValue() {

11. Make a h:inputText required only when the checkbox is selected

I have a datatable with rows containing some input text fields that are required. Each row also has a check box called delete. I want to have the required = true ...

13. JSF disappears in case is blank

I have a problem with <h:outputLabel> component. I have the following code:

<h:outputLabel styleClass="desc" value="" for="component_id" />
<h:inputText styleClass="text medium" id="component_id"

14. How can I make h:inputText appear only after button clicked in JSF2.0?

In jSF2.0 How can I make an h:inputText appear only after a specific button is clicked? I want the h:inputText be hidden, and only appear after I click a button

15. How apply CSS on a ?

I'm trying to apply CSS to my <h:inputText> but without success so far :

<h:form id="contactform">
    <h:panelGrid columns="3">
        <h:outputLabel for="name">Name</h:outputLabel>

16. InputText value null when disabled is true

I have an inputText on my JSF page and a JavaScript calendar popup is attached to it. Conditionally I'm setting the inputText disabled property to true and false. When I set disabled = ...

17. Hiding a t:graphicImage based on h:inputText disabled value

I have an input text field (h:inputText) for user to enter date and a image link next to it (t:graphic) which is a popup calendar. I am able to disable the ...

18. Avoid default long value of 0 to display in h:inputText

I have a <h:inputText> which accepts a long value like this

<h:inputText value="#{ServiceTable.ID}" />
The property is declared like this
public class ServiceTable {

    private long ID;

    // ...

19. inputText, javascript

21. mapping double value to inputText

Hi Rajeev, JSF has nothing to do with it. You will have to write some logic for it. You can just pass a parameter names "success=true" to the jsp after submitting the form. And in your jsp just do like this <% if(request.getParameter("success")!=null { %> <% } else { %> <%}%> i ...

23. variable number of inputText elements

24. jsf ajax rerender inputText

Hi, I have a selection list and detail inputText elements which should be populated according to the selection. But unfortunately I cannot manage to populate an inputText field upon selection. The backing bean is working fine, because if I change from inputText to outputText it works. What am I doing wrong? Are inputText fields not rerenderable? Following are some code extracts: ...

25. t:inputtext problem

26. tr:inputText Problem

27. inputtext Valuchangelistener ISSUE

28. onblur ignored for h:inputText

Since JSF 1.2_05 an optimization in the HTML renderer regarding to the standard HTML attributes was introduced where the responsible renderer was moved from the IMPL to the API. If the right version of the API isn't present, then the those HTML attributes (all on* attributes and a few more) won't be rendered. Thus, it look like that your classpath is ...

31. cant get value from inputText

33. Enable dynamic inputText

Hi every body , I have created 3 radiobuttons and 3 inputText fields in a panel grid , they are divided in two separate columns .All text fields are initially disabled.When user click one radio button (say radio1) the corresponding text field (say inputText1) will get enabled .Again if radio2 is clicked then inputText2 will become enabled. My problem is I ...

34. InputText event handling problem

36. h:inputText redisplay

37. Loosing focus on a inputText box?

Hi Everybody ! I am loosing the focus of the Text box when i tabbed out from one text box to another. I had a code like this, In the above code, while i am tabbing out from first filed to second field, i am ...

38. inputText customized behaviour (newbie)

39. onblur is not called in inputText ...please help me if any body had same situation or aware of issue

Thanks for your reply Srini. well, i have a requirement where user enter value in inputText and when looses focus from it it should call a method(server side call) where i inluded code to gerente list of records from xml file based on input entered entered by the user in inputText field. yes as i have limited knowledge in JSF, please ...

40. Having trouble calling functions in js from jsf inputtext onclick

Hello, I am using a to capture a userid, and the default text in the window is UserID So what I was trying to do is use the onclick="myjavascriptfunction();" to call a function to clear the default text. I have not gotten to the point where i can test out the code to do this. because I cannot ...

41. Replacing inputText with buttons

42. changing value of inputtext boxes

44. Problem with Inputtext renderer

45. Clearing h:inputText value

46. disabled issue for inputtext

Hi, even I faced the same problem with inputtext disabled property. to overcome this problem I duplicated the variables in the jspx file -- one which is visible are disabled and to have mapping with the backingbean same variable duplicated but hidden in the code, so even the inputtext is disabled the hidden variable will have mapping with the backingbean. I ...

49. Setting the cliendID of an h:inputText

Hello, I would like for my rendered tag to have the "name" attribute explicitly set to some value for example: "email" without any colon of course. I understand the clientID is rendered as the "name" attribute. My question is then: how do I set the clientID of my inputText (preferably from the facelets code)? Thanks in advance for your help, ...

50. Issue with h:inputText

Hi All, I am writing following lines of code to render the input text in my xhtml file : Here label is coming but text box is not getting rendered on screen. When i am removing binding attribute text ...

51. cursor defaults to inputtext box

52.  how to execute JAVA method on blur?

55. How to save inputText value to a file

57. Hour check in an inputText

Hi everybody, I have an inputText where the user must insert an hour in the format HH:mm (so with the hours within 00 and 23, not AM-PM). I've tried two ways to check what the user enters: 1) Using convertDateTime: It works for the checks on the ...

58. Regarding inputText in JSF  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.