svnno****@sourc*****
svnno****@sourc*****
2008年 7月 31日 (木) 21:21:30 JST
Revision: 51
http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=jetspeed-japan&view=rev&rev=51
Author: karma
Date: 2008-07-31 21:21:30 +0900 (Thu, 31 Jul 2008)
Log Message:
-----------
update translate
Modified Paths:
--------------
jetspeed-2-trans/trunk/ja/xdocs/j1-migration.xml
-------------- next part --------------
Modified: jetspeed-2-trans/trunk/ja/xdocs/j1-migration.xml
===================================================================
--- jetspeed-2-trans/trunk/ja/xdocs/j1-migration.xml 2008-07-15 09:45:13 UTC (rev 50)
+++ jetspeed-2-trans/trunk/ja/xdocs/j1-migration.xml 2008-07-31 12:21:30 UTC (rev 51)
@@ -865,36 +865,105 @@
]]>
</source>
+<div class="original">
<p>The <b>doInsert</b> method is linked by Turbine to an action in the Velocity template with the <b>eventSubmit_</b> prefix:
</p>
+</div>
+
+<p>
+Turbine は,<b>doInsert</b> メソッドと,<b>eventSubmit_</b> プレフィックスを持つ Velocity テンプレートのアクションと関連付けます.
+</p>
+
+<div class="original">
<source>
<![CDATA[
<input type="submit" name="eventSubmit_doInsert" value="${l10n.USER_FORM_ADD_USER_VM}"/>
]]>
</source>
+</div>
+
+<source>
+<![CDATA[
+<input type="submit" name="eventSubmit_doInsert" value="${l10n.USER_FORM_ADD_USER_VM}"/>
+]]>
+</source>
+
+<div class="original">
<p>Here is the equivalent in the Portlet API (Jetspeed-2):</p>
+</div>
+
+<p>
+ここにポートレット API (Jetspeed 2) での同等のものがあります.
+</p>
+
+<div class="original">
<source>
<![CDATA[
public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortletException, IOException
]]>
</source>
+</div>
+
+<source>
+<![CDATA[
+ public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortletException, IOException
+]]>
+</source>
+
+<div class="original">
<p>The Portlet API provides two parameters to the processAction method: the ActionRequest and ActionResponse.</p>
+</div>
+
+<p>
+ポートレット API は,processAction メソッドに 2 つのパラメータを用意しています.
+</p>
</subsection>
- <subsection name='Request Parameters, Portlet Modes, Window States'>
+ <subsection name='[Request Parameters, Portlet Modes, Window States] リクエストパラメータ,ポートレットモード,ウィンドウの状態'>
+ <div class="original">
<p>Request parameters are accessed via RunData in Jetspeed-1:</p>
+ </div>
+ <p>
+ Jetspeed 1 では,リクエストパラメータは RunData 経由でアクセスします.
+ </p>
+<div class="original">
<source>
<![CDATA[
String name = rundata.getParameters().getString("username");
]]>
</source>
+</div>
+<source>
+<![CDATA[
+ String name = rundata.getParameters().getString("username");
+]]>
+</source>
+ <div class="original">
<p>With the Portlet API, portlet request parameters are accessed via the ActionRequest:</p>
+ </div>
+ <p>
+ ポートレット API では,ポートレットのリクエストパラメータは,ActionRequest 経由でアクセスします.
+ </p>
+<div>
<source>
<![CDATA[
String name = actionRequest.getParameter("username");
]]>
</source>
+</div>
+<source>
+<![CDATA[
+ String name = actionRequest.getParameter("username");
+]]>
+</source>
+ <div class="original">
<p>With the Portlet API, you can check the Portlet Mode or Window State:</p>
+ </div>
+ <p>
+ ポートレット API では,ポートレットモードとウィンドウの状態をチェック出来ます.
+ </p>
+<div class="original">
<source>
<![CDATA[
if (actionRequest.getPortletMode() == PortletMode.EDIT)
@@ -904,10 +973,26 @@
...
]]>
</source>
+</div>
+<source>
+<![CDATA[
+ if (actionRequest.getPortletMode() == PortletMode.EDIT)
+ {
+ if ( !request.getWindowState().equals(WindowState.MINIMIZED))
+ {
+ ...
+]]>
+</source>
+ <div class="original">
<p>The basic Portlet API does not have a way to map actions to methods as in Jetspeed-1.
If you would like this kind of behavior, we recommend using the <a href='http://www.springframework.org/docs/reference/portlet.html'>Spring MVC Portlet framework</a>
Here we demonstrate using portlet request parameters per form to map to specific actions:
</p>
+ </div>
+ <p>
+ 基本的なポートレット API には,Jetspeed 1 のように,アクションとメソッドをマッピングする方法がありません.もし,このような振る舞いをしたいのであれば,<a href='http://www.springframework.org/docs/reference/portlet.html'>Spring MVC Portlet framework</a> を使うことをおすすめします.ここで,フォームからのポートレットのリクエストパラメータを使って,特定のアクションにマップする実例を挙げます.
+ </p>
+<div class="original">
<source>
<![CDATA[
String action = actionRequest.getParameter(SecurityResources.PORTLET_ACTION);
@@ -926,6 +1011,25 @@
...
]]>
</source>
+</div>
+<source>
+<![CDATA[
+ String action = actionRequest.getParameter(SecurityResources.PORTLET_ACTION);
+ if (action != null && action.equals("remove.user"))
+ {
+ removeUser(actionRequest, actionResponse);
+ }
+ else if (action != null && action.equals("add.new.user"))
+ {
+ PortletMessaging.cancel(actionRequest, SecurityResources.TOPIC_USERS, SecurityResources.MESSAGE_SELECTED);
+ }
+ else if (action != null && action.equals("add.user"))
+ {
+ addUser(actionRequest);
+ }
+ ...
+]]>
+</source>
</subsection>
<subsection name='Persisting State: The Portlet Session'>
<p>The Portlet API provides built-in support for persistence of Portlet state in the session.