ADF Mobile: amx:listView keyboard event handler
My view needs to accept keyboard input, but does not have an inputText, only a listView. I need to update listItems based on the keyboard input, but cannot add an inputText field to the view. Can I capture keyboard events in the view, the panelPage, or the listView?
Thanks,
Mike
Plzz help :(
Similar Messages
-
Adf mobile amx:inputText entry with voice
Hi,
I have a amx:inputText which works fine with iphone - if we enter a text with keyboard and save using a command button.
Also it works fine and saves the value if you speak into the text field and at the end enter any key from keyboard.
If you ONLY speak into the text field and save using a commandbutton - it does not save though.
Is there a work around please?
ThanksYou'll need to set the value of the field to be null.
So for example try this page:
<?xml version="1.0" encoding="UTF-8" ?>
<amx:view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amx="http://xmlns.oracle.com/adf/mf/amx"
xmlns:dvtm="http://xmlns.oracle.com/adf/mf/amx/dvt">
<amx:panelPage id="pp1">
<amx:facet name="header">
<amx:outputText value="Header" id="ot1"/>
</amx:facet>
<amx:inputText label="label1" id="it1" value="#{viewScope.search}"/>
<amx:commandButton text="clear" id="cb3">
<amx:setPropertyListener to="#{viewScope.search}" type="action" from="#{''}"/>
</amx:commandButton>
</amx:panelPage>
</amx:view> -
ADF Mobile amx:panelSplitter - disclose behaviour
Hi Guys,
JDEV 11.1.2.3 - Hoping that someone may be able to elaborate on the design of the HR Sample application which makes good use of the amx:panelSplitter. Basically, there is an 'Add Employee' link and also a 'Search' link. Clicking on the search link does not cause the disclosure behaviour of the navigation component to hide. Clicking on the 'Add' link does.
I can't figure out how this has been achieved. Is it implicit? This was built completely declaritively by the looks, and I can't see how this is being controlled. I effectively want to replicate the search behaviour but as the link is clicked the whole page is reset to the starting position (with the navigator hidden).
This is not a problem on larger devices as the standard here is to have the navigator always shown.
Help appreciated.
Cheers,
SimoIt's pretty easy.
They use 1 panelSplitter and multiple panelItem.
The panelSplitter has an attribute 'selecedItem' which tells it which panelItem it should render.
In the example you see '#{pageFlowScope.panellist}' which refers to an pageFlowScoped variable.
If you want to change the current displayed panelItem, just change the pageFlowScoped variable.
In the HR example, that happens when they click a link or button by using this:
<amx:setPropertyListener from="nolist" to="#{pageFlowScope.panellist}"/>
The 'from' value is then the ID of the panelItem. -
Handling keyboard events in applets?! Possible?!
Hello,
I wrote a little game that uses keyboard handling events. It is an applet that can also standalone as an application. When i run the program as a standalone application, it handles keyboard inputs fine. ie...i can press the left and right arrow keys and something happens.
But when i run my program as an applet in a web browser, the applet starts up correctly but does not handle any keyboard events. It only handles mouse events. For instance, if i press the up and down arrow keys, the browser window scrolls up and down!!! And the up and down arrow keys have a specific purpose in my applet.
QUESTION: how do i get my applet to accept keyboard inputs such as UP,DOWN, LEFT, RIGHT?Hmm something went wrong w/ my post so i hope this doesnt show up twice.
Hey thanks a lot for helping me out. The applet/application is large so here is the main() method and the keyboard event handling class code. My question is how come the keyboard events get properly handled when i run it as a standalone application, but keyboard events go to the browser when i run it as an applet? I would post my entire code but it's over 1000 lines and spread out over 8 files. hehehe.
Here is main():
public static void main(String[] args)
MyProgram applet = new MyProgram();
applet.isStandalone = true;
JFrame frame = new JFrame();
frame.setTitle("Physics: Kinematics");
frame.getContentPane().add(applet, BorderLayout.CENTER);
applet.init(); // initialize the applet inside frame
applet.addKeyListener(kbHandler); // kbHandler is a keyboard handling object
applet.start();
frame.setSize(APPLETWIDTH,APPLETHEIGHT);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
frame.setLocation((d.width - frame.getSize().width) / 2, (d.height - frame.getSize().height) / 2);
frame.setVisible(true);
// private inner class to terminate the Application when frame closes
frame.addWindowListener(
new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
frame.show();
}"kbHandler" is the keyboard event handling object. It gets initialized in the applet.init() method.
kbHandler = new BMkeyboardHandler();And here is the keyboard event handling code:
// ===== keyboard event handler ===========
private class BMkeyboardHandler implements KeyListener
public void keyPressed(KeyEvent e)
pushedKey = e.getKeyCode();
// General administrative key actions
if(pushedKey == KE.VK_H)
actionArea.toggleHelpMenu();
actionArea.repaint();
else if(pushedKey == KE.VK_C)
actionArea.toggleCtrlMenu();
actionArea.repaint();
}So there it is. Again, the program handles events fine as a standalone application. But running it as an applet in a browser (and even the appletviewer) doesnt let me handle keystrokes. -
ADF Mobile: Handling wildcard certificates by GeoTrust
Hello.
We have developed an application with ADF Mobile and seem to be stuck at the SSL certificate for our webservice.
We have lists of items that are filled by a java method connecting to a REST webservice. This service is secured by a wildcard certificate rather than a normal one.
Can it be that ADF Mobile's JVM can't handle the wildcard certificates? I get the error
javax.microedition.pki.certificateException: Certificate was issued by an unrecognized entity.
Our certificate was issued by GeoTrust and is valid until 2015. It shouldn't be an "unrecognized entity" then right?
Thanks for any help!
PascalOkay so these two things give me big trouble:
First, the JVM (J2ME Spec) doesn't include any API's to disable SSL verification as can be found here:
Re: How to Trust All SSL Certificates? (Disable Validation)
Also The RestServiceAdapter probably uses HttpConnection class which doesn't support wildcard SSL certs. The problem is known as can be read here:
http://www.sslshopper.com/article-wildcard-ssl-certificate-pros-and-cons.html
So...if the backend uses a wildcard cert and this can't be changed and the webservice has to be secured, adf mobile is no good :( -
I found very simple code to fetch facebook feed here:
3.&nbsp;Facebook API Binding
it uses Spring Framework. I already added spring support into jDeveloper.
code to fetch feed is something like this:
String accessToken = "f8FX29g..."; // access token received from Facebook after OAuth authorization
Facebook facebook = new FacebookTemplate(accessToken);
List<Post> feed = facebook.feedOperations().getFeed();
I created managed bean for my amx:listView - Facebook.java. And inserted this code. But of course it is not enough. I need somehow to add spring managed bean (not like mine).
Can you help me with that?Thanks for your answer. But its too wasteful for my app to run additional server. My app is very simple so i do not need server side. May be there is another way, without Spring. I mean something simpler then raw JDK 1.4 - some ready-made tool for the needs of these?
Thanks in advance -
When keyboard show-up view didn't resize in Android, ADF Mobile
Hi Guys,
Now I was facing with amx page didn't resize when keyboard pop-up, so user cannot scroll for more fields below,
Btw iOS is normal to resize when keyboard shown.
How to fix this issue ?Hi Frank
Thanks for reply, I have another issue about android startup performance with release mode, I will send it to you.
Btw about Android resize view when keyboard show-up, I can fix it but it should include in next release of ADF Mobile.
My fix is (Thanks for JoeHuang's way to browse Android template file : Google Play Store does not accept ADF Mobile apps for tablets)
- Navigate to file <JDev Install>/JDeveloper/JDev/Extensions/oracle.adf.mobile/Android/Oracle_ADFmf_Framework.zip
- Make a backup copy of the zip file
- Unzip the file, which would extract all files into a "framework" directory
- Navigate to framework/template/AndroidManifest.template.xml file
- Change android:windowSoftInputMode value to "adjustResize" Ex. android:windowSoftInputMode="adjustResize"
- Zip up the framework directory and name zip file as Oracle_ADFmf_Framework.zip, replacing the old one. Please make sure the zip file has the exact same directory structure as before.
- In JDeveloper, before deploying the application again, please do a "Clean All" to clean out all old deployment artifacts.
- Deploy the app again
After fix, views is automatically resize when keyboard pop-up, but seems weird with navigation bar that will show as it include in view too.
I don't know why ADF Mobile put android:windowSoftInputMode value as "adjustPan" in manifest file, as Android document said as view will not resize when keyboard showing (Ref: http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft) -
Keyboard events in Flex mobile
I have a desktop application where I handle autocomplete and some other checks using the Keyboard events. Now porting the same app to Mobile devices but I am not able to get the Keyboard events. How can I get those or are there any alternatives for Keyboard events on Mobile devices?
Hi there,
If you are recording in Training mode then by default Captivate should include click boxes in your slides. You can assign keyboard shortcuts to those click boxes by carrying out the following steps:
1. Double-click on one of your Click Boxes.
2. In the Click Box section of the dialog box click the Select Keys... button.
3. Select the option Attach a shortcut
4. To perform an Undo choose Ctrl and then from the Letter menu choose
Note: To get the learner to Shift + Click, select the option SHIFT
5. Click OK to Close the Shortkey dialog box.
To simulate an Undo you would then need to branch to a slide where the original action was performed. Here you can either use the On success options Go to Previous Slide or Jump to Slide and then specify the slide number.
As for simulating selecting multiple items, again you would carry out similar steps. Depending on how your project has been setup you would either set the On success action to Continue or to Go to next slide.
The way I tend to work is that I have each of items I want to select on separate slides and then add a click box with the keyboard shortcut Shift attached. When the learner clicks on the first click box I then move to the next slide and so on. Naturally, this does not account for allowing the learner to randomly select the items. To accomplish that, you would need to set up some pretty complex branching.
HTH
Best - Mark
Visit the macrofireball blog -
ADF Mobile: Dynamic action calls based on a listView item selection
I've currently got some supporting data that provides the "name", "description", an "image", and a "navigation" per row. I populate a listView based on this collection and assign the name to the list item text, the image to the list item image, and I am attempting to create some dynamic navigation to the next mobile page based on the value of the "navigation" in the data.
I attempted to use #{row.navigation} as the action for the listItem, but I am getting an error "Cannot find property row" at run-time when I click on an element. I know the row data for navigation is correctly there because I can feed the #{row.navigation} into the listItem's text property and it shows up correctly there. I also made sure that the value in this navigation corresponds to a valid action in the task.
Is there another way to do this?
Jdev 11.1.2.3
ADF Mobile
Thanks,
JimThanks for a quick response.
I think I'm missing something since it did not populate any value.
Here is what I did based on the code you provided.
I've created dynamic action on field Type to execute a javascript code you provided when the value in this filed changes. The output or the items(s) affected is set to Address1 field. I didn't change the code except replacing the the actual value of Type and Label.
Then I went to Address1 field and on the 'Label' I put the code <span id="dynamic_label"></span>. It returns nothing.
Am I missing anything? Am I suppose to change something else as well.
Your help is really appreciated. -
ADF Mobile Error handling and redirect
I'm stuck on how to handle errors within my ADF Mobile application. My application consumes a number of web services and we have found we often get error messages when phone connections switch from wifi to 3g or lose connection altogether. These are errors such as SSL handshake failure, HTTP500 errors, and also errors where it can't display the binding eh "Unable to get value for the property due to invalid binding iterator" because a WS call has failed. From the little information I can find - and none of it specific to ADF Mobile, I think I need to write an error handler class which I set against ErrorHandlerClass in databinding.cpx - if that correct? Am I able to catch these errors using that method and if so has anyone got any examples at all. Ideally what I'd like to do when I've caught those errors is redirect to another page (showing something like facebooks app does when it loses a connection and says tap to try again), does anyone have any suggestions or examples?
thanks
lynseyA sample for ADF Mobile Error Handling.
SDA013
Error Handling in ADF Mobile
https://java.net/projects/smuenchadf/pages/ADFMobile#SDA013 -
Hi
i am an android app developer and new to ADF Mobile , so there are some doubts on Navigation through pages and mapping the new AMX page to features.
Steps i have followed
1. i have created an project using Mobile Application (ADF)
2. right clicking on ViewController , i have added AMX page and added some componets
Now i just want to show this page while executing this application in mobile. i have added this page path in to feature also but i am getting a blank screen.
please give me solution or give me a good example or any link which will help out.
i have added a button in the first screen and i want to go to next screen if the user press it. i know that task flow will help to achieve this but how i will add this with page. i am bit confused on those topics.
Thanks in advanceHi Ansh
Thanks for the reply
I have followed the same link and created a sample app and i am facing some error, error given below.
jdeveloper 11.1.1.6.0 Warning 'http://xmlns.oracle.com/oracleas/schema/11/
if you have any solution for this , pls revert.
Thanks in advance -
Bean value to amx:verbatim to make HTML dynamic ADF Mobile
Hi guys,
As using <amx:verbatim> to insert HTML directly in AMX page for ADF Mobile.
<amx:verbatim id="v1">
#{PolicySummaryBean.currentSVG1}
<![CDATA[
#{PolicySummaryBean.currentSVG2}
]]>
</amx:verbatim>
Btw I tried to using bean value as EL to produces HTML from bean and seems didn't work
How to make it possible ?
ThanksHi,
don't think it will execute EL this way. However,you should be able to execute JavaScript (what you should keep in mind though is that any DOM manipulation on AMX page rendering is a risk and can put you into trouble). What is the HTML you want to insert (and to what extend do you control the metadata tags added to the AMX page this way? Wouldn't it be possible to add the content using AMX components?
Frank -
Hi:
Below is an Air application in which I am trying to catch keyboard events.
I do catch it once. Subsequently when I try to catch the events, sometimes I must click on the canvas
to refocus. Sometimes even this does not work. When I choose an option in DropDown list then the handler
also stops working. Is there something missing in my envent Handler?
Please advise and thanks for reading and helping.
<?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"layout="absolute" windowComplete="windowComplete();"> <mx:ApplicationControlBar id="dockedBar" dock="true" paddingLeft="0" paddingRight="0"> <mx:ComboBox dataProvider="{stats}" id="statsC" change="statsChangeEvt(event)" /></mx:ApplicationControlBar>
<mx:Array id="stats"> <mx:Object label="Option 1"/> <mx:Object label="Option 2"/></mx:Array><mx:Script> <![CDATA[ import mx.controls.Alert; private function windowComplete():void{stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);} public function handleKeyDown(event:KeyboardEvent) :void{Alert.show("Key pressed");} private function statsChangeEvt(event:Event):void { Alert.show("Stats Changed")};]]></mx:Script> </mx:WindowedApplication>Try listening to the keyDown event in the capture phase.
addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, true).
ComboBox stops the propogation of the event if it is something that it handles. This is why you don't get it in the bubble phase.
Jason -
ADF Mobile: Listview rendered
Hi there,
I'm developing an ADF Mobile application. I consume a web service and populate a list view. One of my problems is to understand when the list is populated so i'll make another button appear that uses the results.
Thank you,Hi Frank,
My problem is "Show" button queries the web service which takes time (10 seconds or so) i would like to disable buttons so user will not click "Show" again until the list is populated. If user selects other parameters and press "List" again i fist would like to hide the listView and show it when the list is populated.
Regards, -
How to set event handler in af:inputText adf faces component.
Hi,
I am using ADF Faces components for my application.
I want to capture the onchange event of a text box on the server side.For this what should I do. How do I register an event handler for this.
In the documentation of the CoreTags of the ADF for onFocus it is stated as below.Will this help me in any manner ?
onfocus String the event handler for when the element receives focus.
Please help me.
Regards
UmaUma,
- set autosubmit to true
- set a value change listener in the managed bean
Frank
Maybe you are looking for
-
How do I highlight a text from Word or Safari?/ dragging items.
I have a Macbook Pro, bought in 2009. Normally, I would be able to use the track pad to highlight, copy and paste an item, but I have not been able to highlight anything with the trackpad. I am still able to double tap a phrase, highlight a selected
-
I have enter a sales order 8700123 with item A qty 100 nos, now customer canclled the order. i have deleted the line item from the sales order and save. But in future i can not get the information about the sales order that why it is cancelled, is th
-
Advice for a Novice FI/CO Consultant
Good day to everyone I just finished my FI/CO training in the SAP Academy, and I was just wondering if you guys have tips for a total SAP newbie like me. I have no idea what to expect when I am assigned to a project and what the work description/ wor
-
Using Windows Server 2008. Have admin rights. Server is not Internet connected and is not on a domain. Clicking on EM opens IE8, gives emkey error. States emkey is misconfigured. Running emctl status emkey generates the following: Microsoft Windows [
-
Do the iPhone 5s come unlock with AT&T
Do the iPhone 5s come unlock with AT&T