You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Javed Mahmud <jm...@it.uts.edu.au> on 2003/01/02 05:41:06 UTC

RE: Event Handling in JSPPortlet

Happy New Year To All:)
Hello Mark,

I was trying to send you email at morciuch@apache.org but there was some
error in reaching you so I am trying here  Hope u will read the mailing
List :)
 Well I have tried the way u told me but things are acting in a strange
 way in this second new years day....
 In my Action clas there are three methods corresponding to three events
 doStatusChange to change status
 doAdit to add the value to table
 doView show the details from the table.

 To my utter disbelief doView is working fine (I dont know how) but the
 doStatusChange does not. I have checked that they dont have anything
 different in the way they are defined in JSP Template and the Action
 class.
 A question arises from my vigorous testing that when a method
 corresponding to the event is fired what happens to buildNormalcontext
 method is it called after the method for event(likely) or before
 (unlikely) or never called (Happening in the case of doView). If you are
 thinking there is something with the JavaScript then its not the case as
 doView and doStatusChange both sets the value for the actionType (my
 varable) to certain value 'V' for view and 'A' for doStatusChange when
 Adding.
 I dont know if I am able to explain the scenoario or not.

 Thanks
 Javed

>> Javed,
>>
>> While working on a sample JSPPortlet with action events I ran into a
>> problem similar to yours. I looked at your action class again and I
>> noticed that the event handler method has an incorrect signature:
>>
>> public void doStatusChange(RunData rundata, Portlet portlet) throws
>> Exception
>>
>> ... should be ...
>>
>> public void doStatusChange(RunData rundata, Portlet portlet)
>>
>> Give that a try and let me know.
>>
>> Best regards,
>>
>> Mark Orciuch - morciuch@apache.org
>> Jakarta Jetspeed - Enterprise Portal in Java
>> http://jakarta.apache.org/jetspeed/
>>
>>> -----Original Message-----
>>> From: Javed Mahmud [mailto:jmsyed@it.uts.edu.au]
>>> Sent: Monday, December 23, 2002 6:37 PM
>>> To: mark_orciuch@ngsltd.com
>>> Subject: RE: Event Handling in JSPPortlet
>>>
>>>
>>> Hi Mark,
>>>
>>> > One more thing I just noticed: you did not define the "action"
>>> parameter for DataMiningJSP portlet in your .xreg file.
>>> >
>>>
>>> The DataMiningJSP,DataMining and FramedDataMiningJSP are working fine
>>> and the do not have any action assiciated with them
>>> My main concern is UserDetailEntry.jsp and UserDetailAction.class
>>>
>>> They shud work...
>>>
>>> Thank
>>> Javed
>>>
>>> > Best regards,
>>> >
>>> > Mark Orciuch - morciuch@apache.org
>>> > Jakarta Jetspeed - Enterprise Portal in Java
>>> > http://jakarta.apache.org/jetspeed/
>>> >
>>> >> -----Original Message-----
>>> >> From: Javed Mahmud [mailto:jmsyed@it.uts.edu.au]
>>> >> Sent: Sunday, December 22, 2002 5:41 PM
>>> >> To: mark_orciuch@ngsltd.com
>>> >> Subject: RE: Event Handling in JSPPortlet
>>> >>
>>> >>
>>> >> Hi Mark Attached is the zip file containing the required files.
>>> The
>>> action classes with event are in the com.adm package.
>>> >>
>>> >> Hope you will be able to figure out what is wrong.
>>> >>
>>> >> Thanks
>>> >> Javed
>>> >>
>>> >> > Could you please email the source code for you portlet: java
>>> action,
>>> >> jsp template and .xreg file. Thanks.
>>> >> >
>>> >> > Best regards,
>>> >> >
>>> >> > Mark Orciuch - morciuch@apache.org
>>> >> > Jakarta Jetspeed - Enterprise Portal in Java
>>> >> > http://jakarta.apache.org/jetspeed/
>>> >> >
>>> >> >> -----Original Message-----
>>> >> >> From: Javed Mahmud [mailto:jmsyed@it.uts.edu.au]
>>> >> >> Sent: Wednesday, December 18, 2002 9:55 PM
>>> >> >> To: mark_orciuch@ngsltd.com
>>> >> >> Cc: jetspeed-user@jakarta.apache.org
>>> >> >> Subject: RE: Event Handling in JSPPortlet
>>> >> >>
>>> >> >>
>>> >> >> Hi,
>>> >> >> I was looking onto the TutorialStockQuote8.jsp and it has the
>>> >> following entry for FORM. The tutorial itself says that there
>>> should be
>>> >> >> <input type="hidden" name="action" value="
>>> >> portlets.myJspPortletAction "/> in the FORM. Is this only required
>>> when handling events or its a general requirement.
>>> >> >>
>>> >> >> <FORM METHOD="POST">
>>> >> >>   <INPUT TYPE="hidden" NAME="js_peid" VALUE="<%=jspeid%>">
>>> Enter
>>> symbol(s) separated with commas: <input name="symbols"
>>> >> >> type="TEXT"><INPUT TYPE="SUBMIT" NAME="refresh" VALUE="Get
>>> Quotes">
>>> >> </FORM>
>>> >> >>
>>> >> >>
>>> >> >> My problem is not yet solved about Events in JSPPOrtlet.... Any
>>> help will be appreciated!!! :=)
>>> >> >>
>>> >> >> Thanks
>>> >> >> Javed
>>> >> >>
>>> >> >> >
>>> >> >> >> i had the same problem yesterday, evenif the method name was
>>> >> doStatusChange
>>> >> >> >> dont know why
>>> >> >> >> may be try using velocity templates and action classes jsp
>>> doesnt work properly in jetspeed
>>> >> >> >> sangam dash
>>> >> >> >>
>>> >> >> >
>>> >> >> > That is not a true statement. There's a working jsp portlet
>>> >> example
>>> >> >> in the tutorial.
>>> >> >> >
>>> >> >> > Best regards,
>>> >> >> >
>>> >> >> > Mark Orciuch - morciuch@apache.org
>>> >> >> > Jakarta Jetspeed - Enterprise Portal in Java
>>> >> >> > http://jakarta.apache.org/jetspeed/
>>> >> >> >
>>> >> >> >
>>> >> >> > --
>>> >> >> > To unsubscribe, e-mail:
>>> >> >> > <ma...@jakarta.apache.org> For
>>> >> additional
>>> >> >> commands, e-mail:
>>> <ma...@jakarta.apache.org>
>>> >> >>
>>> >> >>
>>> >> >> *---------------------------------------*
>>> >> >> |Research Assistant                     |
>>> >> >> |Building 10                            |
>>> >> >> |Room 4405                              |
>>> >> >> |Faculty of Information Technology      |
>>> >> >> |Department of Computer Systems         |
>>> >> >> |University of Technology Sydney        |
>>> >> >> |Phone: 9514 4513                       |
>>> >> >> |Mobile : 0413 607172                   |
>>> >> >> *---------------------------------------*
>>> >>
>>> >>
>>> >> *---------------------------------------*
>>> >> |Research Assistant                     |
>>> >> |Building 10                            |
>>> >> |Room 4405                              |
>>> >> |Faculty of Information Technology      |
>>> >> |Department of Computer Systems         |
>>> >> |University of Technology Sydney        |
>>> >> |Phone: 9514 4513                       |
>>> >> |Mobile : 0413 607172                   |
>>> >> *---------------------------------------*
>>>
>>>
>>> *---------------------------------------*
>>> |Research Assistant                     |
>>> |Building 10                            |
>>> |Room 4405                              |
>>> |Faculty of Information Technology      |
>>> |Department of Computer Systems         |
>>> |University of Technology Sydney        |
>>> |Phone: 9514 4513                       |
>>> |Mobile : 0413 607172                   |
>>> *---------------------------------------*
>
>
> *---------------------------------------*
> |Research Assistant                     |
> |Building 10                            |
> |Room 4405                              |
> |Faculty of Information Technology      |
> |Department of Computer Systems         |
> |University of Technology Sydney        |
> |Phone: 9514 4513                       |
> |Mobile : 0413 607172                   |
> *---------------------------------------*


*---------------------------------------*
|Research Assistant                     |
|Building 10                            |
|Room 4405                              |
|Faculty of Information Technology      |
|Department of Computer Systems         |
|University of Technology Sydney        |
|Phone: 9514 4513                       |
|Mobile : 0413 607172                   |
*---------------------------------------*



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


R: Event Handling in JSPPortlet

Posted by Agostino Poggi <ag...@tin.it>.
Dear Javed,

Probably the problem is in the name of the method, from Turbine
documentation:

The variable name MUST have the prefix "eventSubmit_". 
The variable name after the prefix MUST begin with the letters "do". 
The first letter after the "do" will be capitalized and the rest will be
lowercase

Try: doStatuschange

Ciao,

	Agostino

-----Messaggio originale-----
Da: Javed Mahmud [mailto:jmsyed@it.uts.edu.au] 
Inviato: giovedì 2 gennaio 2003 5.41
A: jetspeed-user@jakarta.apache.org
Oggetto: RE: Event Handling in JSPPortlet


Happy New Year To All:)
Hello Mark,

I was trying to send you email at morciuch@apache.org but there was some
error in reaching you so I am trying here  Hope u will read the mailing
List :)  Well I have tried the way u told me but things are acting in a
strange  way in this second new years day....  In my Action clas there
are three methods corresponding to three events  doStatusChange to
change status  doAdit to add the value to table  doView show the details
from the table.

 To my utter disbelief doView is working fine (I dont know how) but the
doStatusChange does not. I have checked that they dont have anything
different in the way they are defined in JSP Template and the Action
class.  A question arises from my vigorous testing that when a method
corresponding to the event is fired what happens to buildNormalcontext
method is it called after the method for event(likely) or before
 (unlikely) or never called (Happening in the case of doView). If you
are  thinking there is something with the JavaScript then its not the
case as  doView and doStatusChange both sets the value for the
actionType (my
 varable) to certain value 'V' for view and 'A' for doStatusChange when
Adding.  I dont know if I am able to explain the scenoario or not.

 Thanks
 Javed

>> Javed,
>>
>> While working on a sample JSPPortlet with action events I ran into a 
>> problem similar to yours. I looked at your action class again and I 
>> noticed that the event handler method has an incorrect signature:
>>
>> public void doStatusChange(RunData rundata, Portlet portlet) throws 
>> Exception
>>
>> ... should be ...
>>
>> public void doStatusChange(RunData rundata, Portlet portlet)
>>
>> Give that a try and let me know.
>>
>> Best regards,
>>
>> Mark Orciuch - morciuch@apache.org
>> Jakarta Jetspeed - Enterprise Portal in Java 
>> http://jakarta.apache.org/jetspeed/
>>
>>> -----Original Message-----
>>> From: Javed Mahmud [mailto:jmsyed@it.uts.edu.au]
>>> Sent: Monday, December 23, 2002 6:37 PM
>>> To: mark_orciuch@ngsltd.com
>>> Subject: RE: Event Handling in JSPPortlet
>>>
>>>
>>> Hi Mark,
>>>
>>> > One more thing I just noticed: you did not define the "action"
>>> parameter for DataMiningJSP portlet in your .xreg file.
>>> >
>>>
>>> The DataMiningJSP,DataMining and FramedDataMiningJSP are working 
>>> fine and the do not have any action assiciated with them My main 
>>> concern is UserDetailEntry.jsp and UserDetailAction.class
>>>
>>> They shud work...
>>>
>>> Thank
>>> Javed
>>>
>>> > Best regards,
>>> >
>>> > Mark Orciuch - morciuch@apache.org
>>> > Jakarta Jetspeed - Enterprise Portal in Java 
>>> > http://jakarta.apache.org/jetspeed/
>>> >
>>> >> -----Original Message-----
>>> >> From: Javed Mahmud [mailto:jmsyed@it.uts.edu.au]
>>> >> Sent: Sunday, December 22, 2002 5:41 PM
>>> >> To: mark_orciuch@ngsltd.com
>>> >> Subject: RE: Event Handling in JSPPortlet
>>> >>
>>> >>
>>> >> Hi Mark Attached is the zip file containing the required files.
>>> The
>>> action classes with event are in the com.adm package.
>>> >>
>>> >> Hope you will be able to figure out what is wrong.
>>> >>
>>> >> Thanks
>>> >> Javed
>>> >>
>>> >> > Could you please email the source code for you portlet: java
>>> action,
>>> >> jsp template and .xreg file. Thanks.
>>> >> >
>>> >> > Best regards,
>>> >> >
>>> >> > Mark Orciuch - morciuch@apache.org
>>> >> > Jakarta Jetspeed - Enterprise Portal in Java 
>>> >> > http://jakarta.apache.org/jetspeed/
>>> >> >
>>> >> >> -----Original Message-----
>>> >> >> From: Javed Mahmud [mailto:jmsyed@it.uts.edu.au]
>>> >> >> Sent: Wednesday, December 18, 2002 9:55 PM
>>> >> >> To: mark_orciuch@ngsltd.com
>>> >> >> Cc: jetspeed-user@jakarta.apache.org
>>> >> >> Subject: RE: Event Handling in JSPPortlet
>>> >> >>
>>> >> >>
>>> >> >> Hi,
>>> >> >> I was looking onto the TutorialStockQuote8.jsp and it has the
>>> >> following entry for FORM. The tutorial itself says that there
>>> should be
>>> >> >> <input type="hidden" name="action" value="
>>> >> portlets.myJspPortletAction "/> in the FORM. Is this only 
>>> >> required
>>> when handling events or its a general requirement.
>>> >> >>
>>> >> >> <FORM METHOD="POST">
>>> >> >>   <INPUT TYPE="hidden" NAME="js_peid" VALUE="<%=jspeid%>">
>>> Enter
>>> symbol(s) separated with commas: <input name="symbols"
>>> >> >> type="TEXT"><INPUT TYPE="SUBMIT" NAME="refresh" VALUE="Get
>>> Quotes">
>>> >> </FORM>
>>> >> >>
>>> >> >>
>>> >> >> My problem is not yet solved about Events in JSPPOrtlet.... 
>>> >> >> Any
>>> help will be appreciated!!! :=)
>>> >> >>
>>> >> >> Thanks
>>> >> >> Javed
>>> >> >>
>>> >> >> >
>>> >> >> >> i had the same problem yesterday, evenif the method name 
>>> >> >> >> was
>>> >> doStatusChange
>>> >> >> >> dont know why
>>> >> >> >> may be try using velocity templates and action classes jsp
>>> doesnt work properly in jetspeed
>>> >> >> >> sangam dash
>>> >> >> >>
>>> >> >> >
>>> >> >> > That is not a true statement. There's a working jsp portlet
>>> >> example
>>> >> >> in the tutorial.
>>> >> >> >
>>> >> >> > Best regards,
>>> >> >> >
>>> >> >> > Mark Orciuch - morciuch@apache.org
>>> >> >> > Jakarta Jetspeed - Enterprise Portal in Java 
>>> >> >> > http://jakarta.apache.org/jetspeed/
>>> >> >> >
>>> >> >> >
>>> >> >> > --
>>> >> >> > To unsubscribe, e-mail: 
>>> >> >> > <ma...@jakarta.apache.org> For
>>> >> additional
>>> >> >> commands, e-mail:
>>> <ma...@jakarta.apache.org>
>>> >> >>
>>> >> >>
>>> >> >> *---------------------------------------*
>>> >> >> |Research Assistant                     |
>>> >> >> |Building 10                            |
>>> >> >> |Room 4405                              |
>>> >> >> |Faculty of Information Technology      |
>>> >> >> |Department of Computer Systems         |
>>> >> >> |University of Technology Sydney        |
>>> >> >> |Phone: 9514 4513                       |
>>> >> >> |Mobile : 0413 607172                   |
>>> >> >> *---------------------------------------*
>>> >>
>>> >>
>>> >> *---------------------------------------*
>>> >> |Research Assistant                     |
>>> >> |Building 10                            |
>>> >> |Room 4405                              |
>>> >> |Faculty of Information Technology      |
>>> >> |Department of Computer Systems         |
>>> >> |University of Technology Sydney        |
>>> >> |Phone: 9514 4513                       |
>>> >> |Mobile : 0413 607172                   |
>>> >> *---------------------------------------*
>>>
>>>
>>> *---------------------------------------*
>>> |Research Assistant                     |
>>> |Building 10                            |
>>> |Room 4405                              |
>>> |Faculty of Information Technology      |
>>> |Department of Computer Systems         |
>>> |University of Technology Sydney        |
>>> |Phone: 9514 4513                       |
>>> |Mobile : 0413 607172                   |
>>> *---------------------------------------*
>
>
> *---------------------------------------*
> |Research Assistant                     |
> |Building 10                            |
> |Room 4405                              |
> |Faculty of Information Technology      |
> |Department of Computer Systems         |
> |University of Technology Sydney        |
> |Phone: 9514 4513                       |
> |Mobile : 0413 607172                   |
> *---------------------------------------*


*---------------------------------------*
|Research Assistant                     |
|Building 10                            |
|Room 4405                              |
|Faculty of Information Technology      |
|Department of Computer Systems         |
|University of Technology Sydney        |
|Phone: 9514 4513                       |
|Mobile : 0413 607172                   |
*---------------------------------------*



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Portlet Action class

Posted by "Cheng Hok Man, Match" <ch...@hong-kong.sema.slb.com>.
Hi,
	I was trying to write my own Action Porlet class. To start it, I
was looking some examples provided with JetSpeed installation. 
	I found a JspPortletAction.java. I found there are some Log
statement inside the class. I wanted to enable the Log statement so that
I can know the portlet actions are being accessed. I tried to modified
the setting in Turbine.properties as 
	services.LoggingService.access.log4j.category.access = DEBUG,
access
	
	But I still found access.log inside webapps\myapps\web-inf\log
was nothing.

	How could I do that ?
	Thank you very much.
Match.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Portlet Action class

Posted by "Cheng Hok Man, Match" <ch...@hong-kong.sema.slb.com>.
Hi,
	I was trying to write my own Action Porlet class. To start it, I
was looking some examples provided with JetSpeed installation. 
	I found a JspPortletAction.java. I found there are some Log
statement inside the class. I wanted to enable the Log statement so that
I can know the portlet actions are being accessed. I tried to modified
the setting in Turbine.properties as 
	services.LoggingService.access.log4j.category.access = DEBUG,
access
	
	But I still found access.log inside webapps\myapps\web-inf\log
was nothing.

	How could I do that ?
	Thank you very much.
Match.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>