Hi,
I am using jdev 12.2.1 version. To get the component id, i was using type RichInputListOfValues , but i want to replace it with componentreference, to get the component id, and after that i was making the id null.
The previous code is like this:
| public void JobresetInputText(ActionEvent actionEvent) { |
| |
| FacesContext facesContext = FacesContext.getCurrentInstance(); |
| UIViewRoot root = facesContext.getViewRoot(); |
| |
| RichInputListOfValues inputText1 = (RichInputListOfValues) root.findComponent("inputListOfValues2"); inputText1.setValue(""); |
| |
Now I want to replace RichInputListOfValues to componentreference type.
| private ComponentReference JobFieldsClear; |
| public void setJobFieldsClear(RichInputListOfValues JobFieldsClear) { |
| this.JobFieldsClear =ComponentReference.newUIComponentReference(JobFieldsClear); |
| } |
| public RichInputListOfValues getJobFieldsClear() { | |
| return JobFieldsClear == null ? null : (RichInputListOfValues) JobFieldsClear.getComponent(); |
| } |
| public void JobresetInputText(ActionEvent actionEvent) { |
| // Add event code here... |
| FacesContext facesContext = FacesContext.getCurrentInstance(); |
| UIViewRoot root = facesContext.getViewRoot(); |
| JobFieldsClear inputText1 = (JobFieldsClear)root.findComponent("inputListOfValues2"); |
| |
| inputText1.setValue(""); |
| |
| } |
Its giving me error with JobFieldsclear not found.. Can't i use directly JobFieldsclear instead of RichInputListOfValues? Please advise me
Regards
Chinmayee