Tree with action listener node context menu attached to a bean - question
HelloI have a tree node that contains a context menu and a popup. The Popup has a group that has a menu with two menu items. Each menu item has a menu-> to a bean that I created-> #{MenuBean.cmi1_action}. The actions are to add a node to the tree, or remove a node. All parts are connected together and work fine.
The question is, how do I get a reference to the data node was selected with the right click to launch the popup?
In addition, from code created as a bean, Java what is the best way to refer to all objects in the user interface?
Ideally, I would like to put the code in the bean to add or remove a node in the tree and then the table that the data in the tree comes.
Thanks Bob
PS, here's the code:
< af:tree id = "t1" value = "#{bindings." Var OrdersView1.treeModel}' = 'node '.
selectionListener = "#{bindings." RowSelection OrdersView1.treeModel.makeCurrent}"'unique' = >
< f: facet name = "nodeStamp" >
< af:group id = "g2" >
< af:outputText value = "#{node}" id = "ot28" / >
< / af:group >
< / f: facet >
< f: facet name = "contextMenu" >
< childCreation = "deferred" autoCancel af:popup = "disabled" id = "p1" >
< af:panelGroupLayout id = "pgl2" >
< af:menu text = "menu 1" id = 'm2' >
< af:commandMenuItem text = "add node" id = "cmi1.
action = "#{MenuBean.cmi1_action}" / >
< text af:commandMenuItem = "Delete node" id = "cmi2.
action = "#{MenuBean.cmi2_action}" / >
< / af:menu >
< / af:panelGroupLayout >
< / af:popup >
< / f: facet >
< / af:tree >
Here's the BEAN:
Overview;
public class {MenuAction
public MenuAction() {}
}
public String cl4_action() {}
Add the code in the event here...
System.out.println ("Menu clicked...");
Returns a null value.
}
public String cmi1_action() {}
Add the code in the event here...
System.out.println ("Menu Clicked.1..");
Returns a null value.
}
The validation operation is available at the level of the data control - so select the data control, you would see the operation.
Check the screenshot:
http://adfsampleapplications.googlecode.com/svn/trunk/images/commitoperation.PNG
Thank you
Nini
Tags: Java
Similar Questions
-
[FAD] How to access the attributes of node context menu?
Hello
I work with the component Tree ADF:
< af:tree value = "#{bindings." Var TreeVO.treeModel}"="node">
< f: facet name = "nodeStamp" >
< af:outputText value = "#{node." Label"}
ID = "NodeLabel don't" / >
< / f: facet >
< f: facet name = "contextMenu" >
< af:popup id = "RemoteTreePopup" childCreation = "deferred."
autoCancel = "disabled" >
< af:menu text = "menu 1" id = "m1" >
< af:iterator id = "i2".
value = "#{bindings." CtxMenVO.collectionModel}.
var = 'Elément' >
< af:commandMenuItem text = ' #{element. " Label} / #{node. Label} '...
What I expect: when I right click on a node (represented by the output text "node label", a context menu appears with 'element-label/clicked-node-label')
What I see: the output of the node text is ok, but #{node. Label} has no value < af:commandMenuItem
How can I recover the node.label of commandMenuItem?
Hello
setPropertyListener must go inside the popup.
Also think about using contentDelivery = "lazyUncached" in the context menu
Kind regards
Ruben.
-
Whenever I load a page with this added behavior and test it with my link, I get a message "error on Page".
Here's what I do:
Create a new HTML page in Dreamweaver 8.0.2 and save it.
Add a hyperlink in the Insert-> menu hyperlink. Do not put anything in it except a few example of text; "THIS IS a TEST", or something.
Select the hyperlink and choose "Show the context Menu" in the tag behaviors menu tab ' + '. The dialog box will appear.
Add a single item and add a link to a page. Do not change the other options. Click OK to close the dialog box and the code will be added to the page.
Save the HTML page again and press F12 to load the page on your test server and display them in a browser.
Hover your mouse over the link to test. Nothing happens and there is a message in the status bar at the bottom of the browser, "error on Page".OK, it works. I saw the source file that are listed there, but I assumed that Dreamweaver would be to download the file with the HTML file to test on my test server. Usually, I'm prompted to download all the dependent files. Is there an exhibitor or dreamweaver do not miss this link?
I'm sold on convictions explained in the rants you have linked, but only after I see that Dreamweaver menus don't work. It is not entirely necessary for my completely dependent users of my menus, they are only a feature of page layout.
Since I have the ear, maybe you could tell me something before my attempt it: is it possible to generate the JavaScript using PHP? I would like to include JavaScript in the context of records with PHP MySQL. Is there another possible solution from PHP? I guess that ASP is a solution already and maybe Flash too.
This is the kind of page I'm working on that:
http://www.symbiota.com/MiloTrial/witnesses.php
I would like to see a drop down menu for each trial where the number of witnesses is less than 10 to save someone the trouble to open a new page just to see a list of ten names.
-
Inserting a node on an element empty <; af:tree >; via the context Menu
My requirement is to create a tree node by using the option "Insert" through the context menu when the component of the tree is empty. By clicking on the option insert a node should be created in the tree. But currently the context menu don't appear unless a node exists in the tree of.
JDeveloper Version: 11.1.1.7.0
Fig-component of the tree on a layout of Stretch
Fig - context menu to insert added to the Tree component
Fig - context menu is not display when no available tree node
The component of the tree grabs only necessary to render space and only in this space, you can access the context menu. As you do not have a jet of node, the space to make the tree is very small or didn't exist at all.
You can add a showPopupBehavior (pointing to the popup of context menu) to FY: tree which should give you the popup anywhere in the tree.
Timo
-
Choose the program by default, open with context menu right-click on a program does not!
When I right click on an application such as a text document and try to change its default program (right click, open with, choose the program by default) I get an error says: "this file has no program associated with it for performing this action. Please install a program or, if such is already installed, create an association in the default programs control panel. »
There is no problem to open the application, but the problem is the button ONLY!
Fix association .exe, .txt, etc. did nothing!
You can see my thread on SevenForums here: http://www.sevenforums.com/performance-maintenance/221020-choose-default-program-button-right-click-not-working.html
and this problem as my problem: http://superuser.com/questions/69193/choose-default-program-does-not-work-is-broken-on-windowsThank you!
Problem solved by a person post in the Forums of Vista, that what he said in this thread (Thread link: http://www.vistax64.com/general-discussion/202928-open-choose-default-program-error-vista-2.html#post939031 ):
"PROBLEM SOLVED!"
HOO HOO!I want to thank you once again BRINK for ideas on how to solve this problem.
The next step below, this is how I solved this annoying problem:First of all, I came across this article on the Microsoft Web site by changing my google search to solve the problem. I started the google search with the following:
'open with' lack of context menu
Who brought results with the first being a microsoft link:
Command 'Open with' missing from the context Menu
Now the article didn't tell me exactly how to solve this problem, but it gave me an idea.
He said look at the following reg key:HKEY_CLASSES_ROOT\Unknown\shell\openas\command
And he said to watch the following default value:
C:\%windir%\rundll32.exe shell32.dll, OpenAs_RunDLL %1
After that, I noticed that the value was different, but then I noticed in watching the article says that this applies to Windows 95 and 98.
I then looked at the same key on my laptop that is running Vista Ultimate 32 bit also and I noticed there are subfolders on my laptop that my office did not have.
It should look like the following:HKEY_CLASSES_ROOT\Unknown
\DefaultIcon
\+Shell
\+openas
\COMMAND
\+opendlg
\COMMANDMy office was only the DefaultIcon folder.
Well I just copied the key from my laptop and voila... it worked.
I thank the gods of the computer. This has really been bugging me. I know that some people would have just reconfigured or installed a new but I knew it was an easy fix. I thought it was a reg key or windows dll file, but I just need to find the location where he resided in. Luckily I came across this article which pointed me in the right direction. Now I feel like I accomplished something.Sorry if this is a bit long but I HATE it when I'm looking for answers in the forums and I see someone say they have solved their problem, but they either don't say anything about how they fixed or that they are so vague that they could didn't say anything.
I hope this helps others if they have this problem.Thank you once again on BOARD! "
That's all!
-
Context menu of the site overrides Firefox, so there is no orthographic integrated
When I right click in a text area, menu contextual of the client program can't, Firefox, so I can't use spell checker integrated in Firefox, such as the suggested corrections options and "add to Dictionary". Which is frustrating, because the spell checker find new words and typos, but I can't do anything with them, because the context menu of the client program gets in the way.
Is it possible to replace the integrated right-click to say, left click spell check menu or a button on the main browser?
Hello sachss, you can turn off the ability for Web sites to replace the context menu in the Explorer - enter Subject: config in the bar firefox address (confirm the message information where it appears) & search for the preference named dom.event.contextmenu.enabled. Double-click it and change its value to false.
-
Acrobat Pro XI: How batch create multiple PDFs to images from the context menu
After selecting the jpg or png files in a folder I would like to have an option to convert batch of rightclick
PDF files using the Sub settings.
converted to automatically save files by using the same file name in the same folder.
At the present time, in case I for example selects 12 files, Acrobat will open 12 windows, I have to start the recognition of text and save the files.
I have tried (!) to create an action myself and think it works, but I can't add it to the context menu have Acrobat in the background.
Thank you
=
You cannot have an action from the context menu.
-
Context menu appears only on the tree
Hi all
I use Jdev. 12.3.1.0 and I created a component of the tree with a context menu, but when I press right click it does not show the menu.
The following XML code:
<af:tree value="#{bindings.AccAnalysisRootVO.treeModel}" var="node" selectionListener="#{bindings.AccAnalysisRootVO.treeModel.makeCurrent}" rowSelection="single" id="t1"> <f:facet name="nodeStamp"> <af:panelGroupLayout id="pgl2"> <af:image source="#{resource['images:ana2.jpg']}" id="i1" inlineStyle="margin-right:3px; vertical-align:middle; height:14px; width:16px;"/> <af:link id="ot1" text="#{node}" actionListener="#{SetAnalysisCode.GetTree}" partialSubmit="true"/> </af:panelGroupLayout> </f:facet> <f:facet name="contextMenu"> <af:popup childCreation="deferred" autoCancel="disabled" id="p1"> <af:menu text="menu 1" id="m2"> <af:commandMenuItem text="#{psmartviewcontrollerBundle.ADD}" id="cmi1"/> <af:commandMenuItem text="#{psmartviewcontrollerBundle.DELETE}" id="cmi2"/> </af:menu> </af:popup> </f:facet> </af:tree>
Just tried and it works fine. Works fine in the demo of component too: tree demo
Can you be sure if your resource package has appropriate entries? Can you try to restart the server and then deploy the application to see if it works well?
Hello
surround your tree with panelCollection
Thank you
Why?
Arun-
-
We are developing a tool for simple automation using Lightroom 5 (the most recent version of the penal code) using AppleScript.
For certain actions, we need the context menu in the Panel smart Collections, for example, to import smart collections descriptions.
According to the documentation and sources on stackoverflow and elsewhere, AXShowMenu should bring up this menu.
So far I was not able to do the contextual pop-up menu.
With the help of UIElementInspector and the browser of the user interface, I have found the element that has the attached AXShowMenu action. Based on the code provided by the browser of the user interface, I got the following script, that I run from the Applescript Editor:
tell application "Adobe Photoshop Lightroom 5"
activate
tell application "System Events"
tell process "Lightroom"
set frontmost to true
perform action 1 of static text "Smart Collections" of group 1 of row 11 of outline 1 of scroll area 1 of window 6
delay 2
end tell
end tell
end tell
tell application "AppleScript Editor" to activate
Note that if you try to recreate it, the number of the window as well as the number of the line may be different. In addition, the last line is just more convenience and not really relevant to the code.
In the window results in the AppleScript Editor, I have the following:
perform action 1 of static text "Smart Collections" of group 1 of row 11 of outline 1 of scroll area 1 of window 6 of process "Lightroom"
--> action "AXShowMenu" of static text "Smart Collections" of group 1 of row 11 of outline 1 of scroll area 1 of window 6 of application process "Adobe Photoshop Lightroom 5"
which means I have to invoke the action.
But... nothing happens.
Any insight, etc. workaround is much appreciated.
Thanks in advance.
Just for the records, I asked the same question on Stackoverflow, and I got a response that does not work. This solution uses a small Python program to really simulate mouse clicks.
-
How to add the listener showPopup trigger for a commandlink type context menu
Hi all
I use jdev 11.1.1.7
I have a commandlink with actionlistener, which will display a popup and his works fine
But when the right click on the link same context menu should be display
That's why I added a trigger type contextmenu for this commandlink showPopupListener but its does not work
I even added oracle.adf.view.rich.ACTION_LINK_BROWSER_CONTEXT_SUPPRESSION to no. as suggested in https://docs.oracle.com/cd/E24382_01/web.1112/e16181/af_navigate.htm#ADFUI11777 still does not
<af:commandLink id="dc_cl2" text="#{page.concatMemberNameDisplayed}" actionListener="#{pageFlowScope.MyBean.openMS}" inlineStyle="font-size:smaller;" rendered="#{page.axisType==3}"> <f:attribute name="selectedPageMem" value="#{page}"/> <af:showPopupBehavior popupId="contextMenu" triggerType="contextMenu" align="afterEnd"/> <af:popup id="contextMenu" launcherVar="var" eventContext="launcher"> <af:menu text="ContextMenu" id="m1"> <af:forEach items="#{pageFlowScope.MyBean.mapKeys}" var="it"> <af:forEach items="#{pageFlowScope.MyBean.menuItems[it]}" var="menuItem"> <af:commandMenuItem text="#{menuItem.label}" id="cmi1" actionListener="#{pageFlowScope.MyBean.contextMenuClicked}" action="onContextMenu" rendered="#{it eq 'Global'}"> <f:attribute name="selectedMenu" value="#{menuItem}"/> <f:attribute name="selectedPageMem" value="#{page}"/> </af:commandMenuItem> </af:forEach> </af:forEach> </af:menu> </af:popup> </af:commandLink>
Please let me know how to achieve this. Thanks, Asha
If the component on the page sometimes is visible and sometimes will not depending on the condition or user action, you must use the visible property. Whether or not the component is visible only once (for example according to the privilege of the user or user type), you must use return ownership.
-
How to create a context menu on a tree.
Hello guys.
Could someone explain to me how can I do to create a context menu on a tree?
My version of the APEX is 5.0.
Thanks in advance.
Edson
Hi Edson,
The API for the tree widget and widget menu are undocumented and unsupported at this time.
Information on the use of the widget menu to display a context menu on interactive reports may be useful for you:
APEX 5.0 custom Menus | HardLikeSoftware
The tree widget has an option of contextMenu that integrates with the menu widget.
Kind regards
-John
-
Error on creating a node in a tree with the Oracle ADF
Hello
I drew a tree with oracle ADf on schema oracle HR and are the layouts of the tree: region, country, location, Department and employee.
I have a button to create nodes. in the beck of button, I have a class to handle the create action.
When I want to create a node, the error below is to occur:
Cannot create an object of type:java.math.BigDecimal from type:java.lang.String with value:BR
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)What is the error?
This error means that you are trying to insert a string value into a bigdecimal object
in order to check your code when you set values after create
-Thank you
-
ADF TUTORIAL: PROBLEMS WITH "export Collection Action Listener.
Hi all
environment:
Windows xp
jedev 11.1.1.3.0
Firefox 3.6.13
Tutorial: develop Ajax with JSF-based User Interfaces: An Introduction to ADF Faces Rich Client components
URL: http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/adf_richclient/adfrichclient.htm
mainstep: "work with menus.
step: number 5 "add a listener for collection action.
until the step "work with menus" everthing works fine. After that I added the earpiece of the collection action and saved my work, the webapplication does not open. I only see a blank page and no error message.
When I delete the action listener works just fine again.
How can I solve this problem? Thank you to everyone.
Best regards
GunnarYou can paste the code of the page where you added the listener to action?
Make sure it is added within the menu option. -
Context menu with video player problem
Hello
I don't think I'm doing something stupid... It seems that having a MediaContainer onstage prevents somehow the ContextMenu send a click event, someone else knows it? I created a very simple example below to illustrate the problem. If you click anywhere on the stage, you will get the ContextMenu correct (with the custom "click me"), but only if you click outside the MediaContainer will be distributed ContextMenuEvent. If anyone has any ideas of what I could do wrong, or could confirm that maybe it's a bug, I'd be very happy.
package
{
import flash.display.Sprite;
Import org.osmf.containers.MediaContainer;
Import org.osmf.elements.VideoElement;
Import org.osmf.media.MediaPlayer;
Import org.osmf.net.DynamicStreamingResource;
Import org.osmf.net.DynamicStreamingItem;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
import flash.events.ContextMenuEvent;
[SWF (width = "1024" height = "600", backgroundColor = "#000000", frameRate = "30")]
SerializableAttribute public class OSMFPlayerTest extends Sprite
{
public void OSMFPlayerTest()
{
var dynamicStreamingResource:DynamicStreamingResource = new DynamicStreamingResource ('rtmp://myhost/');
dynamicStreamingResource.urlIncludesFMSApplicationInstance = true;
var stream1:DynamicStreamingItem = new DynamicStreamingItem ('mp4:mystream.f4v', 190);
dynamicStreamingResource.streamItems.push (stream1);
var videoElement:VideoElement = new VideoElement (dynamicStreamingResource);
Player: var = new MediaPlayer MediaPlayer (videoElement);
Display: Var MediaContainer = new MediaContainer();
display.addMediaElement (videoElement);
addChild (display);menu: ContextMenu var = new ContextMenu();
menu.hideBuiltInItems ();
var point: ContextMenuItem = new ContextMenuItem ("click me '");
item.addEventListener (ContextMenuEvent.MENU_ITEM_SELECT, onMenuItemClick);
menu.customItems.push (item);
menu = this.contextMenu;
}private void onMenuItemClick(e:ContextMenuEvent):void
{
trace ('click');
}
}
}Thank you very much
Simon
Hi Simon,.
You stumbled upon a known issue of Flash Player and its impact on the event of shipping on the video object context menu.
There are two possible solutions:
1 Add a transparent sprite on top of the video and add event listeners.
2 use something like a sprite "control bar" as a target for event listener context menu.
Hope this helps,
ANDRIAN
-
[CS3/CS4] Context menu on TreeViewWidget nodes
Hello
I need to create a context menu with dynamic content on the nodes in a TreeViewWidget.
Please direct me in the right direction or suggest a SDK sample that illustrates these concepts
Thank you.
Cordially Toke
Hello
Look at the example of paneltreeview in the SDK of the search for treeview in the API documentation.
Markus
Maybe you are looking for
-
When I use "Send link" with Firefox, the button 'send' in Thunderbird is gray.
OS X 10.9.4 The option to manually copy the link and paste would work, but I've always been able to use the 'e-mail link' in the 'File' menu until recent days. Restarting the computer didn't help.
-
How can I test for the low device enterd in a control?
How can I create a polymorphic vi where the user can enter either volume or temperature. How Labwiev can test the base unit is entered example of pseudo-code: Input X If X.base_unit == m ^ 3... Thanks for any suggestions to solve or avoid my problem
-
Cannot connect Xbox 360 Elite to runnings Windows Vista PC
After surfing the internet for hours, I really need help with this problem... I am trying to connect my Xbox 360 Elite to my PC running Windows Vista Home Premium (32 bit). I can connect to Xbox Live without any problems, and the Xbox also appears in
-
How can a computer decide to delete all the content of a folder?
I got nothing, but problems with this computer from HP replaced the last piece of junk and it is constantly blowing my mind again, I am at a loss of Word to describe, but to say s_ _ t. Here's the latest, and I dare some give me a viable answer. I ma
-
How to install downloaded updates from the C:/Windows/Software Distribution?
I downloaded the updates of Microsoft with a limited internet connection, but during the installation of the update, I turned off my laptop. After a google search, I find that the downloaded updates are store on "C:/Windows/Software Distribution/down