Authentication Problem

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Authentication Problem

Marcus-2
Hi,
as some person may knew, i tried to integrate a security filter within my app. And it works somehow, but now i wanted to change from the jsp sides to xhtml and integrate the authentication, better to say, the login-page into my app, so that all pages my have the same design...
 
And now i'm facing the following problem.
A just formed a typical authentication form and placed it on my login.xhtml page, but i cannot submit because my form is surrounded by the
 
<form class="xforms-form" action="/kkbib-new/xforms-server-submit" method="POST" onsubmit="return false">
 
form, which seems to be placed automatically around the hole body-part. I think because of ajax?
Can i disable that or change something, so that i can enable my login-form???
 
Thanks,
Marcus


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Marcus-2
Hi,
one more additional information on that problem:
 
Is there a possibility to place some code on my login.xhtml, so that the epilogue won't copy it inside that main-form, cause my authentication-form doesn't work inside another form. Or someone could tell me, how to workaround that problem. Hope that makes my problem some more clearer. Don't know at the moment how i could explain it more detaild :-( Perhaps by placing the sourcecode of my loaded page in the browser!?
 
That is the sourcecode of the browser viewd login.xhtml page:
 
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="/kkbib-new/config/theme/orbeon.css" type="text/css">
<link rel="stylesheet" href="/kkbib-new/xforms-server/xforms-min.css" type="text/css">
<script type="text/javascript" src="/kkbib-new/xforms-server/xforms-min.js"></script>
<script type="text/javascript">var opsXFormsServerBase = "http://localhost:8085/kkbib-new/";</script>
<link rel="stylesheet" type="text/css" href="/kkbib-new/apps/forms/style.css">
<link rel="stylesheet" href="/kkbib-new/config/theme/xforms-widgets.css" type="text/css">
<title>Search</title>
<meta name="generator" content="Orbeon Forms 3.5.1.200703310056">
</head>
<body>
<table id="main" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<div style="float: left"><img width="140" height="90" style="border: 0 #fff6d4; margin: 0;" src="/kkbib-new/apps/images/logo.jpg" alt="home"></div>
</td>
<td>
<table>
<tr>
<td colspan="2">
<div><span class="menu-head">Bibliothek des Katharinenklosters Nürnberg (Datenbank)</span></div>
</td>
</tr>
<tr>
<td align="left">
        |<a href="/kkbib-new/forms/">Administration</a>
        |<a href="/kkbib-new/search/">Search</a>|
</td>
<td align="right">
|<a href="http://www.orbeon.com/">Orbeon.com</a>
        |
<xforms:select1 model="resources-model" ref="instance('language-instance')">
<xforms:label ref="instance('resources-instance')/search/labels/language-choice"></xforms:label>
<xforms:item>
<xforms:label ref="instance('resources-instance')/search/labels/lang-de"></xforms:label>
<xforms:value>de</xforms:value>
</xforms:item>
<xforms:item>
<xforms:label ref="instance('resources-instance')/search/labels/lang-en"></xforms:label>
<xforms:value>en</xforms:value>
</xforms:item>
<xforms:send ev:event="xforms-value-changed" submission="update-language-submission"></xforms:send>
</xforms:select1>
        |
</td>
</tr>
</table>
</td>
</tr>
</table>
<form class="xforms-form" action="/kkbib-new/xforms-server-submit" method="POST" onsubmit="return false">
    <input type="hidden" name="$static-state" value="session:91B99E68-C076-9F60-4116-09C0E9A7241B">
    <input type="hidden" name="$dynamic-state" value="session:9F6E5D1C-7BBE-5B28-9D95-8B210ACA100F">
    <input type="hidden" name="$server-events" value=""><input type="hidden" name="$client-state" value="">
    <input type="hidden" name="$repeat-tree" value=""><input type="hidden" name="$repeat-indexes" value="">
    <span class="xforms-loading-loading">
Loading...
</span><span class="xforms-loading-none"></span><span class="xforms-loading-error"></span>
    <div><select id="xforms-element-45" class="xforms-control xforms-select1 xforms-select1-appearance-minimal">
<option value="en">English</option>
<option value="fr">French</option></select>
    <label class="xforms-alert xforms-alert-inactive" for="xforms-element-45"></label></div>
<div id="xforms-element-53" class="xforms-control xforms-output xforms-mediatype-text-html xforms-mediatype-text xforms-disabled"></div>
    <label class="xforms-alert xforms-alert-inactive xforms-disabled" for="xforms-element-53"></label><table class="forms-title-table">
<tr>
<td><span id="xforms-element-54" class="xforms-control xforms-output">Datenbank - Volltextsuche</span></td>
</tr>
</table>
<table class="">
<form id="loginForm" action="response.encodeURL(j_security_check)" method="POST">
<tr>
<td>Username:</td>
<td><input type="text" name="j_username" value="username"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="j_password" value="password"></td>
</tr>
<tr>
<td>Remember Me</td>
<td><input type="checkbox" name="j_rememberme" value="true"></td>
</tr>
<tr>
<td></td>
<td><input type="Submit"></td>
</tr>
</form>
</table>
</form>
</body>
</html>
As you can see, my login-form is placed inside the main-form and therefore does not work.
But i need such a login-form on a normal page to do the authentication with my security authentication filter.
Hope that makes my problem clearer, although there isn't much more detail in the doc on the theme authentication :-(
Only that i need a form with special named fields :-(
 
Thanks, Marcus
 
.
 
----- Original Message -----
Sent: Saturday, May 12, 2007 3:24 AM
Subject: [ops-users] Authentication Problem

Hi,
as some person may knew, i tried to integrate a security filter within my app. And it works somehow, but now i wanted to change >from the jsp sides to xhtml and integrate the authentication, better to say, the login-page into my app, so that all pages my have the same design...
 
And now i'm facing the following problem.
A just formed a typical authentication form and placed it on my login.xhtml page, but i cannot submit because my form is surrounded by the
 
<form class="xforms-form" action="/kkbib-new/xforms-server-submit" method="POST" onsubmit="return false">
 
form, which seems to be placed automatically around the hole body-part. I think because of ajax?
Can i disable that or change something, so that i can enable my login-form???
 
Thanks,
Marcus



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Alessandro Vernet
Administrator
In reply to this post by Marcus-2
Marcus,

On 5/12/07, Marcus <[hidden email]> wrote:
> A just formed a typical authentication form and placed it on my login.xhtml
> page, but i cannot submit because my form is surrounded by the
>
> <form class="xforms-form"
> action="/kkbib-new/xforms-server-submit" method="POST"
> onsubmit="return false">
>
> form, which seems to be placed automatically around the hole body-part. I
> think because of ajax?

Are you using XForms in that login page? I would assume you should
not, right? If you are not using XForms, then there should have that
additional <form> element added to the generated HTML.

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Marcus-2
Hi Alex,
sorry, but i did not realy understand that point :-(
And at the moment i'm using xforms on that page too, because of the
language-resource model!
So that every field label could be taken from my resource-files and can also
be renamed when changing the main language!
So, is there another possibilty without having the main form around my
login-form?

Marcus


----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, May 12, 2007 7:22 PM
Subject: Re: [ops-users] Authentication Problem


> Marcus,
>
> On 5/12/07, Marcus <[hidden email]> wrote:
>> A just formed a typical authentication form and placed it on my
>> login.xhtml
>> page, but i cannot submit because my form is surrounded by the
>>
>> <form class="xforms-form"
>> action="/kkbib-new/xforms-server-submit" method="POST"
>> onsubmit="return false">
>>
>> form, which seems to be placed automatically around the hole body-part. I
>> think because of ajax?
>
> Are you using XForms in that login page? I would assume you should
> not, right? If you are not using XForms, then there should have that
> additional <form> element added to the generated HTML.
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms for the Enterprise
> http://www.orbeon.com/
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Erik Bruchez
Administrator
Marcus wrote:
> Hi Alex,
> sorry, but i did not realy understand that point :-(
> And at the moment i'm using xforms on that page too, because of the
> language-resource model!
> So that every field label could be taken from my resource-files and can
> also be renamed when changing the main language!
> So, is there another possibilty without having the main form around my
> login-form?

Currently, the XForms engine places the HTML <form> element as the first
child of the <body> element. It is hard-coded within XHTMLBodyHandler.java.

Currently, the only way I see to change this is to add your HTML form
after XForms processing takes place, in theme-*.xsl.

This is not very optimal, but clearly things right now are not designed
so you can easily mix HTML and XForms forms.

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Marcus-2
Hi Erik,
the problem is, that i need this login-form only on ONE page, and not on
all!
Is there another way to create such a login-form? In the doc there only
stands how the fields should be named, but nowhere how to create such a
login-form! can this be done with xforms?
If not, perhaps it would be a good adon for the future to be able to mark
sections in a page, that should not be tranformed (printed outside the
"main-form" or like in the epilogue and themes - that should explicit be
transformed, like such a xforms-control i tried to place there!
I would find that very useful!!!

Thanks, Marcus


----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, May 12, 2007 11:07 PM
Subject: Re: [ops-users] Authentication Problem


> Marcus wrote:
>> Hi Alex,
>> sorry, but i did not realy understand that point :-(
>> And at the moment i'm using xforms on that page too, because of the
>> language-resource model!
>> So that every field label could be taken from my resource-files and can
>> also be renamed when changing the main language!
>> So, is there another possibilty without having the main form around my
>> login-form?
>
> Currently, the XForms engine places the HTML <form> element as the first
> child of the <body> element. It is hard-coded within
> XHTMLBodyHandler.java.
>
> Currently, the only way I see to change this is to add your HTML form
> after XForms processing takes place, in theme-*.xsl.
>
> This is not very optimal, but clearly things right now are not designed
> so you can easily mix HTML and XForms forms.
>
> -Erik
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

fl.schmitt(ops-users)
Hi,

Marcus schrieb:

> Is there another way to create such a login-form? In the doc there only
> stands how the fields should be named, but nowhere how to create such a
> login-form! can this be done with xforms?

maybe one could use the REST processor to create the authentication
request. In case of Tomcat, it looks simply like:

GET /[context-name]/j_security_check?j_username=[username]&j_password=[pw]

The following proccessors (depending on an input containing the
credentials) could create and send such a request:

        &lt;p:processor name="oxf:xslt">
                &lt;p:input name="data" href="#instance" />
                &lt;p:input name="config">
                &lt;parameters xsl:version="2.0">
                                &lt;j_username>&lt;xsl:value-of select="//username" />&lt;/j_username>
                                &lt;j_password>&lt;xsl:value-of select="//password" />&lt;/j_password>
                        &lt;/parameters>
                &lt;/p:input>
                &lt;p:output name="data" id="credentials" />
        &lt;/p:processor>

        &lt;p:processor name="oxf:xforms-submission">
                &lt;p:input name="submission">
                        &lt;xforms:submission
                                method="get"
                                action="/j_security_check"
                                separator="&amp;" />
                &lt;/p:input>
                &lt;p:input name="request" href="#credentials" />
                &lt;p:output
                        name="response"
                        id="response" />
        &lt;/p:processor>

But there are some big problems: The credentials are transmitted
unencrypted, and i don't know how to encrypt them before building the
REST submission; and the submission of the REST request throws a
xforms-submit-error event because of the GET request, the resonse seems
to be html instead of XML? The error message is "Body received with
non-XML media type for replace="instance": text/html".

One could ignore that error and load the protected resource in both
cases (submit-done and submit-error):

<xforms:submission id="login-submission"
                method="post"
                ref="instance('login-data')"
                action="/login-action"
                replace="none">
            <xforms:load ev:event="xforms-submit-done"
resource="/protected" />
            <xforms:load ev:event="xforms-submit-error"
resource="/protected" />
        </xforms:submission>

But that's technically far from a clean solution... Regarding the
problems, it may be better to divide the authentication from the xforms
pages and implement a language selection on the login page with
javascript (the user may have to select the language again on the xforms
pages after authentication).


florian



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Erik Bruchez
Administrator
In reply to this post by Marcus-2
Marcus,

The problem here is not how to create a login form: it is how to create
a form that mixes XForms and regular HTML forms. You can easily 1)
create a regular login form if you don't want any XForms on it, and 2)
easily create an XForms page without any hand-created HTML forms on it.

I agree that it would be nice to have the option to do so, however this
is the first time this issue comes up, as I guess in most cases people
are happy enough with a very simple HTML login form that does not
contain any XForms. Of course it is frustrating when you are the first
person to hit a particular problem ;-)

Now you could still hack away a solution. If you look at the epilogue
pipeline, you will notice for example that there are ways of checking on
the current request path with things like:

<p:when test="starts-with(/request/request-path, '/doc/')">

So using this mechanism you could in the epilogue decide to do the
special handling for the login page only, by testing on the path for the
login page, and calling up a different theme stylesheet depending on the
path.

-Erik

Marcus wrote:

> Hi Erik,
> the problem is, that i need this login-form only on ONE page, and not on
> all!
> Is there another way to create such a login-form? In the doc there only
> stands how the fields should be named, but nowhere how to create such a
> login-form! can this be done with xforms?
> If not, perhaps it would be a good adon for the future to be able to
> mark sections in a page, that should not be tranformed (printed outside
> the "main-form" or like in the epilogue and themes - that should
> explicit be transformed, like such a xforms-control i tried to place there!
> I would find that very useful!!!
>
> Thanks, Marcus
>
>
> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
> To: <[hidden email]>
> Sent: Saturday, May 12, 2007 11:07 PM
> Subject: Re: [ops-users] Authentication Problem
>
>
>> Marcus wrote:
>>> Hi Alex,
>>> sorry, but i did not realy understand that point :-(
>>> And at the moment i'm using xforms on that page too, because of the
>>> language-resource model!
>>> So that every field label could be taken from my resource-files and can
>>> also be renamed when changing the main language!
>>> So, is there another possibilty without having the main form around my
>>> login-form?
>>
>> Currently, the XForms engine places the HTML <form> element as the first
>> child of the <body> element. It is hard-coded within
>> XHTMLBodyHandler.java.
>>
>> Currently, the only way I see to change this is to add your HTML form
>> after XForms processing takes place, in theme-*.xsl.
>>
>> This is not very optimal, but clearly things right now are not designed
>> so you can easily mix HTML and XForms forms.
>>
>> -Erik
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>
>>
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Marcus-2
Hi Erik,
i did it exactly that way before you wrote this mail, by checking the
request-path and adding the html-form through the theme-plain only to my
login-page! But i'm not realy happy with that solution at all! You mentioned
that it would be possible to creat a "normal" html-login-form without any
xforms-controls on it. Can i use that as a normal page by only adding the
main-menu with theme-widgets? Or did you ment a full html-page without ANY
connection to the epilogue?

So, while there isn't another way of mixing those to parts i'll leave it the
way it is at the moment!
Thanks, Marcus


----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Sunday, May 13, 2007 6:46 PM
Subject: Re: [ops-users] Authentication Problem


> Marcus,
>
> The problem here is not how to create a login form: it is how to create
> a form that mixes XForms and regular HTML forms. You can easily 1)
> create a regular login form if you don't want any XForms on it, and 2)
> easily create an XForms page without any hand-created HTML forms on it.
>
> I agree that it would be nice to have the option to do so, however this
> is the first time this issue comes up, as I guess in most cases people
> are happy enough with a very simple HTML login form that does not
> contain any XForms. Of course it is frustrating when you are the first
> person to hit a particular problem ;-)
>
> Now you could still hack away a solution. If you look at the epilogue
> pipeline, you will notice for example that there are ways of checking on
> the current request path with things like:
>
> <p:when test="starts-with(/request/request-path, '/doc/')">
>
> So using this mechanism you could in the epilogue decide to do the
> special handling for the login page only, by testing on the path for the
> login page, and calling up a different theme stylesheet depending on the
> path.
>
> -Erik
>
> Marcus wrote:
>> Hi Erik,
>> the problem is, that i need this login-form only on ONE page, and not on
>> all!
>> Is there another way to create such a login-form? In the doc there only
>> stands how the fields should be named, but nowhere how to create such a
>> login-form! can this be done with xforms?
>> If not, perhaps it would be a good adon for the future to be able to
>> mark sections in a page, that should not be tranformed (printed outside
>> the "main-form" or like in the epilogue and themes - that should
>> explicit be transformed, like such a xforms-control i tried to place
>> there!
>> I would find that very useful!!!
>>
>> Thanks, Marcus
>>
>>
>> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Saturday, May 12, 2007 11:07 PM
>> Subject: Re: [ops-users] Authentication Problem
>>
>>
>>> Marcus wrote:
>>>> Hi Alex,
>>>> sorry, but i did not realy understand that point :-(
>>>> And at the moment i'm using xforms on that page too, because of the
>>>> language-resource model!
>>>> So that every field label could be taken from my resource-files and can
>>>> also be renamed when changing the main language!
>>>> So, is there another possibilty without having the main form around my
>>>> login-form?
>>>
>>> Currently, the XForms engine places the HTML <form> element as the first
>>> child of the <body> element. It is hard-coded within
>>> XHTMLBodyHandler.java.
>>>
>>> Currently, the only way I see to change this is to add your HTML form
>>> after XForms processing takes place, in theme-*.xsl.
>>>
>>> This is not very optimal, but clearly things right now are not designed
>>> so you can easily mix HTML and XForms forms.
>>>
>>> -Erik
>>>
>>> --
>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>>> http://www.orbeon.com/
>>>
>>>
>>
>>
>> --------------------------------------------------------------------------------
>>
>>
>>
>>>
>>> --
>>> You receive this message as a subscriber of the
>>> [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>>
>>
>>
>
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Erik Bruchez
Administrator
Marcus,

I agree, it's not a nice solution!

I meant an XHTML page without any XForms in it. This means that the page
won't go through XForms processing in the xforms-epilogue.xpl, but it
will go through the rest of the epilogue.

So yes, this will be a normal page, except no XForms processing will
happen on it.

-Erik

Marcus wrote:

> Hi Erik,
> i did it exactly that way before you wrote this mail, by checking the
> request-path and adding the html-form through the theme-plain only to my
> login-page! But i'm not realy happy with that solution at all! You
> mentioned that it would be possible to creat a "normal" html-login-form
> without any xforms-controls on it. Can i use that as a normal page by
> only adding the main-menu with theme-widgets? Or did you ment a full
> html-page without ANY connection to the epilogue?
>
> So, while there isn't another way of mixing those to parts i'll leave it
> the way it is at the moment!
> Thanks, Marcus
>
>
> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
> To: <[hidden email]>
> Sent: Sunday, May 13, 2007 6:46 PM
> Subject: Re: [ops-users] Authentication Problem
>
>
>> Marcus,
>>
>> The problem here is not how to create a login form: it is how to create
>> a form that mixes XForms and regular HTML forms. You can easily 1)
>> create a regular login form if you don't want any XForms on it, and 2)
>> easily create an XForms page without any hand-created HTML forms on it.
>>
>> I agree that it would be nice to have the option to do so, however this
>> is the first time this issue comes up, as I guess in most cases people
>> are happy enough with a very simple HTML login form that does not
>> contain any XForms. Of course it is frustrating when you are the first
>> person to hit a particular problem ;-)
>>
>> Now you could still hack away a solution. If you look at the epilogue
>> pipeline, you will notice for example that there are ways of checking on
>> the current request path with things like:
>>
>> <p:when test="starts-with(/request/request-path, '/doc/')">
>>
>> So using this mechanism you could in the epilogue decide to do the
>> special handling for the login page only, by testing on the path for the
>> login page, and calling up a different theme stylesheet depending on the
>> path.
>>
>> -Erik
>>
>> Marcus wrote:
>>> Hi Erik,
>>> the problem is, that i need this login-form only on ONE page, and not on
>>> all!
>>> Is there another way to create such a login-form? In the doc there only
>>> stands how the fields should be named, but nowhere how to create such a
>>> login-form! can this be done with xforms?
>>> If not, perhaps it would be a good adon for the future to be able to
>>> mark sections in a page, that should not be tranformed (printed outside
>>> the "main-form" or like in the epilogue and themes - that should
>>> explicit be transformed, like such a xforms-control i tried to place
>>> there!
>>> I would find that very useful!!!
>>>
>>> Thanks, Marcus
>>>
>>>
>>> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
>>> To: <[hidden email]>
>>> Sent: Saturday, May 12, 2007 11:07 PM
>>> Subject: Re: [ops-users] Authentication Problem
>>>
>>>
>>>> Marcus wrote:
>>>>> Hi Alex,
>>>>> sorry, but i did not realy understand that point :-(
>>>>> And at the moment i'm using xforms on that page too, because of the
>>>>> language-resource model!
>>>>> So that every field label could be taken from my resource-files and
>>>>> can
>>>>> also be renamed when changing the main language!
>>>>> So, is there another possibilty without having the main form around my
>>>>> login-form?
>>>>
>>>> Currently, the XForms engine places the HTML <form> element as the
>>>> first
>>>> child of the <body> element. It is hard-coded within
>>>> XHTMLBodyHandler.java.
>>>>
>>>> Currently, the only way I see to change this is to add your HTML form
>>>> after XForms processing takes place, in theme-*.xsl.
>>>>
>>>> This is not very optimal, but clearly things right now are not designed
>>>> so you can easily mix HTML and XForms forms.
>>>>
>>>> -Erik
>>>>
>>>> --
>>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>>>> http://www.orbeon.com/
>>>>
>>>>
>>>
>>>
>>> --------------------------------------------------------------------------------
>>>
>>>
>>>
>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the
>>>> [hidden email] mailing list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>>>
>>>
>>>
>>
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>
>>
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Chris Bailey-2
In reply to this post by Erik Bruchez
I'd like to add that I feel this is quite an annoying problem. I have a
search field on every web page which I have to code twice depending on
whether the page is an xforms one or not.


<c:choose>
 <c:when test="${isInXForm == 'true'}">
  <input value="search" name="s" id="s" class="searchbox" type="text"
onkeydown="if (event.keyCode == 13 || event.which == 13) {
location.href='../locate/search.jspx?s='+document.getElementById('s').value;}"/>
  <input id="searchsubmit" value="search" class="searchbutton"
type="button"
onclick="location.href='../locate/search.jspx?s='+document.getElementById('s').value"/>
 </c:when>
 <c:otherwise>
  <form method="get" class="sbform" action="../locate/search.jspx">
   <input value="search" name="s" id="s" class="searchbox" type="text"/>
   <input id="searchsubmit" value="search" class="searchbutton"
type="submit"/>
  </form>
 </c:otherwise>
</c:choose>


I feel the best solution would be for the <form> element to only wrap the
outer-most xform statement in the body of the page.

Chris.

--On 12 May 2007 23:07 +0200 Erik Bruchez <[hidden email]> wrote:

> Marcus wrote:
>> Hi Alex,
>> sorry, but i did not realy understand that point :-(
>> And at the moment i'm using xforms on that page too, because of the
>> language-resource model!
>> So that every field label could be taken from my resource-files and can
>> also be renamed when changing the main language!
>> So, is there another possibilty without having the main form around my
>> login-form?
>
> Currently, the XForms engine places the HTML <form> element as the first
> child of the <body> element. It is hard-coded within
> XHTMLBodyHandler.java.
>
> Currently, the only way I see to change this is to add your HTML form
> after XForms processing takes place, in theme-*.xsl.
>
> This is not very optimal, but clearly things right now are not designed
> so you can easily mix HTML and XForms forms.
>
> -Erik


--
----------------------
Chris Bailey
[hidden email]



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Erik Bruchez
Administrator
Chris Bailey wrote:
 > I'd like to add that I feel this is quite an annoying problem. I have a
 > search field on every web page which I have to code twice depending on
 > whether the page is an xforms one or not.
 >
 >
 > <c:choose>
 > <c:when test="${isInXForm == 'true'}">
 >  <input value="search" name="s" id="s" class="searchbox" type="text"
 > onkeydown="if (event.keyCode == 13 || event.which == 13) {
 >
location.href='../locate/search.jspx?s='+document.getElementById('s').value;}"/>

 >
 >  <input id="searchsubmit" value="search" class="searchbutton"
 > type="button"
 >
onclick="location.href='../locate/search.jspx?s='+document.getElementById('s').value"/>

 >
 > </c:when>
 > <c:otherwise>
 >  <form method="get" class="sbform" action="../locate/search.jspx">
 >   <input value="search" name="s" id="s" class="searchbox" type="text"/>
 >   <input id="searchsubmit" value="search" class="searchbutton"
 > type="submit"/>
 >  </form>
 > </c:otherwise>
 > </c:choose>
 >
 >
 > I feel the best solution would be for the <form> element to only wrap
 > the outer-most xform statement in the body of the page.

That would be the best, but harder to do. For example you could have:

<body>
   <p/>
   <div>
     <xforms:input .../>
   </div>
   <xforms:textarea .../>
</body>

Then you need to generate the <form> element around everything:

<body>
   <p/>
   <form ...>
     <div>
       [HTML for <xforms:input .../>]
      </div>
     [HTML for <xforms:textarea .../>]
   </form>
</body>

Note that we don't have a DOM with all the XHTML+XForms: we have a DOM
with the XForms controls only, and a SAXStore object (containing the
XHTML+XForms) usable during the initial generation of the XHTML page,
which contains everything but on which you cannot use XPath.

Can somebody see a simple and efficient algorithm?

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Marcus-2
Hi,
if you don't have to mix up HTML and XForms, just like i did in the first,
just choose the theme-plain.xsl for insert the html-form or use the
theme-widgets.xsl to insert the xforms.control to every singel page! Or did
i missunderstood what you ar trying to do? :-)
Hope that helps,
Marcus

----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Monday, May 14, 2007 8:34 PM
Subject: Re: [ops-users] Authentication Problem


> Chris Bailey wrote:
> > I'd like to add that I feel this is quite an annoying problem. I have a
> > search field on every web page which I have to code twice depending on
> > whether the page is an xforms one or not.
> >
> >
> > <c:choose>
> > <c:when test="${isInXForm == 'true'}">
> >  <input value="search" name="s" id="s" class="searchbox" type="text"
> > onkeydown="if (event.keyCode == 13 || event.which == 13) {
> >
> location.href='../locate/search.jspx?s='+document.getElementById('s').value;}"/>
>
> >
> >  <input id="searchsubmit" value="search" class="searchbutton"
> > type="button"
> >
> onclick="location.href='../locate/search.jspx?s='+document.getElementById('s').value"/>
>
> >
> > </c:when>
> > <c:otherwise>
> >  <form method="get" class="sbform" action="../locate/search.jspx">
> >   <input value="search" name="s" id="s" class="searchbox" type="text"/>
> >   <input id="searchsubmit" value="search" class="searchbutton"
> > type="submit"/>
> >  </form>
> > </c:otherwise>
> > </c:choose>
> >
> >
> > I feel the best solution would be for the <form> element to only wrap
> > the outer-most xform statement in the body of the page.
>
> That would be the best, but harder to do. For example you could have:
>
> <body>
>   <p/>
>   <div>
>     <xforms:input .../>
>   </div>
>   <xforms:textarea .../>
> </body>
>
> Then you need to generate the <form> element around everything:
>
> <body>
>   <p/>
>   <form ...>
>     <div>
>       [HTML for <xforms:input .../>]
>      </div>
>     [HTML for <xforms:textarea .../>]
>   </form>
> </body>
>
> Note that we don't have a DOM with all the XHTML+XForms: we have a DOM
> with the XForms controls only, and a SAXStore object (containing the
> XHTML+XForms) usable during the initial generation of the XHTML page,
> which contains everything but on which you cannot use XPath.
>
> Can somebody see a simple and efficient algorithm?
>
> -Erik
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Erik Bruchez
Administrator
Marcus,

I think that Chris is simply suggesting that Orbeon Forms should try not
to put the <form> element always as the first child element of <body>,
but to put it in a more optimal place.

-Erik

Marcus wrote:

> Hi,
> if you don't have to mix up HTML and XForms, just like i did in the
> first, just choose the theme-plain.xsl for insert the html-form or use
> the theme-widgets.xsl to insert the xforms.control to every singel page!
> Or did i missunderstood what you ar trying to do? :-)
> Hope that helps,
> Marcus
>
> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, May 14, 2007 8:34 PM
> Subject: Re: [ops-users] Authentication Problem
>
>
>> Chris Bailey wrote:
>> > I'd like to add that I feel this is quite an annoying problem. I have a
>> > search field on every web page which I have to code twice depending on
>> > whether the page is an xforms one or not.
>> >
>> >
>> > <c:choose>
>> > <c:when test="${isInXForm == 'true'}">
>> >  <input value="search" name="s" id="s" class="searchbox" type="text"
>> > onkeydown="if (event.keyCode == 13 || event.which == 13) {
>> >
>> location.href='../locate/search.jspx?s='+document.getElementById('s').value;}"/>
>>
>>
>> >
>> >  <input id="searchsubmit" value="search" class="searchbutton"
>> > type="button"
>> >
>> onclick="location.href='../locate/search.jspx?s='+document.getElementById('s').value"/>
>>
>>
>> >
>> > </c:when>
>> > <c:otherwise>
>> >  <form method="get" class="sbform" action="../locate/search.jspx">
>> >   <input value="search" name="s" id="s" class="searchbox" type="text"/>
>> >   <input id="searchsubmit" value="search" class="searchbutton"
>> > type="submit"/>
>> >  </form>
>> > </c:otherwise>
>> > </c:choose>
>> >
>> >
>> > I feel the best solution would be for the <form> element to only wrap
>> > the outer-most xform statement in the body of the page.
>>
>> That would be the best, but harder to do. For example you could have:
>>
>> <body>
>>   <p/>
>>   <div>
>>     <xforms:input .../>
>>   </div>
>>   <xforms:textarea .../>
>> </body>
>>
>> Then you need to generate the <form> element around everything:
>>
>> <body>
>>   <p/>
>>   <form ...>
>>     <div>
>>       [HTML for <xforms:input .../>]
>>      </div>
>>     [HTML for <xforms:textarea .../>]
>>   </form>
>> </body>
>>
>> Note that we don't have a DOM with all the XHTML+XForms: we have a DOM
>> with the XForms controls only, and a SAXStore object (containing the
>> XHTML+XForms) usable during the initial generation of the XHTML page,
>> which contains everything but on which you cannot use XPath.
>>
>> Can somebody see a simple and efficient algorithm?
>>
>> -Erik
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>
>>
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication Problem

Marcus-2
OK, i see,
but as you told me, that isn't possible right now, because that "main-form"
as i used to say is hardcoded at the moment?
Thought that was one reason i couldn't insert my html-authentication-form
through a normal xhtml-page, and had to do it with the workaround through
theme-plain and testing the page-url :-)

Sorry, if i mixed that up. For me Chris question was a way to place that
search-field on every page without having to differ between xforms and html.

Marcus

----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Monday, May 14, 2007 8:47 PM
Subject: Re: [ops-users] Authentication Problem


> Marcus,
>
> I think that Chris is simply suggesting that Orbeon Forms should try not
> to put the <form> element always as the first child element of <body>,
> but to put it in a more optimal place.
>
> -Erik
>
> Marcus wrote:
>> Hi,
>> if you don't have to mix up HTML and XForms, just like i did in the
>> first, just choose the theme-plain.xsl for insert the html-form or use
>> the theme-widgets.xsl to insert the xforms.control to every singel page!
>> Or did i missunderstood what you ar trying to do? :-)
>> Hope that helps,
>> Marcus
>>
>> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Monday, May 14, 2007 8:34 PM
>> Subject: Re: [ops-users] Authentication Problem
>>
>>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws