Problem with setScreen...
Hello, I have an application where a method in a velocity portlet (DoUpdate) get's called. Once this method is run, I would like to forward the user to a new screen. in order to accomplish this I use: rundata.setScreen("UpdateSuccess"); This results in Requested Screen not found: UpdateSuccess If I change to rundata.setScreenTemplate("UpdateSuccess"), the UpdateSuccess page is displayed, however the doBuildNormalContext of the UpdateSuccess java class is never called (I need to do some Processing before the screen is displayed). I have modified the modules.packages in TR.resources to include the module path (com.client.modules). the UpdateSuccess.java is located in com.client.modules.actions. The UpdateSuccess.vm is located in webapp/WEB-INF/templates/screens/html . Any Ideas are greatly appreciated. Thanks, Amin
Wizard / Work flow...
Hi, I have a set of portlets I have written that need to be displayed to the user in a particular order... the order is determined programmatically... e.g. HOME TAB -> user enters first name and last name action runs and determines that the next screen should be the address data collection screen... How do I replace the existing portlet being displayed (under home tab) with the address collection portlet? Thanks, Amin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: setTemplate in VelocityPortletAction gives InvocationTargetException
Have you tried $jslink.addPathInfo($jslink.ActionKey,"portlets.myAction").addQueryData( "eventSubmit_...")" ? /A -Original Message- From: Henrik W. Hansen [mailto:[EMAIL PROTECTED] Sent: Friday, November 07, 2003 1:15 PM To: Jetspeed Users List Subject: Re: setTemplate in VelocityPortletAction gives InvocationTargetException Hi all I have discovered that linking from the template in another way "resolves" my problem. The link that fails is the following + This results in the InvocationTargetException. But if I execute the action the following way: and + everything works perfectly. Seems that $jslink.setAction does not work the way I expected. Thank for your fast responses. Best regards Henrik Jeremy Ford wrote: > Could you try this is the latest version of Jetspeed? Thanks. I seem > to recall that there was a similar issue that was fixed for b4/release. > > Jeremy Ford > > >> From: "Henrik W. Hansen" <[EMAIL PROTECTED]> >> Reply-To: "Jetspeed Users List" <[EMAIL PROTECTED]> >> To: [EMAIL PROTECTED] >> Subject: setTemplate in VelocityPortletAction gives >> InvocationTargetException >> Date: Thu, 06 Nov 2003 20:55:15 +0100 >> >> Hi all >> This should be a trivial question. But i have been struggeling with >> it for a while now. >> >> When executing the following action : >> public void doAddmonitor(RunData data, Context context) { >>setTemplate(data, "webmonitor/createMonitorParam.vm"); >> } >> >> I get the following excetion: >> >> Horrible Exception: java.lang.reflect.InvocationTargetException >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> >> >> I am running Jetspeed 1.4b3. >> If i set the template from within i.e "protected void >> buildNormalContext" everything works fine. >> What can i be doing wrong?? >> /Henrik >> >> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > _ > >> From Beethoven to the Rolling Stones, your favorite music is always >> playing > > on MSN Radio Plus. No ads, no talk. Trial month FREE! > http://join.msn.com/?page=offers/premiumradio > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Portlet Forwarding
Hello, I have a portlet that is used to do some data entry... When the user has successfully entered data (passes validation) I would like to replace the contents of the current portlet with a portlet indicating success... (preserving the other tabs,etc.) I have deployed the "Success" velocity template as a portlet in the registry (name= "AddInfoSuccess"). I have tried setting up the forward service to forward after successful data entry, but it does not work...it requires the portlet id... I only know the portlet name... portlets.xreg Successfully added Information Add Information Success Message forwards.xml: Java Code in Action: ForwardService fs = (ForwardService)ServiceUtil.getServiceByName(ForwardService.SERVICE_NAME ); fs.forward(data, "AddInfoForward","Success"); Any ideas? Thanks Amin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: New User Account: Timestamps are not entered properly to MySQL tu rbine_user table
Hi Risto, The user is created a few lines down from the createUser() call (data.setUser(user)) ... if you want some custom processing done then you would extend the CreateNewUserAndConfirm class, and then in your new class, simply override createUser()... Hope this helps... Amin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: July 29, 2003 7:13 AM To: [EMAIL PROTECTED] Subject: RE: New User Account: Timestamps are not entered properly to MySQL tu rbine_user table I also tested the effect of changing the Date parameter in org.apache.jetspeed.modules.actions.CreateNewUserAndConfirm´s doPerform() method. Default was like follows: Date now = new Date(); JetspeedUser user = JetspeedSecurity.getUserInstance(); user.setUserName( username ); user.setCreateDate(now); user.setLastLogin(new Date(0)); user.setFirstName( data.getParameters().getString("firstname") ); user.setLastName( data.getParameters().getString("lastname") ); user.setEmail( data.getParameters().getString("email") ); createUser(user, data); I changed it to: Date now = new Date(0); but now, when I added new user, the LAST_LOGIN entry in MYSQL´s user_turbine table changed to 00 from 1970010201. No other changes. Why the user.setCreateDate(now) affected the LAST_LOGIN field? What´s the purpose of user.setLastLogin() then?!? Secondly... The "new user" html-form in the portal seems to call for this class as it´s action, but the createUser() method is empty. Where the creation is actually handled? I´m lost. Thanks for all comments. Risto Kärkkäinen -Ursprüngliche Nachricht- Von: Kaerkkaeinen, Risto Juhani Gesendet: Monday, July 28, 2003 4:01 PM An: [EMAIL PROTECTED] Betreff: New User Account: Timestamps are not entered properly to MySQL tu rbine_user table Hi! While trying to add new user via Jetspeed based portal, the new record is added to MYSQL´s turbine_user table so that the MODIFIED timestamp is just fine as the current time, but CREATED and PASSWORD_CHANGED are a set of zeros and LAST_LOGIN is set to default (the year 1970 etc.). LAST_LOGIN and PASSWORD_CHANGED become correct after the related actions, but CREATED is stuck to zeros. Otherwise the portal seems to be working. I´m using jetspeed-1.4-b4 and mysql-3.23.57-win. The driver is mysql-connector-java-3.1.0-alpha. The DB has been build with the provited sql scripts and the security-schema.xml shows all the earlier fields as similar kind TIMESTAMP. Earlier version of the project was using hypersonic DB and then the MODIFIED and CREATED seemed to be set permanently to NULL. The LAST_LOGIN was working as in the current version with MySQL. The PW_CHANGED field didn´t exist in that version of Jetspeed. The nightly build from 17.7.2003 didn´t help and neither did testing this with only the "default" Jetspeed portal and MySQL. Same problems accure. I was also unable to find any similar problems on the mailing lists or FAQs. Only somehow related comment I found, was at the Apache Bug Database by Mark Orciuch. He wrote: "[FIX] Last login timestamp is not recorded - When the user is originally created last login is initialized but never changes thereafter. I confirmed this problem all the way back to 1.4b1." Any idea what is causing these timestamp variations? Why I´m getting only one field working and the others not? It would be nice to get the timestamps working properly. All help greatly appreciated! Thanks, Risto Kärkkäinen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Displaying Velocity Template
Hello, I copied the template to the portlets directory and Voila! So the question becomes: Why do setting service.TemplateLocator.portlet.global.search = true Not work?? -Original Message- From: Mark Orciuch [mailto:[EMAIL PROTECTED] Sent: July 10, 2003 11:36 AM To: Jetspeed Users List Subject: RE: Displaying Velocity Template Try this setting in jr.props: service.TemplateLocator.portlet.global.search = true This extends the template location to /screens folder. Best regards, Mark C. Orciuch Next Generation Solutions, Ltd. e-Mail: [EMAIL PROTECTED] web: http://www.ngsltd.com > -Original Message- > From: Amin Lalji [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 10, 2003 10:29 AM > To: [EMAIL PROTECTED] > Subject: Displaying Velocity Template > > > Hello, > > > > I am trying to display the NewAccount template in jetspeed under it's > own tab. > > I have added the following to my portlet registry: > > > > parent="Velocity" application="false"> > > > > Create New Account > > Create a new Account in > system > > > > hidden="true"/> > > > > > > and in the default.psml for anon: > > > > > > > > > > Create a new Account > > > > > > > > parent="CreateNewAccount"/> > > > > > > > > I am getting the following error: > > The tab gets created, but when clicked I get: > > org.apache.turbine.util.TurbineException: Error rendering Velocity > template: null > > > > instead of the form I am trying to display. > > > > Essentially, I am trying to display the create new account screen under > it's own tab (vs having to click the create new account link) > > > > Any help is appreciated! > > > > Amin > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Displaying Velocity Template
Thanks Mark, after a restart still no go Here are the velocity log entries: [10 Jul 2003 11:52:18 DEBUG] - checking for Portlet permission: view for portlet: CreateNewAccount Owner = anon [10 Jul 2003 11:52:18 DEBUG] - GenericMVCPortlet: Executing action [CreateNewUserAndConfirm] for portlet [CreateNewAccount] [10 Jul 2003 11:52:18 INFO] - GenericMVCPortlet - calling processView on processor [10 Jul 2003 11:52:18 INFO] - VelocityViewProcessor - processing NewAccount [10 Jul 2003 11:52:18 INFO] - VelocityViewProcessor - locating template - [EMAIL PROTECTED] t.vm [10 Jul 2003 11:52:18 ERROR] - Error rendering Velocity template: null: null I tried adding the portlet via Portlet Admin: Create New Account Create a new Account in system org.apache.jetspeed.portal.portlets.VelocityPortlet Create an account -Original Message- From: Mark Orciuch [mailto:[EMAIL PROTECTED] Sent: July 10, 2003 11:36 AM To: Jetspeed Users List Subject: RE: Displaying Velocity Template Try this setting in jr.props: service.TemplateLocator.portlet.global.search = true This extends the template location to /screens folder. Best regards, Mark C. Orciuch Next Generation Solutions, Ltd. e-Mail: [EMAIL PROTECTED] web: http://www.ngsltd.com > -Original Message- > From: Amin Lalji [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 10, 2003 10:29 AM > To: [EMAIL PROTECTED] > Subject: Displaying Velocity Template > > > Hello, > > > > I am trying to display the NewAccount template in jetspeed under it's > own tab. > > I have added the following to my portlet registry: > > > > parent="Velocity" application="false"> > > > > Create New Account > > Create a new Account in > system > > > > hidden="true"/> > > > > > > and in the default.psml for anon: > > > > > > > > > > Create a new Account > > > > > > > > parent="CreateNewAccount"/> > > > > > > > > I am getting the following error: > > The tab gets created, but when clicked I get: > > org.apache.turbine.util.TurbineException: Error rendering Velocity > template: null > > > > instead of the form I am trying to display. > > > > Essentially, I am trying to display the create new account screen under > it's own tab (vs having to click the create new account link) > > > > Any help is appreciated! > > > > Amin > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying Velocity Template
Hello, I am trying to display the NewAccount template in jetspeed under it's own tab. I have added the following to my portlet registry: Create New Account Create a new Account in system and in the default.psml for anon: Create a new Account I am getting the following error: The tab gets created, but when clicked I get: org.apache.turbine.util.TurbineException: Error rendering Velocity template: null instead of the form I am trying to display. Essentially, I am trying to display the create new account screen under it's own tab (vs having to click the create new account link) Any help is appreciated! Amin
RE: Confirmation Email sending the email, but not allowing login
Hi Mike, I had the same problem, traced the code to org.apache.jetspeed.modules.actions.JLoginUser After tracing the code all the way through, I found that even though the secret key matches the confirm_value, and the code even does: user.setConfirmed( JetspeedResources.CONFIRM_VALUE ); when getUser().getConfirmed() get's called further on down (when trying to login the user in), the new value does not actually equal CONFIRMED (it returns the secret key value instead). I added the following line after the initial user.setConfirmed(JetspeedResources.CONFIRM_VALUE); and it seems to have done the trick. JetspeedSecurity.saveUser(user); HTH, Amin -Original Message- From: Mike Davis [mailto:[EMAIL PROTECTED] Sent: July 2, 2003 10:31 PM To: [EMAIL PROTECTED] Subject: Confirmation Email sending the email, but not allowing login Greetings Folks, I am running the latest code grabbed from CVS today, 1.4b5-dev. I have successfully configured such that I receive the confirm email and the email indeed contains a seemingly valid secret code. I checked the code against the value in the database and it matches. All good so far right?. However, when I try to either use the link in the email (very cool BTW) OR I try to login and manually cut and paste the secret key into the Confirm Registration form, I get: Sorry, but you must first confirm this account before logging in. More Info: I am running JSP templates, but I flipped to VM templates with the exact same result. I am 100% sure that the key is correct. I assume that the code is/was working. Any idea's? Where is the actual code that checks the secret key and sets confirm_value to CONFIRMED? It's either that code or the templates (both JSP and VM) have some sort of problem with the parameters or form action I would guess. Or more likely, I missed a crucial config setting. Wouldn't be the first time. Any help would be greatly appreciated Thanks in advance __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Extending User... some thoughts...
Hello All, I recently posted a question regarding Extending JetspeedUser and CreateNewUserAnd Confirm... After some further research, here is my dilemma: I have modified the torque security-schema.xml to add my new columns I have generated OM objects to org.apache.jetspeed.om.security.turbine (default) I have updated my tables with newly created ddl's... The docs (http://jakarta.apache.org/jetspeed/site/security.html) say to extend JetspeedUser and cast to access additional columns... Here is the dilemma... JetspeedUser is located in org.apache.jetspeed.om.security... the object model that contains entries for the modified schema is org.apache.jetspeed.om.security.turbine.TurbineUser (and BaseTurbineUser) so if I cast JetspeedUser to MyJetspeedUser, set MyJetspeedUser.title = "mr." and then call MyJetspeedUser.save() the entry in the database is null, because the parent (JetspeedUser) object model does not contain any reference to the modified field!! (the reference is in TurbineUser)... Tried casting JetspeedUser to TurbineUser ... resulted in class cast exception ... Not quite sure where to go from here... -Original Message----- From: Amin Lalji [mailto:[EMAIL PROTECTED] Sent: June 25, 2003 4:54 PM To: [EMAIL PROTECTED] Subject: Extending User and CreateNewUserAndConfirm.java Hello All, I have been struggling with trying to extend JetspeedUser: I have: 1) modified torque-schema.xml 2) generated new OM/SQL Scripts 3) Updated database with new schemas 4) Extended BaseJetspeedUser (MyJetspeedUser.class) --- SO FAR SO GOOD, EVERYTHING CONTINUES TO OPERATE AS NORMAL --- 5) Within the createUser method of CreateNewUserAndConfirm I have MyJetspeedUser myJetspeedUser = (MyJetspeedUser) user; myJetspeedUser.setTitle("MR."); // trying to force MR. entry into db --> Tried: data.setUser(myJetspeedUser); --> Result after trying to add a new user using "create account link", account created, TITLE field in database NULL! -->Tried: myJetspeedUser.save(); --> Result after trying to add a new user using "create account link", exception, user already exists.. I would like clarification on the process to add additional fields to TURBINE_USER / new account creation: Do I have to replace the user object (currently JetspeedUser) with MyJetspeedUser entirely? It seems to defeat the purpose of subclassing. Your help is greatly appreciated! Amin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to find out that a specific user has logged in
You may want to try to write an entry to a "currentlyloggedon" table... then read the table every so often to see who is logged on... on logout, remove the entry... It's a little cumbersome, but will probably do the trick -Original Message- From: Stuart Belden [mailto:[EMAIL PROTECTED] Sent: June 26, 2003 8:47 AM To: [EMAIL PROTECTED] Subject: Re: how to find out that a specific user has logged in The method you describe won't work. When a user logs in, the user object gets stuffed into the session, and you have to get that specific instance of the user object to determine if that user is logged in or not. JetspeedSecurity.getUser("turbine") just grabs all the info for that user from the db, and whether they're logged in or not is not stored in the db. AFAIK there's no simple way to see if a specific user is logged in or not. It's possible, I would imagine, but not simple. hth, stu >>> [EMAIL PROTECTED] 06/26/03 03:57AM >>> hello all.. i've been trying to find out how to know a user has logged in.. i use the following: JetspeedUser ju = JetspeedSecurity.getUser("turbine"); context.put("online",String.valueOf(ju.hasLoggedIn())); and use velocity portlet to tell me that anon is online or not. user is online = $online problem is even if turbine has logged in. it displays false instead of true. please help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Extending User and CreateNewUserAndConfirm.java
Hello All, I have been struggling with trying to extend JetspeedUser: I have: 1) modified torque-schema.xml 2) generated new OM/SQL Scripts 3) Updated database with new schemas 4) Extended BaseJetspeedUser (MyJetspeedUser.class) --- SO FAR SO GOOD, EVERYTHING CONTINUES TO OPERATE AS NORMAL --- 5) Within the createUser method of CreateNewUserAndConfirm I have MyJetspeedUser myJetspeedUser = (MyJetspeedUser) user; myJetspeedUser.setTitle("MR."); // trying to force MR. entry into db --> Tried: data.setUser(myJetspeedUser); --> Result after trying to add a new user using "create account link", account created, TITLE field in database NULL! -->Tried: myJetspeedUser.save(); --> Result after trying to add a new user using "create account link", exception, user already exists.. I would like clarification on the process to add additional fields to TURBINE_USER / new account creation: Do I have to replace the user object (currently JetspeedUser) with MyJetspeedUser entirely? It seems to defeat the purpose of subclassing. Your help is greatly appreciated! Amin