Update of
/var/cvs/contributions/CMSContainer_Portlets/portlets-login/src/java/com/finalist/cmsc/portlets
In directory
james.mmbase.org:/tmp/cvs-serv3561/portlets-login/src/java/com/finalist/cmsc/portlets
Modified Files:
Tag: b1_4
LoginPortlet.java
Log Message:
take view from preferences
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-login/src/java/com/finalist/cmsc/portlets
Index: LoginPortlet.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Portlets/portlets-login/src/java/com/finalist/cmsc/portlets/LoginPortlet.java,v
retrieving revision 1.5.2.2
retrieving revision 1.5.2.3
diff -u -b -r1.5.2.2 -r1.5.2.3
--- LoginPortlet.java 3 Mar 2008 08:43:48 -0000 1.5.2.2
+++ LoginPortlet.java 17 Mar 2008 10:50:24 -0000 1.5.2.3
@@ -14,6 +14,7 @@
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletException;
+import javax.portlet.PortletPreferences;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
@@ -21,6 +22,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import com.finalist.cmsc.portalImpl.PortalConstants;
import com.finalist.cmsc.services.community.Community;
/**
@@ -68,16 +70,20 @@
@Override
protected void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException {
+
+ PortletPreferences preferences = request.getPreferences();
+ String template =
preferences.getValue(PortalConstants.CMSC_PORTLET_VIEW_TEMPLATE, null);
+
String error = request.getParameter("errormessage");
if (!StringUtils.isBlank(error)) {
request.setAttribute("errormessage", error);
}
- String template = null;
if (Community.isAuthenticated()) {
template = "login/logout.jsp";
} else {
- template = "login/login.jsp";
+ // take template frompreferences
+ // template = "login/login.jsp";
String action = request.getParameter("action");
if (!StringUtils.isBlank(action) &&
"send_password".equals(action)) {
template = "login/send_password.jsp";
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs