Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/portlets
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv18623/src/java/org/openscience/nmrshiftdb/portlets
Modified Files:
ResultPortlet.java
Log Message:
this should include the possibility of external link for submitting to lab system, but this is not working and I do not know why
Index: ResultPortlet.java
===================================================================
RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/portlets/ResultPortlet.java,v
retrieving revision 1.286
retrieving revision 1.287
diff -C2 -r1.286 -r1.287
*** ResultPortlet.java 9 Nov 2006 14:43:42 -0000 1.286
--- ResultPortlet.java 10 Nov 2006 14:14:06 -0000 1.287
***************
*** 20,23 ****
--- 20,24 ----
import org.apache.ecs.StringElement;
import org.apache.jetspeed.portal.portlets.AbstractPortlet;
+ import org.apache.turbine.modules.ActionLoader;
import org.apache.turbine.om.NumberKey;
import org.apache.turbine.om.security.User;
***************
*** 118,150 ****
if(action.equals("submitfromlabjournal")){
try{
! String username = runData.getParameters().get("username");
! String password = runData.getParameters().get("password");
! User user = null;
! // Authenticate the user and get the object.
! user = TurbineSecurity.getAuthenticatedUser(username, password);
!
!
! // Store the user object.
! runData.setUser(user);
!
! // Mark the user as being logged in.
! user.setHasLoggedIn(new Boolean(true));
!
! // Set the last_login date in the database.
! user.updateLastLogin();
!
! // This only happens if the user is valid; otherwise, we
! // will get a valueBound in the User object when we don't
! // want to because the username is not set yet. Save the
! // User object into the session.
! runData.save();
! //this.doSubmitorder(data, context);
!
! runData.getResponse().sendError(302,"www.web.de");
}catch(Exception ex){
ex.printStackTrace();
}
!
! return(new StringElement("<head><meta HTTP-EQUIV=\"REFRESH\" content=\"0; url=http://www.yourdomain.com/index.html/"+runData.getSession().getId()+"\"></head><a href=\"\">If you are not redirected, please click here</a>"));
}
//The molecule displaying starts with 0 if new search
--- 119,127 ----
if(action.equals("submitfromlabjournal")){
try{
! ActionLoader.getInstance().exec(runData, "LoginUser");
}catch(Exception ex){
ex.printStackTrace();
}
! return(new StringElement("<head><meta HTTP-EQUIV=\"REFRESH\" content=\"0; url=http://127.0.0.1:8080/portal/pane0/Results;jsessionid="+runData.getSession().getId()+"\"></head><a href=\"\">If you are not redirected, please click here</a>"));
}
//The molecule displaying starts with 0 if new search
|