Hey,
I don't know if this helps but I did the following :
The buttons etc have to be part of some container, so I derived a class
qx.Class.define("login.Form",
{
extend : qx.ui.container.Composite,
construct : function ( layout, attributes ) {
this._attributes = attributes || null;
this.base ( arguments, layout );
},
members : {
// overridden
_createContentElement : function ( ) {
var content = new qx.html.Element ( "form", null, this._attributes );
return content;
}
}
} );
and then used it like this:
var clogin = new login.Form ( new qx.ui.layout.Canvas ( ), {
name: "loginForm", method: "POST" } );
clogin.setLayoutProperties ( { left: 0, top: 0, right: 0, bottom:
0 } );
var name = new qx.ui.form.TextField ( "<Username>" );
var passwd = new qx.ui.form.PasswordField ( null );
name.setLayoutProperties ( { left: 10, top: 10, right: 10 } );
passwd.setLayoutProperties ( { left: 10, top: 45, right: 10 } );
clogin.add ( name );
clogin.add ( passwd );
this.add ( clogin );
This would create the form element and style the widgets accordingly.
However I may end up using standard AJAX + BE logic to do the pre-fill
based on cookies.
Interesting though how many ppl run into the same or similar issues wrt
forms. Would you mind sharing your solution with us once you're done ?
Thanks,
Varol
On 10/09/2013 01:11 PM, schlagges wrote:
> Hi,
>
> I have some trouble with an async ajax based login.There is a older post
> about that with no solution:
> http://qooxdoo.678.n2.nabble.com/Getting-browser-to-save-user-name-and-password-td5018207.html
>
> My goal is, to get all the browsers to ask me for saving my login data
> (username and password) like this usual behavior is found on every
> login-form in the www. I have a qx.desktop Application.
>
>
> I've tried some diffrent approaches but none of them satisfies my needs:
>
> I've used some native form elements: qx.html.Element("form"),
> qx.html.Element("button") and so on. This seems to be the right way but the
> problems are: The is no propper way, to use the elements in a qx way like
> styling (appearance + decorator). Manual styling leeds into lots of diffrent
> looks in diffrent browsers - plus there is no way to use appearances which I
> need for hoover effects and other states-based things.
>
> I did it like this:
> var nameInput = new qx.html.Input("text",null,{
> name : "name",
> id : "userLoginName",
> tabindex : 1,
> style : "height: 18px; width: 100%; padding: 2"
> });
> var inputStyles =
> qx.theme.manager.Decoration.getInstance().resolve("inputField").getStyles();
> nameInput.addListener("appear",function (e){
> qx.bom.element.Style.setStyles(nameInput.getDomElement(), inputStyles);
> });
>
> But this only apply decororator styles and none of the appearance styles
> (like padding) to my native elements. Hitting TAB has no effect. It should
> have switched the focus between name and password field but it doesn't.
> (Maybe this could be solved with a brave look at the focusManager).
>
> Another approach was, to use an hidden native form and valueBinding, but the
> doesn't really work because my browser offers me a dropDown at known form
> fields with all the known user names where I can select one and the password
> field is filled automatically.And I don't have a clue about how to get this
> dropDown from a hidden form field to a qx.ui.form.TextField. This didn't
> seem to be the right way.
>
>
> What I found out: The whole problem is due to the fact, that qooxdoo didn't
> use a HTML-form element and so the Browsers don't ask the user to save the
> password. So I look for way, to use a <from> Tag in a qx Widget or the right
> way to add my decorators + appearances to qx.html.* Elements.
>
>
> Sry that I can't spend more code to this post about my diffrent approaches
> but just struggle around a time, and deleted the code after I get stucked.It
> never came to my mind that I couldn't solve this and have to post to the
> mailing list.
>
> I've spent the whole day without a propper solution so I hope you guys have
> a good idea for that. I can't be the only one with this Problem.
> PS: I DON'T want to use cookies or s/th like that, I want (I have to) use
> the browser.
>
> greetings,
> schlagges
>
>
>
> --
> View this message in context:
> http://qooxdoo.678.n2.nabble.com/Let-the-browser-save-the-passwords-tp7584742.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel