Author: david.borruat
Date: 2010-05-03 14:02:49 -0400 (Mon, 03 May 2010)
New Revision: 2945
Modified:
sandbox/mobile_delivery/trunk/examples/portlets/davidportlet/src/main/webapp/jsp/welcome.jsp
sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java
sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/webapp/jsp/welcome.jsp
Log:
example portlet JspHelloUser modified
Modified:
sandbox/mobile_delivery/trunk/examples/portlets/davidportlet/src/main/webapp/jsp/welcome.jsp
===================================================================
---
sandbox/mobile_delivery/trunk/examples/portlets/davidportlet/src/main/webapp/jsp/welcome.jsp 2010-05-03
18:01:39 UTC (rev 2944)
+++
sandbox/mobile_delivery/trunk/examples/portlets/davidportlet/src/main/webapp/jsp/welcome.jsp 2010-05-03
18:02:49 UTC (rev 2945)
@@ -1,15 +1,7 @@
<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
- <style type="text/css">
- h1 { color: navy; }
- h2 { color: blue; }
- .portlet-font { font-style: italic }
- .Default { width: 300px }
- body { background: #dedf00; font-size: 15px}
- </style>
+<div class="portlet-section-header">Welcome !</div>
-<div class="portlet-section-header"><h1>Welcome
!</h1></div>
-
<br/>
<div class="portlet-font">
@@ -42,4 +34,4 @@
<input class="portlet-form-input-field" type="text"
name="yourname"/>
<input class="portlet-form-button" type="Submit"/>
</form>
-</div>
+</div>
\ No newline at end of file
Modified:
sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java
===================================================================
---
sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2010-05-03
18:01:39 UTC (rev 2944)
+++
sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2010-05-03
18:02:49 UTC (rev 2945)
@@ -38,7 +38,8 @@
public void doView(RenderRequest request, RenderResponse response) throws
PortletException, IOException
{
- String sYourName = (String) request.getParameter("yourname");
+
+ String sYourName = (String) request.getParameter("yourname");
if (sYourName != null)
{
PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/hello.jsp");
Modified:
sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/webapp/jsp/welcome.jsp
===================================================================
---
sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/webapp/jsp/welcome.jsp 2010-05-03
18:01:39 UTC (rev 2944)
+++
sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/webapp/jsp/welcome.jsp 2010-05-03
18:02:49 UTC (rev 2945)
@@ -1,45 +1,32 @@
<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
- <style type="text/css">
- h1 { color: navy; }
- h2 { color: blue; }
- .portlet-font { font-style: italic }
- .Default { width: 300px }
- body { background: #dedf00; font-size: 15px}
+<style type="text/css">
+ .Default { background:navy }
+ /* .UIWorkingWorkspace { width: 500px } */
</style>
-<div class="portlet-section-header"><h1>Welcome
!</h1></div>
+<SCRIPT type="text/javascript">
+<!--
+function change()
+{
+
document.getElementById('SITEBODY-VIEW-BLOCK').innerHTML="la_valeur_que_tu_veux_�crire";
+
+}
-<br/>
+function addHTML()
+{
+ //
+ //document.write("<style type='text/css'> .UIWorkingWorkspace {
width: 500px } </style>");
+ // document.write("hello you");
+ //document.open();
+ document.write("User-agent header: " + navigator.userAgent);
+ document.write("<style type=\"text/css\"> .UIWorkingWorkspace {
width: 500px } </style>");
+ document.close();
-<div class="portlet-font">
+}
- Welcome on the JSP Hello User portlet,
-my name is JBoss Portal. What's yours ?</div>
-
-<br/>
-
-<div class="portlet-font">Method 1: We simply pass the parameter to the
render phase:<br/>
-<a href="<portlet:renderURL><portlet:param name="yourname"
value="John Doe"/></portlet:renderURL>">John
Doe</a></div>
-
-<br/>
-
-<div class="portlet-font">Method 2: We pass the parameter to the render
phase, using valid markup:
-Please check the source code to see the difference with Method 1.
-<portlet:renderURL var="myRenderURL">
- <portlet:param name="yourname" value='John Doe'/>
-</portlet:renderURL>
-<br/>
-<a href="<%= myRenderURL %>">John Doe</a></div>
-
-<br/>
-
-<div class="portlet-font">Method 3: We use a form:<br/>
-
-<portlet:actionURL var="myActionURL"/>
-<form action="<%= myActionURL %>" method="POST">
- <span class="portlet-form-field-label">Name:</span>
- <input class="portlet-form-input-field" type="text"
name="yourname"/>
- <input class="portlet-form-button" type="Submit"/>
-</form>
-</div>
+//-->
+</SCRIPT>
+<div class="portlet-section-header">Hidden portlet</div>
+<div onclick="javascript:change()"> Change content by ID </div>
+<div onclick="javascript:addHTML()"> Insert HTML in the code
</div>