You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Martin Beránek <ma...@i.cz> on 2006/07/18 09:01:29 UTC
tobago user login
Hi,
I'm using tobago for jsf web devel. I don't now why, but tobago (meybe tc:page tag) cover whole page into one form. And
I have problem to submit my form for standard tomcat web auth (j_security_check). (I have simple component that generate
this form in page - works well with MyFaces core and Tomahawk)
Is here any other elegant way, how to login user. Or what are you using for auth inside JSF environment?
Thanks
--
Martin
Re: tobago user login
Posted by Martin Beránek <ma...@i.cz>.
thanks! after id correction in getElementById it works well.
Philippe Hennes wrote:
> <tx:in id="j_username" required="true" label="Username" />
>
> <tx:in id="j_password" required="true" password="true"
> label="Password" />
>
> <tc:button
> action="login('#{facesContext.externalContext.requestContextPath}');"
> type="script" defaultCommand="true" label="Login" />
>
> <tc:script>
> function login(contextPath) {
> var input_user =
> document.getElementById("page:login_jsp:j_username");
> input_user.name = "j_username";
> var input_pass =
> document.getElementById("page:login_jsp:j_password");
> input_pass.name = "j_password";
> document.forms[0].action = contextPath + "/j_security_check";
> document.forms[0].submit();
> }
> </tc:script>
--
Martin
Re: tobago user login
Posted by Philippe Hennes <ph...@atanion.com>.
Hi Martin,
we only have a kind of workaround for that:
<tx:in id="j_username" required="true" label="Username" />
<tx:in id="j_password" required="true" password="true"
label="Password" />
<tc:button
action="login('#{facesContext.externalContext.requestContextPath}');"
type="script" defaultCommand="true" label="Login" />
<tc:script>
function login(contextPath) {
var input_user =
document.getElementById("page:login_jsp:j_username");
input_user.name = "j_username";
var input_pass =
document.getElementById("page:login_jsp:j_password");
input_pass.name = "j_password";
document.forms[0].action = contextPath + "/j_security_check";
document.forms[0].submit();
}
</tc:script>
regards
phil
Martin Beránek wrote:
> Hi,
>
> I'm using tobago for jsf web devel. I don't now why, but tobago (meybe tc:page tag) cover whole page into one form. And
> I have problem to submit my form for standard tomcat web auth (j_security_check). (I have simple component that generate
> this form in page - works well with MyFaces core and Tomahawk)
>
> Is here any other elegant way, how to login user. Or what are you using for auth inside JSF environment?
>
> Thanks
>
--
Philippe Hennes - Web Developer - Atanion GmbH
Software Development - Bismarckstrasse 13 - 26122 Oldenburg - Germany
phone +49 441 4082321 - mobile +49 173 2432664 - fax +49 441 4082333
mailto:philippe.hennes@atanion.com - http://www.atanion.com