prashanth talkad

Greenhorn
+ Follow
since Nov 16, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by prashanth talkad

hi, working with jsf 1.2 n am trying to dynamically construct a group of radiobuttongroups inside an htmlgrid - so my valuechangelistener is not specified in the jsp component. my code is below

firstly i have a custom listener which I initialize as -
CustomRadioButtonValueChangeListener listener = new CustomRadioButtonValueChangeListener();

then, my java bean code has -

for(Declarations decl : (List<Declarations>)declarationsList){
Label label = new Label();
label.setId(decl.getCode() + "label");
label.setText(decl.getDescription());
label.setStyleClass("formButtonGroupListItemLabel1");

RadioButtonGroup rbg = getRadioButtonGroup();
rbg.setValue(NO);
rbg.setId((String)decl.getCode());//rbg.setLabel("Yes");
rbg.setOnChange("setModified();submit();");
rbg.addValueChangeListener(listener);

TextArea tArea = new TextArea();
tArea.setId(decl.getCode() + "TextArea");
tArea.setRows(5);
tArea.setColumns(100);
tArea.setText("");
tArea.setRequired(true);
//tArea.setDisabled(true);
declarationDetailsPanel.getChildren().add(label);
declarationDetailsPanel.getChildren().add(rbg);
declarationDetailsPanel.getChildren().add(tArea);
}

Now, what I want to do is, on click of a radio button, I want to enable/disable the corersponding textarea's.

In the custom listener I'm unable to get hold of the TextArea object that I want to control.
I tried FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(event.getComponent().getId + "TextArea"); //this should translate to "Declaration1TextArea" for the first radio button group and so on....

Can anyone help or give ideas on how to access the UI Components in this listener class.

cheers
p
13 years ago
JSF
Thank you so much Bharat. Cheers - prashanth
I'm using velocity templates in my spring app n have some simple templates working successfully. Like passing a username and the reset password to the email body etc.
my next task is to learn how to pass a dynamic list of objects into the template.
say, for example, i will pass to the template an object array that contains the names of members. it may be 3 objects once and 5 the next.
i cannto seem to figure out a way to do this considering its my second day on velocity :-) can anyone please advise

cheers
p
i know its beena while since the last reply on this thread, but i'll try my luck anyway -

I'm using velocity templates in my spring app n have some simple templates working successfully. Like passing a username and the reset password to the email body etc.
my next task is to learn how to pass a dynamic list of objects into the template.
say, for example, i will pass to the template an object array that contains the names of members. it may be 3 objects once and 5 the next.
i cannto seem to figure out a way to do this considering its my second day on velocity :-) can anyone please advise

cheers
p