Skip to Content
author's profile photo Former Member
Former Member

Asterisk in front of input field in a TableView !!

Hello Friends,

Has anybody managed to get a Asterisk (*) next to an InputField in a TableView? The setRequired(true) for Label control renders this behaviour.

I would appreciate solution to my problem with a copy even to madoshi@deloitte.de

BR,

Maulin

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2004 at 08:45 AM

    Hi,

    please check the PDK HTMLB documentation about the tableView component. There you'll find something on using custom controls in a tableView.

    Regards,

    aRmin

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello friends,

      I found the solution on my own :-). Would like to share it.

      I added this code under cellrenderer to display respective tablecell:

      if ((column == 4)){

      FlowLayout fl = new FlowLayout();

      fl.setId("myForm4");

      InputField input = new InputField("InputName4");

      input.setType(DataType.STRING);

      //input.setMaxlength(100);

      input.setValue(tableView.getValueAt(row, column).toString());

      fl.addComponent(input);

      if (row == 1) {

      Label label = new Label("label_InputName4");

      label.setRequired(true);

      label.setText(" ");

      label.setDesign(TextViewDesign.LABEL);

      label.setLabelFor(input);

      fl.addComponent(label);

      }

      fl.render(rendererContext);

      //label.render(rendererContext);

      }