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 Glen Mazza <gl...@gmail.com> on 2009/07/24 22:33:35 UTC

(newbie) processAction() not being called

Hello,

I'm trying to get my portlet's processAction() method get called from a form
submittal but am having no luck.  Having a bare-bones form in my doView()
(I'm not using JSP files yet--I would like to get processAction() working
first):

        response.getWriter().println("<form action='???' method='POST'>");    	
        response.getWriter().println("<input type='submit'
value='Hello'/>");    	
        response.getWriter().println("</form>");    	

I'm not sure what to place in for the action attribute so that the portlet's
processAction() method will be called.  Any ideas?

Thanks,
Glen

-- 
View this message in context: http://www.nabble.com/%28newbie%29-processAction%28%29-not-being-called-tp24651504p24651504.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: (newbie) processAction() not being called

Posted by Glen Mazza <gl...@gmail.com>.
Thanks Ron.  More googling helped me--here's the doView() I used to create a
simple form that will activate the portlet's processAction() method:

@Override
protected void doView(RenderRequest request, RenderResponse response)
   throws PortletException, IOException {

   response.setContentType("text/html"); 
   response.getWriter().println("<form method='post' action='" +
response.createActionURL().toString() + "'>");    	
   response.getWriter().println("<input type='submit' value='Test
button'/>");    	
   response.getWriter().println("</form>");

}


Ron McNulty wrote:
> 
> Hi Glen
> 
> The action needs to be created by the portlet API. I've never done it the 
> hard way like you are doing, but in a JSP it looks like this:
> 
> <form method="post" action="<portlet:actionURL/>">
> 
> Maybe that will give you some pointers...
> 
> Regards
> 
> Ron
> 
> ----- Original Message ----- 
> From: "Glen Mazza" <gl...@gmail.com>
> To: <je...@portals.apache.org>
> Sent: Saturday, July 25, 2009 8:33 AM
> Subject: (newbie) processAction() not being called
> 
> 
>>
>> Hello,
>>
>> I'm trying to get my portlet's processAction() method get called from a 
>> form
>> submittal but am having no luck.  Having a bare-bones form in my doView()
>> (I'm not using JSP files yet--I would like to get processAction() working
>> first):
>>
>>        response.getWriter().println("<form action='???' method='POST'>");
>>        response.getWriter().println("<input type='submit'
>> value='Hello'/>");
>>        response.getWriter().println("</form>");
>>
>> I'm not sure what to place in for the action attribute so that the 
>> portlet's
>> processAction() method will be called.  Any ideas?
>>
>> Thanks,
>> Glen
>>
>> -- 
>> View this message in context: 
>> http://www.nabble.com/%28newbie%29-processAction%28%29-not-being-called-tp24651504p24651504.html
>> Sent from the Jetspeed - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/%28newbie%29-processAction%28%29-not-being-called-tp24651504p24657598.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: (newbie) processAction() not being called

Posted by Ron McNulty <rm...@xtra.co.nz>.
Hi Glen

The action needs to be created by the portlet API. I've never done it the 
hard way like you are doing, but in a JSP it looks like this:

<form method="post" action="<portlet:actionURL/>">

Maybe that will give you some pointers...

Regards

Ron

----- Original Message ----- 
From: "Glen Mazza" <gl...@gmail.com>
To: <je...@portals.apache.org>
Sent: Saturday, July 25, 2009 8:33 AM
Subject: (newbie) processAction() not being called


>
> Hello,
>
> I'm trying to get my portlet's processAction() method get called from a 
> form
> submittal but am having no luck.  Having a bare-bones form in my doView()
> (I'm not using JSP files yet--I would like to get processAction() working
> first):
>
>        response.getWriter().println("<form action='???' method='POST'>");
>        response.getWriter().println("<input type='submit'
> value='Hello'/>");
>        response.getWriter().println("</form>");
>
> I'm not sure what to place in for the action attribute so that the 
> portlet's
> processAction() method will be called.  Any ideas?
>
> Thanks,
> Glen
>
> -- 
> View this message in context: 
> http://www.nabble.com/%28newbie%29-processAction%28%29-not-being-called-tp24651504p24651504.html
> Sent from the Jetspeed - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org