Last thing I tried was naming the submit button to "eventSubmit_doAddEntry" without success. So I gave up. Instead I installed the lates beta (4) compared to the (3) I ran before.
After implementing your suggestion (ie: not having the A capitalized in doAddentry) it works. It would of interest to know if it was the 'A' or the upgrade that solved it but I'm too lazy to control it. Thanks anyway! On Fri, 2003-05-30 at 15:30, Weaver, Scott wrote: > Your button/method is named incorrectly > > <input type="submit" name="eventSubmit_addEntry" value="Save"/> > > should be: > > <input type="submit" name="eventSubmit_doAddentry" value="Save"/> > > and the method in our action should be: > > public void doAddentry(RunData, Context) > > > *===================================* > * Scott T Weaver * > * Jakarta Jetspeed Portal Project * > * [EMAIL PROTECTED] * > *===================================* > > > > > -----Original Message----- > > From: Joachim Dagerot [mailto:[EMAIL PROTECTED] > > Sent: Thursday, May 29, 2003 5:01 PM > > To: [EMAIL PROTECTED] > > Subject: Can't get JSP/Portlet to work with actions. > > > > I have a class: > > public class ShoppingList extends JspPortletAction > > > > And it works great together with my jsp as stated in the registry: > > > > <portlet-entry name="Shopping1" hidden="false" type="ref" > > parent="JSP" application="false"> > > <meta-info> > > <title>Shopping1</title> > > <description> SHOP1 </description> > > </meta-info> > > > > <classname>org.apache.jetspeed.portal.portlets.JspPortlet</classname> > > <parameter name="template" value="shopping.jsp" hidden="true" > > cachedOnName="true" cachedOnValue="true"/> > > <parameter name="action" value="portlets.ShoppingList" > > hidden="true" cachedOnName="true" cachedOnValue="true"/> > > <media-type ref="html"/> > > <url cachedOnURL="true"/> > > <category group="Jetspeed">Dagerot</category> > > <category group="Jetspeed">dev.test</category> > > </portlet-entry> > > > > The buildMaximizedContext and buildNormalContext works as expected. So > > I have no doubt that all classes and paths are good. > > > > However I can't manage to get an action from the JSP to work, here's > > the JSP code: > > > > > > <form method="post" action="<jetspeed:dynamicUri/>"> > > <input type="hidden" name="action" value="portlets.ShoppingList"/> > > <table> > > <tr> > > <th>Ingredient</th><th>Amount</th> > > </tr> > > <tr><td><input name="ingredient"></input></td><td><input > > name="amount"></input></td><td> <input type="submit" > > name="eventSubmit_addEntry" value="Save"/></td></tr> > > </table> > > </form> > > > > > > and here is another fragment from the JSP (for tracking) > > <% > > String res = (String) request.getAttribute("JDresult"); > > if(res!=null) out.println(res); else out.println("result was > > null"); > > > > %> > > > > > > I have a addEntry in my class: > > > > public void addEntry(RunData rundata, Portlet arg0) { > > rundata.getRequest().setAttribute("JDresult", "Coolness"); > > checkAndDoAdditions(rundata); > > } > > > > > > But it's never called. The checkAndDoAdditions() adds data to a > > database if some parameters exists. If it's ran from the > > buildMaximizedContext (or the normal) it's updating into the database > > when I press the submit-button above. But when ran from my action > > addEntry nothing happens. > > > > I am really stuck here, I have followed all tutorials and guidlines > > there is, but no luck. > > > > Thanks in advance. > > > > > > > > > > > > --------------------------------------------------------------------- > > 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]
