You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "Robert G." <ga...@mercon24.de> on 2012/05/07 15:21:49 UTC

Re: Customizing Login Screen for different components

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.

Re: Customizing Login Screen for different components

Posted by "Robert G." <ga...@mercon24.de>.
This is absolutely great, thanks!! :)


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


--
View this message in context: http://ofbiz.135035.n4.nabble.com/Customizing-Login-Screen-for-different-components-tp2291046p4627769.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Customizing Login Screen for different components

Posted by Deepak Dixit <de...@hotwaxmedia.com>.
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.