portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jf...@apache.org
Subject cvs commit: jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/view portlet-detail.jsp metadata-detail.jsp tabs.jsp pam-detail.jsp
Date Thu, 09 Sep 2004 22:25:02 GMT
jford       2004/09/09 15:25:02

  Modified:    applications/pam/src/webapp/WEB-INF/view portlet-detail.jsp
                        metadata-detail.jsp tabs.jsp pam-detail.jsp
  Log:
  Added formatting, localization
  
  Revision  Changes    Path
  1.2       +1 -1      jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/view/portlet-detail.jsp
  
  Index: portlet-detail.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/view/portlet-detail.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- portlet-detail.jsp	8 Sep 2004 20:03:24 -0000	1.1
  +++ portlet-detail.jsp	9 Sep 2004 22:25:02 -0000	1.2
  @@ -1 +1 @@
  -<%--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License,
Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You
may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless
required by applicable law or agreed to in writing, software
distributed under the License
is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations
under the License.
--%>
<c:set var="portlet_tabs" value="${requestScope.portlet_tabs}"/>

<c:set
var="selectedPortletTab" value="${requestScope.selected_portlet_tab}"/>

<span class="portlet-section-header">Selected
Portlet</span>
<c:out value="${selectedPDef.name}"/>
<div id="portlet_tabs">

<c:set var="tab_items" value="${portlet_tabs}"/>
	<c:set var="currentTab" value="${selectedPortletTab}"/>
<c:set var="url_param_name" value="selected_portlet_tab"/>
	<%@ include file="tabs.jsp"%>
</div>

<br
/>

<c:if test="${selectedPortletTab.id == 'Details'}">
	Expiration Cache: <c:out
value="${selectedPDef.expirationCache}"/> <br />
	Portlet ID: <c:out value="${selectedPDef.portletIdentifier}"/>
<br />
	Unique Name: <c:out value="${selectedPDef.uniqueName}"/> <br />
PreferenceValidator: <c:out value="${selectedPDef.preferenceValidatorClassname}"/> <br
/>
	ClassName: <c:out value="${selectedPDef.className}"/> <br />
	
</c:if>

<c:if
test="${selectedPortletTab.id == 'Metadata'}">
	<div id="portlet_metadata">
			
	<c:set var="md" value="${selectedPDef.metadata}"/>
		<c:set var="action_prefix"
value="portlet."/>
		<portlet:actionURL var="edit_metadata_link" >			
		</portlet:actionURL>
	
		<%@ include file="metadata-detail.jsp" %>
	</div>
</c:if>

<c:if
test="${selectedPortletTab.id == 'Preferences'}">
	<c:set var="prefSet" value="${selectedPDef.preferenceSet}"/>
<%
		PreferenceSetComposite comp = (PreferenceSetComposite)pageContext.findAttribute("prefSet");
	Iterator prefIter = comp.iterator();
		pageContext.setAttribute("prefIter", prefIter);
	%>
<c:forEach var="pref" items="${prefIter}">
		<c:out value="${pref.name}"/> | 
	<c:forEach var="value" items="${pref.values}">
			<c:out value="${value}"/>,

		</c:forEach>
		<br />
	</c:forEach>
</c:if>

<c:if test="${selectedPortletTab.id
== 'Languages'}">
	<c:set var="langSet" value="${selectedPDef.languageSet}"/>
	<c:forEach
var="lang" items="${langSet.innerCollection}">
		<c:out value="${lang.title}"/> |
<c:out value="${lang.shortTitle}"/> | 
		<c:forEach var="keyword" items="${lang.keywords}">
		<c:out value="${keyword}"/> , 
		</c:forEach>
		| <c:out value="${lang.locale}"/>
<br />
	</c:forEach>
</c:if>

<c:if test="${selectedPortletTab.id ==
'Parameters'}">
	<c:set var="paramSet" value="${selectedPDef.initParameterSet}"/>

	<%--
		TODO:  if needed, place iterator into page context
		see prefs section
	--%>
<c:forEach var="theparam" items="${paramSet.innerCollection}">
		<c:out value="${theparam.name}"/>
| <c:out value="${theparam.value}"/> <br />
	</c:forEach>
</c:if>
<c:if
test="${selectedPortletTab.id == 'Security'}">
	<c:set var="roleSet" value="${selectedPDef.initSecurityRoleRefSet}"/>
<c:forEach var="therole" items="${roleSet.innerCollection}">
		<c:out value="${therole.roleName}"/>
 <br />
	</c:forEach>
</c:if>

<c:if test="${selectedPortletTab.id ==
'ContentType'}">
	<c:set var="contentTypeSet" value="${selectedPDef.contentTypeSet}"/>
<c:forEach var="contentType" items="${contentTypeSet.innerCollection}">
		<c:out
value="${contentType.contentType}"/> | 
		
		<c:forEach var="mode" items="${contentType.portletModes}">
		<c:out value="${mode}"/>, 
		</c:forEach>
		
		<br />
	</c:forEach>
</c:if>
  \ No newline at end of file
  +<%--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License,
Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You
may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless
required by applicable law or agreed to in writing, software
distributed under the License
is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations
under the License.
--%>
<c:set var="portlet_tabs" value="${requestScope.portlet_tabs}"/>

<c:set
var="selectedPortletTab" value="${requestScope.selected_portlet_tab}"/>

<span class="portlet-section-header">Selected
Portlet</span>
<c:out value="${selectedPDef.name}"/>
<div id="portlet_tabs">

<c:set var="tab_items" value="${portlet_tabs}"/>
	<c:set var="currentTab" value="${selectedPortletTab}"/>
<c:set var="url_param_name" value="selected_portlet_tab"/>
	<%@ include file="tabs.jsp"%>
</div>

<br
/>

<c:if test="${selectedPortletTab.id == 'pd_details'}">
	<table>
		<tr>
		<td	>
				<fmt:message key="pam.details.expiration_cache"/>
			</td>
		<td>
				<c:out value="${selectedPDef.expirationCache}"/>
			</td>
		</tr>
	</tr>
			<td>
				<fmt:message key="pam.details.id"/>
			</td>
	
	<td>
				<c:out value="${selectedPDef.portletIdentifier}"/>
			</td>
	
</tr>
		</tr>
			<td>
				<fmt:message key="pam.details.unique_name"/>
		</td>
			<td>
				<c:out value="${selectedPDef.uniqueName}"/>
			</td>
	</tr>
		</tr>
			<td>
				<fmt:message key="pam.details.preference_validator"/>
		</td>
			<td>
				<c:out value="${selectedPDef.preferenceValidatorClassname}"/>
		</td>
		</tr>
		</tr>
			<td>
				<fmt:message key="pam.details.class_name"/>
		</td>
			<td>
				<c:out value="${selectedPDef.className}"/>
			</td>
	</tr>
	</table>
</c:if>

<c:if test="${selectedPortletTab.id == 'pd_metadata'}">
<div id="portlet_metadata">
			
		<c:set var="md" value="${selectedPDef.metadata}"/>
	<c:set var="action_prefix" value="portlet."/>
		<portlet:actionURL var="edit_metadata_link"
>			
		</portlet:actionURL>
		
		<%@ include file="metadata-detail.jsp" %>
</div>
</c:if>

<c:if test="${selectedPortletTab.id == 'pd_preferences'}">
<c:set var="prefSet" value="${selectedPDef.preferenceSet}"/>
	<%
		PreferenceSetComposite
comp = (PreferenceSetComposite)pageContext.findAttribute("prefSet");
		Iterator prefIter =
comp.iterator();
		pageContext.setAttribute("prefIter", prefIter);
	%>
	<c:forEach var="pref"
items="${prefIter}">
		<c:out value="${pref.name}"/> | 
		<c:forEach var="value"
items="${pref.values}">
			<c:out value="${value}"/>, 
		</c:forEach>
		<br
/>
	</c:forEach>
</c:if>

<c:if test="${selectedPortletTab.id == 'pd_languages'}">
<c:set var="langSet" value="${selectedPDef.languageSet}"/>
	<c:forEach var="lang"
items="${langSet.innerCollection}">
		<c:out value="${lang.title}"/> | <c:out
value="${lang.shortTitle}"/> | 
		<c:forEach var="keyword" items="${lang.keywords}">
		<c:out value="${keyword}"/> , 
		</c:forEach>
		| <c:out value="${lang.locale}"/>
<br />
	</c:forEach>
</c:if>

<c:if test="${selectedPortletTab.id ==
'pd_parameters'}">
	<c:set var="paramSet" value="${selectedPDef.initParameterSet}"/>

	<%--
		TODO:  if needed, place iterator into page context
		see prefs section
	--%>
<c:forEach var="theparam" items="${paramSet.innerCollection}">
		<c:out value="${theparam.name}"/>
| <c:out value="${theparam.value}"/> <br />
	</c:forEach>
</c:if>
<c:if
test="${selectedPortletTab.id == 'pd_security'}">
	<c:set var="roleSet" value="${selectedPDef.initSecurityRoleRefSet}"/>
<c:forEach var="therole" items="${roleSet.innerCollection}">
		<c:out value="${therole.roleName}"/>
 <br />
	</c:forEach>
</c:if>

<c:if test="${selectedPortletTab.id ==
'pd_content_type'}">
	<c:set var="contentTypeSet" value="${selectedPDef.contentTypeSet}"/>
<c:forEach var="contentType" items="${contentTypeSet.innerCollection}">
		<c:out
value="${contentType.contentType}"/> | 
		
		<c:forEach var="mode" items="${contentType.portletModes}">
		<c:out value="${mode}"/>, 
		</c:forEach>
		
		<br />
	</c:forEach>
</c:if>
  \ No newline at end of file
  
  
  
  1.2       +1 -1      jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/view/metadata-detail.jsp
  
  Index: metadata-detail.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/view/metadata-detail.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- metadata-detail.jsp	8 Sep 2004 20:03:24 -0000	1.1
  +++ metadata-detail.jsp	9 Sep 2004 22:25:02 -0000	1.2
  @@ -1 +1 @@
  -<%--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License,
Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You
may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless
required by applicable law or agreed to in writing, software
distributed under the License
is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations
under the License.
--%>
<form name="Edit_Metatdata_Form" action="<c:out value="${edit_metadata_link}"/>">
<input type="hidden" name="portlet_action" value=""/>
	<c:forEach var="field" items="${md.fields}">
		
		<input type="checkbox" name="metadata_id" value="<c:out value="${field.id}"/>"/>
			
		<c:out value="${field.name}"/> | <c:out value="${field.value}"/> | <c:out
value="${field.locale}"/> 
		<%--TODO:  value needs to escaped, or use textarea--%>
			
		<input type="text" name="<c:out value="${field.id}"/>:value" value="<c:out
value="${field.value}"/>"/>
					
		<br />	
	</c:forEach>
			
	<input
type="submit" value="Edit" onClick="this.form.portlet_action.value = '<c:out value="${action_prefix}"/>edit_metadata'"/>
<input type="submit" value="Remove Selected" onClick="this.form.portlet_action.value =
'<c:out value="${action_prefix}"/>remove_metadata'"/>
</form>
		
<form action="<c:out
value="${edit_metadata_link}"/>">
	<input type="hidden" name="portlet_action" value="<c:out
value="${action_prefix}"/>add_metadata"/>
			
	Name: <input type="text" name="name"
value=""/> <br />
	Value: <input type="text" name="value" value=""/> <br
/>
	Locale: <input type="text" name="locale" value=""/> <br />
	<input type="submit"
value="Add Metadata"/>
</form>
  \ No newline at end of file
  +<%--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License,
Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You
may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless
required by applicable law or agreed to in writing, software
distributed under the License
is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations
under the License.
--%>
<form name="Edit_Metatdata_Form" action="<c:out value="${edit_metadata_link}"/>">
<input type="hidden" name="portlet_action" value=""/>
	<table>
		<tr>
	
	<th>&nbsp;</th>
			<th><fmt:message key="pam.details.name"/></th>
		<th><fmt:message key="pam.details.locale"/></th>
			<th><fmt:message
key="pam.details.value"/></th>
		</tr>
	<c:forEach var="field" items="${md.fields}">
	<tr>
			<td>
				<input type="checkbox" name="metadata_id" value="<c:out
value="${field.id}"/>"/>
			</td>
			<td>	
				<c:out value="${field.name}"/>
		</td>
			<td align="center">
				<c:out value="${field.locale}"/> 
		
	
			</td>
			<td>
				<%--TODO:  value needs to escaped, or use textarea--%>
			<input type="text" name="<c:out value="${field.id}"/>:value" value="<c:out
value="${field.value}"/>" size="50"/>
			</td>
		</tr>
	</c:forEach>
</table>
			
	<input type="submit" value="<fmt:message key="pam.details.edit"/>"
onClick="this.form.portlet_action.value = '<c:out value="${action_prefix}"/>edit_metadata'"/>
<input type="submit" value="<fmt:message key="pam.details.remove"/>" onClick="this.form.portlet_action.value
= '<c:out value="${action_prefix}"/>remove_metadata'"/>
</form>
		
<form
action="<c:out value="${edit_metadata_link}"/>">
	<input type="hidden" name="portlet_action"
value="<c:out value="${action_prefix}"/>add_metadata"/>
	<div>
		<table>
		<tr>
				<td>
					<span class="portlet-form-label"><fmt:message key="pam.details.name"/></span>
			</td>
				<td>
					<input type="text" name="name" value=""/>
				</td>
		</tr>
			<tr>
				<td>
					<span class="portlet-form-label"><fmt:message
key="pam.details.value"/></span>
				</td>
				<td>
					<input type="text"
name="value" value=""/>
				</td>
			</tr>
			<tr>
				<td>
		
		<span class="portlet-form-label"><fmt:message key="pam.details.locale"/></span>
			</td>
				<td>
					<input type="text" name="locale" value=""/>
				</td>
		</tr>
		</table>
	</div>
	<input type="submit" value="<fmt:message
key="pam.details.add_metadata"/>"/>
</form>
  \ No newline at end of file
  
  
  
  1.2       +1 -1      jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/view/tabs.jsp
  
  Index: tabs.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/view/tabs.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tabs.jsp	8 Sep 2004 20:03:24 -0000	1.1
  +++ tabs.jsp	9 Sep 2004 22:25:02 -0000	1.2
  @@ -1 +1 @@
  -<%--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License,
Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You
may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless
required by applicable law or agreed to in writing, software
distributed under the License
is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations
under the License.
--%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 <tr>
  	<c:forEach var="tab" items="${tab_items}">
  		<td <c:if test="${tab
== currentTab}"> class="LTabLeft" </c:if>
  		    <c:if test="${tab != currentTab}">
class="LTabLeftLow" </c:if>
  		     style="font-size:1pt;" nowrap="true">
  		 
   &nbsp;
  		</td>
  	    <td <c:if test="${tab == currentTab}"> class="LTab"
</c:if>
  	        <c:if test="${tab != currentTab}"> class="LTabLow" </c:if>
 	         align="center" valign="middle" nowrap="true">
		                     
  	  
      <% 
  				String tabid = ((TabBean)pageContext.getAttribute("tab")).getId(); 
  
			String paramName = (String)pageContext.getAttribute("url_param_name");
  	         %>
 	         <portlet:actionURL var="select_portlet_tab_link" >
  	             <portlet:param
name="<%= paramName %>" value="<%= tabid %>" />
  	         </portlet:actionURL>
	                     
  	        <a href="<c:out value="${select_portlet_tab_link}"/>">
 	            <c:out value="${tab.description}"/>
  	        </a>
  	    </td>
 	    <td <c:if test="${tab == currentTab}"> class="LTabRight" </c:if>
  	
       <c:if test="${tab != currentTab}"> class="LTabRightLow" </c:if> 
  	  
     style="font-size:1pt;" nowrap="true">
  	        &nbsp;
  	    </td>
  
</c:forEach>
  </tr>
</table>
  \ No newline at end of file
  +<%--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License,
Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You
may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless
required by applicable law or agreed to in writing, software
distributed under the License
is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations
under the License.
--%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 <tr>
  	<c:forEach var="tab" items="${tab_items}">
  		<td <c:if test="${tab
== currentTab}"> class="LTabLeft" </c:if>
  		    <c:if test="${tab != currentTab}">
class="LTabLeftLow" </c:if>
  		     style="font-size:1pt;" nowrap="true">
  		 
   &nbsp;
  		</td>
  	    <td <c:if test="${tab == currentTab}"> class="LTab"
</c:if>
  	        <c:if test="${tab != currentTab}"> class="LTabLow" </c:if>
 	         align="center" valign="middle" nowrap="true">
		                     
  	  
      <% 
  				String tabid = ((TabBean)pageContext.getAttribute("tab")).getId(); 
  
			String paramName = (String)pageContext.getAttribute("url_param_name");
  	         %>
 	         <portlet:actionURL var="select_portlet_tab_link" >
  	             <portlet:param
name="<%= paramName %>" value="<%= tabid %>" />
  	         </portlet:actionURL>
	                     
  	        <a href="<c:out value="${select_portlet_tab_link}"/>">
 				<fmt:message>pam.details.tabs.<c:out value="${tab.id}"/></fmt:message>
 	        </a>
  	    </td>
  	    <td <c:if test="${tab == currentTab}">
class="LTabRight" </c:if>
  	        <c:if test="${tab != currentTab}"> class="LTabRightLow"
</c:if> 
  	        style="font-size:1pt;" nowrap="true">
  	        &nbsp;
 	    </td>
  	</c:forEach>
  </tr>
</table>
  \ No newline at end of file
  
  
  
  1.9       +1 -1      jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/view/pam-detail.jsp
  
  Index: pam-detail.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/view/pam-detail.jsp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- pam-detail.jsp	8 Sep 2004 20:07:27 -0000	1.8
  +++ pam-detail.jsp	9 Sep 2004 22:25:02 -0000	1.9
  @@ -1 +1 @@
  -<%--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License,
Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You
may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless
required by applicable law or agreed to in writing, software
distributed under the License
is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations
under the License.
--%>
<%@ page language="java" session="true" %>
<%@ page import="javax.portlet.*"
%>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.jetspeed.portlets.pam.beans.TabBean"
%>
<%@ page import="org.apache.jetspeed.om.common.preference.*" %>

<%@ taglib
uri='/WEB-INF/portlet.tld' prefix='portlet'%>
<%@ taglib uri="http://java.sun.com/jstl/core"
prefix="c" %>


<portlet:defineObjects/>
<h2>Portlet Application Detail</h2>

<c:set
var="pa" value="${requestScope.portletApplication}" />
<c:set var="name" value="${pa.name}"
/>
<c:set var="version" value="${pa.version}" />

<c:set var="tabs" value="${requestScope.tabs}"/>
<c:set
var="selectedTab" value="${requestScope.selected_tab}"/>
<c:set var="selectedPDef" value="${requestScope.portletDefinition}"/>

app.name
= <c:out value="${name}"/><br />
app.version = <c:out value="${version}"/>
<br />

<div id="tabs">
	<c:set var="tab_items" value="${tabs}"/>
	<c:set
var="currentTab" value="${selectedTab}"/>
	<c:set var="url_param_name" value="selected_tab"/>
<%@ include file="tabs.jsp"%>
</div>

<%--Beginning of Portlets tab data--%>
<%--TODO:
 switch to c:choose --%>
<c:if test="${selectedTab.id == 'Portlets'}">
  <div
id="portlets">
	
	<portlet:actionURL var="select_portlet_link" >
        <%--<portlet:param
name="select_portlet" value="<%= pdefName %>" />--%>
    </portlet:actionURL>
<form action="<c:out value="${select_portlet_link}"/>">
		<select name="select_portlet">
	
			<option value="" <c:if test="! ${selectedPDef}"> selected="true"</c:if>
>Please Choose Portlet</option>

			<c:forEach var="portletDef" items="${pa.portletDefinitions}">
		    <c:set var="pdefName" value="${portletDef.name}"/>
			    
			    <%--We must
do this since portlet taglib doesn't support expressions--%>
			    <% String pdefName
= (String) pageContext.getAttribute("pdefName"); %>
			    
			    <option value="<c:out
value="${portletDef.name}"/>" <c:if test="${selectedPDef.name == portletDef.name}">selected="true"</c:if>>
			  <c:out value="${portletDef.name}"/>
			    </option>
				<%--
			    <a
href="<c:out value="${select_portlet_link}"/>">
			        <c:out value="${portletDef.name}"
/><br />
			    </a>
			    --%>
			</c:forEach>
		</select>
	
		<input type="submit" value="Select"/>
    </form>
  </div>
    
  <div
id="selectedPortlet" class="">
	
	<c:if test="${selectedPDef != null}">
		<%@
include file="portlet-detail.jsp" %>
	</c:if>
    
  </div>
</c:if>
<%--End
of Portlets tab data--%>

<%--Beginning of UserAttr tab data--%>
<%--TODO:  switch
to c:choose --%>
<c:if test="${selectedTab.id == 'UserAttr'}">
  <div id="Details">
<portlet:actionURL var="edit_user_attr_link" >
	</portlet:actionURL>
		
	<form
name="Edit_UserAttr_Form" action="<c:out value="${edit_user_attr_link}"/>">
		<input
type="hidden" name="portlet_action" value="portlet_app.edit_user_attribute"/>
		<c:forEach
var="userAttr" items="${pa.userAttributes}">
			<%--<input type="hidden" name="user_attr_name"
value="<c:out value="${userAttr.name}"/>"/>--%>
			
			<input type="checkbox"
name="user_attr_id" value="<c:out value="${userAttr.name}"/>"/>
			<c:out value="${userAttr.name}"/>
| 
			<input type="text" name="<c:out value="${userAttr.name}"/>:description" value="<c:out
value="${userAttr.description}"/>"/> <br />
		</c:forEach>
		
		<input
type="submit" value="Edit" onClick="this.form.portlet_action.value = 'portlet_app.edit_user_attribute'"/>
	<input type="submit" value="Remove Selected" onClick="this.form.portlet_action.value =
'portlet_app.remove_user_attribute'"/>
	</form>
	
	<form action="<c:out value="${edit_user_attr_link}"/>">
	<input type="hidden" name="portlet_action" value="portlet_app.add_user_attribute"/>
		
		Name: <input type="text" name="user_attr_name" value=""/> <br />
		Description:
<input type="text" name="user_attr_desc" value=""/> <br />
		<input type="submit"
value="Add User Attr"/>
	</form>
  </div>
</c:if>
<%--End of UserAttr
tab data--%>


<%--Beginning of Metadata tab data--%>
<%--TODO:  switch to c:choose
--%>
<c:if test="${selectedTab.id == 'Metadata'}">
	<div id="metadata">
		<c:set
var="md" value="${pa.metadata}"/>
	
		<portlet:actionURL var="edit_metadata_link" >
		
		</portlet:actionURL>
		<c:set var="action_prefix" value="portlet_app."/>
	
		<%@ include file="metadata-detail.jsp" %>
		
	</div>
</c:if>
<%--End
of Metadata tab data--%>

<%--Beginning of Details tab data--%>
<%--TODO:  switch
to c:choose --%>
<c:if test="${selectedTab.id == 'Details'}">
	<div id="details">
	app.name = <c:out value="${name}"/><br />
		app.version = <c:out value="${version}"/>
<br />
		app.description = <c:out value="${pa.description}"/> <br />

	
<c:choose>
			<c:when test="${pa.applicationType == '0'}">
				app.type = WEBAPP
<br />
			</c:when>
			<c:when test="${pa.applicationType == '1'}">
			
app.type = LOCAL <br />
			</c:when>
		</c:choose>

		app.id = <c:out
value="${pa.applicationIdentifier}"/>
	
	
		<%--Name | AppId | Id <br />--%>
	
		<c:if test="${! empty pa.jetspeedServices}">
			<hr />
			Jetspeed Services
		<hr />
			<c:forEach var="service" items="${pa.jetspeedServices}">
				<c:out
value="${service.name}"/> <br /> <%--| <c:out value="${service.appId}"/>
| <c:out value="${service.id}"/><br />--%>
			</c:forEach>
		</c:if>
</div>
</c:if>
<%--End of Details tab data--%>

<br />
<br />


  \ No newline at end of file
  +<%--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License,
Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You
may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless
required by applicable law or agreed to in writing, software
distributed under the License
is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations
under the License.
--%>
<%@ page language="java" session="true" %>
<%@ page import="javax.portlet.*"
%>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.jetspeed.portlets.pam.beans.TabBean"
%>
<%@ page import="org.apache.jetspeed.om.common.preference.*" %>

<%@ taglib
uri='/WEB-INF/portlet.tld' prefix='portlet'%>
<%@ taglib uri="http://java.sun.com/jstl/core"
prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>

<fmt:setBundle
basename="org.apache.jetspeed.portlets.pam.resources.PAMResources" />


<portlet:defineObjects/>

<c:set
var="pa" value="${requestScope.portletApplication}" />
<c:set var="name" value="${pa.name}"
/>
<c:set var="version" value="${pa.version}" />

<c:set var="tabs" value="${requestScope.tabs}"/>
<c:set
var="selectedTab" value="${requestScope.selected_tab}"/>
<c:set var="selectedPDef" value="${requestScope.portletDefinition}"/>

<fmt:message
key="pam.details.name"/> = <c:out value="${name}"/><br />
<fmt:message key="pam.details.version"/>
= <c:out value="${version}"/> <br />

<div id="tabs">
	<c:set var="tab_items"
value="${tabs}"/>
	<c:set var="currentTab" value="${selectedTab}"/>
	<c:set var="url_param_name"
value="selected_tab"/>
	<%@ include file="tabs.jsp"%>
</div>

<%--Beginning
of Portlets tab data--%>
<%--TODO:  switch to c:choose --%>
<c:if test="${selectedTab.id
== 'pa_portlets'}">
  <div id="portlets">
	
	<portlet:actionURL var="select_portlet_link"
>
        <%--<portlet:param name="select_portlet" value="<%= pdefName %>"
/>--%>
    </portlet:actionURL>
	<form action="<c:out value="${select_portlet_link}"/>">
	<select name="select_portlet" onChange="this.form.submit();">
		
			<option value=""
<c:if test="! ${selectedPDef}"> selected="true"</c:if> >
				<fmt:message
key="pam.details.choose_portlet"/>
			</option>

			<c:forEach var="portletDef"
items="${pa.portletDefinitions}">
			    <c:set var="pdefName" value="${portletDef.name}"/>
		    
			    <%--We must do this since portlet taglib doesn't support expressions--%>
		    <% String pdefName = (String) pageContext.getAttribute("pdefName"); %>
			   

			    <option value="<c:out value="${portletDef.name}"/>" <c:if test="${selectedPDef.name
== portletDef.name}">selected="true"</c:if>>
				  <c:out value="${portletDef.name}"/>
		    </option>
				<%--
			    <a href="<c:out value="${select_portlet_link}"/>">
		        <c:out value="${portletDef.name}" /><br />
			    </a>
			   
--%>
			</c:forEach>
		</select>
		
		<!--<input type="submit" value="Select"/>-->
   </form>
  </div>
    
  <div id="selectedPortlet" class="">
	
	<c:if
test="${selectedPDef != null}">
		<%@ include file="portlet-detail.jsp" %>
	</c:if>
   
  </div>
</c:if>
<%--End of Portlets tab data--%>

<%--Beginning
of UserAttr tab data--%>
<%--TODO:  switch to c:choose --%>
<c:if test="${selectedTab.id
== 'pa_user_attribtues'}">
  <div id="Details">
	<portlet:actionURL var="edit_user_attr_link"
>
	</portlet:actionURL>
		
	<form name="Edit_UserAttr_Form" action="<c:out
value="${edit_user_attr_link}"/>">
		<input type="hidden" name="portlet_action" value="portlet_app.edit_user_attribute"/>
	
		<table>
			<tr>
				<th>&nbsp;</th>
				<th><fmt:message
key="pam.details.name"/></th>
				<th><fmt:message key="pam.details.value"/></th>
		</tr>
		<c:forEach var="userAttr" items="${pa.userAttributes}">
			<tr>
		<%--<input type="hidden" name="user_attr_name" value="<c:out value="${userAttr.name}"/>"/>--%>
		
				<td>
					<input type="checkbox" name="user_attr_id" value="<c:out value="${userAttr.name}"/>"/>
			</td>
				<td>
					<c:out value="${userAttr.name}"/>
				</td>
			<td>
					<input type="text" name="<c:out value="${userAttr.name}"/>:description"
value="<c:out value="${userAttr.description}"/>"/>
				</td>
			</tr>
	</c:forEach>
		</table>
		
		<input type="submit" value="<fmt:message key="pam.details.edit"/>"
onClick="this.form.portlet_action.value = 'portlet_app.edit_user_attribute'"/>
		<input
type="submit" value="<fmt:message key="pam.details.remove"/>" onClick="this.form.portlet_action.value
= 'portlet_app.remove_user_attribute'"/>
	</form>
	
	<form action="<c:out value="${edit_user_attr_link}"/>">
	<input type="hidden" name="portlet_action" value="portlet_app.add_user_attribute"/>
	
		<table>
			<tr>
				<td>
					<fmt:message key="pam.details.name"/>
			</td>
				<td>
					<input type="text" name="user_attr_name" value=""/>
			</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="pam.details.description"/>
			</td>
				<td>
					<input type="text" name="user_attr_desc" value=""/>
			</td>
			</tr>
		</table>
		<input type="submit" value="<fmt:message
key="pam.details.add_user_attribute"/>"/>
	</form>
  </div>
</c:if>
<%--End
of UserAttr tab data--%>


<%--Beginning of Metadata tab data--%>
<%--TODO:  switch
to c:choose --%>
<c:if test="${selectedTab.id == 'pa_metadata'}">
	<div id="metadata">
	<c:set var="md" value="${pa.metadata}"/>
	
		<portlet:actionURL var="edit_metadata_link"
>
			
		</portlet:actionURL>
		<c:set var="action_prefix" value="portlet_app."/>
	
		<%@ include file="metadata-detail.jsp" %>
		
	</div>
</c:if>
<%--End
of Metadata tab data--%>

<%--Beginning of Details tab data--%>
<%--TODO:  switch
to c:choose --%>
<c:if test="${selectedTab.id == 'pa_details'}">
	<div id="details">
	<table>
			<tr>
				<td>
					<fmt:message key="pam.details.name"/>
			<td>
					<c:out value="${name}"/>
				</td>
			</tr>
			<tr>
			<td>
					<fmt:message key="pam.details.version"/>
				</td>
				<td>
				<c:out value="${version}"/>
				</td>
			</tr>
			<tr>
				<td>
	
					<fmt:message key="pam.details.description"/>
				</td>
				<td>
				<c:out value="${pa.description}"/>
				</td>
			</tr>
			<tr>
			<td>
					<fmt:message key="pam.details.type"/>
				</td>
				<td>
				<c:choose>
						<c:when test="${pa.applicationType == '0'}">
							<fmt:message
key="pam.details.type.webapp"/>
						</c:when>
						<c:when test="${pa.applicationType
== '1'}">
							<fmt:message key="pam.details.type.local"/>
						</c:when>
				</c:choose>
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message
key="pam.details.id"/>
				</td>
				<td>
					<c:out value="${pa.applicationIdentifier}"/>
			</td>
			</tr>
		</table>
	
		
		<c:if test="${! empty pa.jetspeedServices}">
		<hr />
			<fmt:message key="pam.details.services"/>
			<hr />
			<c:forEach
var="service" items="${pa.jetspeedServices}">
				<c:out value="${service.name}"/>
<br /> <%--| <c:out value="${service.appId}"/> | <c:out value="${service.id}"/><br
/>--%>
			</c:forEach>
		</c:if>
	</div>
</c:if>
<%--End
of Details tab data--%>

<br />
<br />


  \ No newline at end of file
  
  
  

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


Mime
View raw message