login example for iphone - iphone-sdk-3.0

Can anyone get me a login page example for iphone ?

short answer - Create a view with 2 labels (lblLogin & lblPassword) and 2 text fields (txtLogin & txtPassword) then generate the necessary source
long answer - post what you have tried so far

Related

Xpages - Dojo Value Picker [multiple choice, other db, search function]

I need to build a dojo value picker that has the following capabilities:
1) Be able to choose views from a different DB
2) Be able to choose multiple values
3) Be able to have the user search for a value
I cannot figure out how to get all three.
A simple value picker appears to not support search.
If I user a dominoViewValuePicker, I cannot have both dojo types:
extlib.dijit.PickerCheckbox
and
extlib dijit pickerlistsearch
Can someone tell me what I am doing wrong?
Thanks to Paul and others for helping. I did get this to work by using the dominoViewValuePicker. See my example below, which I hope could help someone else.
<xe:valuePicker id="valuePicker1"
dialogTitle="Choose From This List" pickerIcon="/picker.png"
for="Approvers" dojoType="extlib.dijit.PickerListSearch">
<xe:this.dataProvider>
<xe:dominoViewValuePicker viewName="(YOURVIEWNAME)">
<xe:this.databaseName><![CDATA[#{javascript:var serv:String = session.getCurrentDatabase().getServer();
serv + "!!" + "YOURDB.nsf";}]]></xe:this.databaseName>
</xe:dominoViewValuePicker>
</xe:this.dataProvider>
</xe:valuePicker>
I don't think you can have both dojo types. But with extlib.dijit.pickerlistsearch, double-clicking selects entries and does allow multiple to be selected. See http://www.intec.co.uk/extension-library-value-picker-and-extlib-dijit-pickerlistsearch/

What is the functioning of fireevent() in HP QTP / UFT?

I am learning HP UFT.
Recently I came across fireevent and I tried to implement it on the website of Flipkart. I was trying to use firevent("onmouseover") for the link Men on the homepage of the website.
I used ChildObjects to find out the Link and WebElement (in two different tests), first Highlighted it and then used object.fireevent("onmouseover") as well as object.fireevent("OnClick"). The OnClick is working and it is showing the link as selected (i.e. the dotted box covering the link when we press tab), but it is not showing the Menu Under Men Section.
I had googled and bingged a lot. But was unable to find the exact working of FireEvent in QTP/UFT.
Please Help me solving the above problem as well as some tutorials on FireEvent.
EDIT: I am using IE 11 for testing.
Motti has already answered the technical definition, but I shall attempt to give you a solution to your functional issue.
In my experience .FireEvent often doesn't work as you would expect. An alternative for something like onmouseover is to simulate user behaviour a bit more closely by actually moving the mouse to the desired location. In our framework we have a little extension function to do just that, a pared-down version of which is shown here:
Sub My_MouseOver(objSender)
Dim absX : absX = objSender.GetROProperty("abs_x")
Dim absY : absY = objSender.GetROProperty("abs_y")
Dim width : width = objSender.GetROProperty("width")
Dim height : height = objSender.GetROProperty("height")
Dim x : x = (absX + (width / 2))
Dim y : y = (absY + (height / 2))
Dim deviceReplay : Set deviceReplay = CreateObject("Mercury.DeviceReplay")
deviceReplay.MouseMove x, y
Reporter.ReportEvent micDone, "A step name", "A useful step description"
End Sub
RegisterUserFunc "Link", "MouseOver", "My_MouseOver"
RegisterUserFunc "WebButton", "MouseOver", "My_MouseOver"
RegisterUserFunc "WebElement", "MouseOver", "My_MouseOver"
As an example you can then do as follows to bring up the "ELECTRONICS" menu overlay on flipkart.com (obviously substitute your own Browser and Page definitions):
Browser("Flipkart").Page("Main Nav").Link("xpath:=//a[#data-tracking-id='electronics']").MouseOver
In the original version there's various extra bits of error handling and custom reporting so it tells you what you clicked on, but the essence is the same. It locates the object on screen, calculates the centre and moves the mouse there. You might want to wait a small amount of time for the menu overlay to appear after doing so before calling .Click on one of the newly-displayed sub-elements.
I found a solution to my problem and it is working perfectly.
Setting.WebPackage("ReplayType") = 2
object.FireEvent "onmouseover"
Setting.WebPackage("ReplayType") = 1
In this case, the object will be:
Browser("name:=Online Shopping.*").Page("name:=Online Shopping.*").Link("innertext:=Men")
I have tried this and it is working fine. I guess, we do not need any alternatives. But I really don't know is, Ctrl+Space is not working for this in UFT. Don't know the reason.
This actually depends on what browser you're using.
Warning: There are exceptions to the information presented in this answer and it also may change in the future. The answer is meant to give a basic understanding but don't depend on it to be true without checking the behaviour for your specific version/use-case.
Originally QTP's FireEvent was supposed to call IE's non-standard fireEvent method.
On Firefox and Chrome this is implemented using the standard dispatchEvent. You should check which events the web site expects to get.
Things get complicated if you mix the event models (the standard DOM level 2 and Microsofts) as explained in this blog post.

Sencha Touch 2 Field Focus

Does anyone know the Sencha Touch 2 equivalent of ExtJS4's:
form.getForm().findField("myfield");
Thanks.
use form.getValues(); assuming you can get the form element... if you needs to do that use refs... on my mobile rigjt now, i can post more sample code later if necessary
I use that way:
var field = vorm.down("textfield[name=username]");
Example:
form.down("selectfield[name=username]").setLabel('User');
form.down("selectfield[name=username]").setValue('email#te');
form.down("selectfield[name=username]").setPlaceHolder('email#test.com');

Facebook Canvas application with Rails 3: Detect if user is a fan

Hello and excuse me again
I am trying to know if user in my canvas application is fan or not. I am working with Rails 3 with fbgraph gem.
So in my controller I try:
def find_auth
if params.has_key? :signed_request
session[:signed_request] = params[:signed_request]
#auth = authorizor.from_signed_request params[:signed_request]
decode_signed_request = Canvas.parse_signed_request(configatron.fb_authentication_app_secret, params[:signed_request])
else
#auth = authorizor.from_signed_request session[:signed_request]
end
end
def authorizor
FbGraph::Auth.new(configatron.fb_authentication_app_key, configatron.fb_authentication_app_secret)
end
however decode_signed_request havenĀ“t got page data only is a hash with 3 elements:
Algorithm
User(age,country and locale)
issued_at
Depending if the user is fan or not i should render a page or another.
If the user is fan show the main content, else i should render a page with a like button. If the user click "like" I should ask for permission in a popup.
Thanks in advance. If you need more information please to comment.
I can solve my problem. In a canvas application this need permissions. However in tab application when i parsed params[:signed_request] exist a key with like information.

Dynamic pagination in JSP

I have a jsp page that has pagination links below to call page by page data from the database.. The links look like this
<< Previous 1 2 3 4 5 6 7 8 9 10 11 Next >>
< a href="getnext.jsp?min=<%=val2%>&max=<%=val1%>> <%=i%> </a> (for link 1)
(where (min=0, max=10) and i = 1 ..The rownum and page index respectively )
The challenge is that this page can have up to 2400 links/pages and i do not wish to create all those links at once. A better implementation would be When the next button is click I want to dynamically create the next set of links say 12 to 20.
Any ideas on how to go about doing this? Thanks
Take a look at DisplayTag. It will set everything up for you, and is highly configurable. A particularly nice feature is that it gives you the option to let it handle slicing up your results, or for you to do it for better performance with large data sets; see the page on external paging and sorting.