You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by Michel Alessandrini <ws...@gmx-topmail.de> on 2005/08/16 11:06:56 UTC

Patch: wsrptestportlet-form

Hi,

I used the wsrp-testportlet in a different portal and the result was:

    the form doesn't work.

Therefore I created two patches to resolve that problem.
These changes must also be performed within the sandbox-dir.

regards

Michel


Patch 1:
--------
Index: test4.jsp
===================================================================
RCS file: /home/cvspublic/ws-wsrp4j/portlets/wsrptest/war/jsp/test4.jsp,v
retrieving revision 1.1
diff -u -r1.1 test4.jsp
--- test4.jsp 31 Oct 2003 22:26:44 -0000 1.1
+++ test4.jsp 16 Aug 2005 08:41:51 -0000
@@ -17,8 +17,12 @@
 <B>Hello
 <%
 PortletPreferences preferences = renderRequest.getPreferences();
-String prop = preferences.getValue("name","");
-out.print(prop);
+//String prop = preferences.getValue("name","");
+String prop = renderRequest.getParameter("name");
+if (prop != null)
+  out.print(prop);
+else
+  out.print("stranger ;-)");
 %>
 </B>
 <P/>

Patch 2:
--------
Index: TestPortlet.java
===================================================================
RCS file: 
/home/cvspublic/ws-wsrp4j/portlets/wsrptest/src/org/apache/wsrp4j/testportlet/TestPortlet.java,v
retrieving revision 1.2
diff -u -r1.2 TestPortlet.java
--- TestPortlet.java 9 Mar 2004 21:41:12 -0000 1.2
+++ TestPortlet.java 16 Aug 2005 08:40:36 -0000
@@ -30,9 +30,10 @@
             handleCounter(request);

         String nameValue = request.getParameter("name");
-        if(nameValue != null)
-            updatePreferences(request, "name", nameValue);
-
+        if(nameValue != null) {
+            //updatePreferences(request, "name", nameValue);
+            actionResponse.setRenderParameter("name", nameValue);
+        }
     }

     private void updatePreferences(ActionRequest request, String key, 
String value) {



Re: Patch: wsrptestportlet-form

Posted by Diego Louzán <dl...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Got them on sandbox/ too :-)
Anyway, don't worry too much for sandbox/ dir for now, it's work in progress.

Regards.
Diego.

Michel Alessandrini wrote:
> Hi Carsten,
> 
> ----- Original Message ----- From: "Carsten Ziegeler"
> <cz...@apache.org>
> 
>>
>> I just applied your patch - can you please verify that everything is ok?
> 
> 
> It works fine. :-)
> 
> Thanks
> 
> Michel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDChWwgyzZYflJelERAlHoAJ4/f9ckXQ8/A6Cbk4U6sIO/dwvrIwCfTAl9
l/0iRVUbIP5KkWd4dvQsbf4=
=UxZZ
-----END PGP SIGNATURE-----

Re: Patch: wsrptestportlet-form

Posted by Michel Alessandrini <ws...@gmx-topmail.de>.
Hi Carsten,

----- Original Message ----- 
From: "Carsten Ziegeler" <cz...@apache.org>
> 
> I just applied your patch - can you please verify that everything is ok?

It works fine. :-)

Thanks

Michel

Re: Patch: wsrptestportlet-form

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Michel,

I just applied your patch - can you please verify that everything is ok?

Thanks for the patch

Carsten

Michel Alessandrini schrieb:
> Hi,
> 
> I used the wsrp-testportlet in a different portal and the result was:
> 
>     the form doesn't work.
> 
> Therefore I created two patches to resolve that problem.
> These changes must also be performed within the sandbox-dir.
> 
> regards
> 
> Michel
-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/