Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Jdeveloper 11g ADF. JavaScript popup.show() problem

Rafal SmolarekFeb 23 2009 — edited Feb 23 2009
To view I added beforPhase function. I this function I added (in java code) button af:toolbar:
- button = new RichCommandButton();
- button.setId("Test");
- button.setText("Text");
- button.setShortDesc("short description");

Next I added clientListener:
- ClientListenerSet set = button.getClientListeners();
- if (set == null) {
- set = new ClientListenerSet();
- button.setClientListeners(set);
- }
- set.addListener("action", "callMe");
- toolbar.add(button);

callMe is JavaScript function in js file.
- callMe(event) {
- mybutton = event.getSource();
- mybuttonid = mybutton.getClientId();
- var popup = AdfPage.PAGE.findComponent("data");
- alert("Hello "+popup);
- var hints = {align:"before_end"};
- popup.show(hints);
- event.cancel();
- }

In view I had simple popup:
- <af:popup id="data">
- <af:dialog title="Test">
- <af:inputDate label="Label 1"/>
- </af:dialog>
- </af:popup>

When I clicked button, alert was displayed (Message: Hello AdfRichPopup oracle.adf.RichPopup id=data), but popup didn't.
When I added button in jspx file, it works.
What I do wrong??
Rafal Smolarek

Edited by: ADFFan on 2009-02-23 10:30

Edited by: ADFFan on 2009-02-23 10:35

Edited by: ADFFan on 2009-02-23 10:36

Edited by: ADFFan on 2009-02-23 10:38
This post has been answered by Alexandar on Feb 23 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 23 2009
Added on Feb 23 2009
4 comments
601 views