Touchkit and LoginForm

Is there a correct way to implement a login function using Touchkit?
I tried LoginForm but it uses Panel and CustomComponent and these aren’t supported in Touchkit 2.1.3.
So I made my own Form which works okay except that Touchkit doesn’t like PasswordField nor will it allow me to setSecret on the password, so I made it a TextField and the password is then visible (ie not quite what I want)
Also the com.vaadin.ui.LoginForm.LoginListener interface wants a com.vaadin.ui.LoginForm.LoginEvent which can only be instantiated from a LoginForm. I have worked around that by writing my own interface, but I am wondering if I’m doing more work than I need to do here.
Thanks for any help
Roger

Hi,

Panel, CustomComponent and LoginForm can well be used with TouchKit. Same goes for password field. Theme might need some theme tweaks to do but otherwise they should work just fine.

If you have used Vornitologist as your starting point your might need to add used classes to optimized
widgetset generator
or disable it altogether from the …gwt.xml file.

BTW, If you use LoginForm with TouchKit app, I’d encourage to add proper html5 field parameters to username/email input element. That infamous autocorrect in touch devices is really frustrating on username field :grin:

cheers,
matti

Hi Matti,

What I am seeing is the dreaded NO CLIENT IMPLEMENTATION FOUND for CustomComponent

com.vaadin.ui.CustomComponent(NO CLIENT IMPLEMENTATION FOUND) id=PID5 height=300px width=100.0% style=v-loginform

This is after I changed the gwt.xml file to look like this:

<module>
  <inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
  <inherits name="com.vaadin.addon.touchkit.gwt.TouchKitWidgetSet" />
</module>

I definitely did a widget compile after making these changes (I’ve forgotten to do this sometimes…)
Then, in my code, I instantiate com.vaadin.ui.LoginForm and add that to a CssLayout (addComponent()) which is, in turn, set into my main window (setContent()). This is a simplification from what I want to do. In the desktop version of this I add my own html to LoginForm. But I’ll see if I can get this working first. At this stage I don’t need it to look pretty, just do something useful.

So do I have to mess with the Theme to get it working at all? Or have I made a mistake in the above somewhere?

If I change it around a bit to use the same code as the desktop version of the login I do see NO CLIENT IMPLEMENTATION FOUND for both com.vaadin.ui.Panel and com.vaadin.ui.VerticalLayout. This isn’t necessarily a problem because I can change that code around to eliminate Panel and VerticalLayout once I can get LoginForm working. But that code does use its own HTML. I’m not sure it is HTML 5 yet, but it will be once I can start using it.

Also PasswordField does, indeed, work as you said it would, once I removed the WidgetMapGenerator.

Thanks for your help
Roger