Customizing Login Screen for different components

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Customizing Login Screen for different components

Rene Scheibe
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have created different components in the hot-deploy folder that
provide a webapp. The require different login credentials.

The question is, how to customize the Login Screen to show the name of
the webapp?

I just figured out that if a user hasn't logged in yet, the screen
"login" from framework/common/widget/CommonScreens.xml is always used. I
don't know how to use another one or to customize it as there no
<decorator-section-include> elements contained in it.

Cheers,
Rene
- --
René Scheibe * [hidden email] * +49-176-62192936
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock
Sitz: Unterföhring * Amtsgericht München * HRB 135082
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxADDMACgkQUXs9EHvIuCqWxwCfcJnLjtziOTnqFz5Z5wsylfk8
nUIAn37tI+3um3U/qUWH/Ul359MFrqyn
=00wx
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: Customizing Login Screen for different components

Bilgin Ibryam-2
Hi Rene,

1. you can set different decorators for login screen in each web-app by
specifying mainDecoratorLocation parameter in web.xml
2. Or you can create a brand new login screen and use it, by overriding
login screen location. Simply add path to the new login screen in your
controller.

HTH
Bilgin

On Fri, Jul 16, 2010 at 8:37 AM, Rene Scheibe <[hidden email]>wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I have created different components in the hot-deploy folder that
> provide a webapp. The require different login credentials.
>
> The question is, how to customize the Login Screen to show the name of
> the webapp?
>
> I just figured out that if a user hasn't logged in yet, the screen
> "login" from framework/common/widget/CommonScreens.xml is always used. I
> don't know how to use another one or to customize it as there no
> <decorator-section-include> elements contained in it.
>
> Cheers,
> Rene
> - --
> René Scheibe * [hidden email] * +49-176-62192936
> TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
> Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock
> Sitz: Unterföhring * Amtsgericht München * HRB 135082
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxADDMACgkQUXs9EHvIuCqWxwCfcJnLjtziOTnqFz5Z5wsylfk8
> nUIAn37tI+3um3U/qUWH/Ul359MFrqyn
> =00wx
> -----END PGP SIGNATURE-----
>
Reply | Threaded
Open this post in threaded view
|

Re: Customizing Login Screen for different components

Robert Gan
Hello, I have a similar question.

I use a differentiation if the user has javascript (short: JS) activated, or deactivated.

In case of JS, I show a lot of content in a layered window, so I do not need the decorator, left and rightbar and so on. In the other case, I want to show all in the page, as it is as default in ofbiz (with decorator and so on).

My problem is now the XML authentification. If the user is not logged in, it shows the loginscreen with all decorator etc. BUt i just need the login-screen. If I overwrite the loginscreen, I have the problem with users without JS activated, cause the decorators etc. are not shown. So my question is, if I have to check this in the java file, and return another respons to make the differentiation, or can I do sth. in xml? Like a session value check with if/else ... or are there other possibilities?

please let me know.

Robert
Reply | Threaded
Open this post in threaded view
|

Re: Customizing Login Screen for different components

Deepak Dixit-2
Hi Robert,

Please refer doRequest RequestHandler.java.

There is code exists for the same, you can change it as per your requirement or you can add additional check in login screen decorator to include decorator or only to show only loginscreen based on same check:

============================
if (!"success".equalsIgnoreCase(checkLoginReturnString)) {
                // previous URL already saved by event, so just do as the return says...
                eventReturn = checkLoginReturnString;
                // if the request is an ajax request we don't want to return the default login check
                if (!"XMLHttpRequest".equals(request.getHeader("X-Requested-With"))) {
                    requestMap = requestMapMap.get("checkLogin");
                } else {
                    requestMap = requestMapMap.get("ajaxCheckLogin");
                }
            }
=======================================


Thanks & Regards
--
Deepak Dixit


On May 7, 2012, at 6:51 PM, Robert G. wrote:

> Hello, I have a similar question.
>
> I use a differentiation if the user has javascript (short: JS) activated, or
> deactivated.
>
> In case of JS, I show a lot of content in a layered window, so I do not need
> the decorator, left and rightbar and so on. In the other case, I want to
> show all in the page, as it is as default in ofbiz (with decorator and so
> on).
>
> My problem is now the XML authentification. If the user is not logged in, it
> shows the loginscreen with all decorator etc. BUt i just need the
> login-screen. If I overwrite the loginscreen, I have the problem with users
> without JS activated, cause the decorators etc. are not shown. So my
> question is, if I have to check this in the java file, and return another
> respons to make the differentiation, or can I do sth. in xml? Like a session
> value check with if/else ... or are there other possibilities?
>
> please let me know.
>
> Robert
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Customizing-Login-Screen-for-different-components-tp2291046p4614781.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Customizing Login Screen for different components

Robert Gan
This is absolutely great, thanks!! :)

Deepak Dixit-2 wrote
Please refer doRequest RequestHandler.java.