Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Access TextItem value in a DynamicForm

    Hi,

    I'd like to put a TextItem field on a dynamicForm which will contain default values (which can be overrided by the user).

    At the of certains actions (Click on a button for an exemple), I'd like to retrieve the stuff which is in the textItem. I don't find a method which do that.
    <<
    final TextItem apiUrl = new TextItem("txtApiUrl");
    apiUrl.setValue("http://localhost:8080/workey-j2ee-api/");
    ...
    >>

    I've tried apiUrl.getValue() & getValueName() but it always returns blank value.

    Regards,
    Denis.
    Last edited by db75; 2 Jul 2010, 05:03.

    #2
    Well getValue() is the method you want to use, it is used extensively in the Showcase examples. Remember it returns an Object, so how exactly are you determining it to be blank? Show some code where you are trying to get the value.

    Comment


      #3
      It works now with explicitly calls to toString() method.

      Regards,
      Denis.

      Comment


        #4
        You could also cast the result of getValue() to a String.

        Sanjiv

        Comment

        Working...
        X