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!

uix forms setting default cursor location

410475Dec 11 2003 — edited Aug 30 2005
I have a login form that works but I want to have the cursor start in the first field, called "username".

Right now the cursor is nowhere as far as I can tell and the user must click into the username field before starting to type.

I also want to have the enter key automatically activate the login button without having to click on it with the mouse.

My code is listed below.

Any help is much appreciated.


Regards, Steve


<?xml version="1.0" encoding="windows-1252"?>
<!-- This is Login.uix -->

<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:bc4j="http://xmlns.oracle.com/uix/bc4j"
xmlns:myTemplate="http://www.example.org/demo/templates">

<bc4j:registryDef>
<bc4j:rootAppModuleDef name="SmartLoginAppModule"
definition="smart.Smartbc4jModule"
releaseMode="stateful" >

<bc4j:viewObjectDef name="EroUsersGetUserView1">
</bc4j:viewObjectDef>
</bc4j:rootAppModuleDef>
</bc4j:registryDef>



<content>
<header xmlns="http://xmlns.oracle.com/uix/ui"
text="SMART Login">
<contents>
<form name="form1" method="post">
<contents>
<messageTextInput name="username" prompt="Enter Name" columns="20" />
<messageTextInput name="password" prompt="Enter Password" columns="12"
secret="true" />
<submitButton ctrl:event="login" text="Login" />
</contents>
</form>
</contents>
</header>
</content>
<handlers>
<event name="login" >
<bc4j:findRootAppModule name="SmartLoginAppModule" >
<bc4j:findViewObject name="EroUsersGetUserView1" >
<ctrl:method class="smart.SmartLogin" method="handleLogin" />
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
</handlers>
</page>


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 27 2005
Added on Dec 11 2003
28 comments
2,181 views