portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF portlet.xml
Date Thu, 23 Dec 2004 06:27:42 GMT
taylor      2004/12/22 22:27:42

  Modified:    applications/demo/src/webapp/WEB-INF portlet.xml
  Added:       applications/demo/src/webapp/WEB-INF/view database-help.vm
                        database-view.vm
  Log:
  port of J1 database browser
  under construction
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/view/database-help.vm
  
  Index: database-help.vm
  ===================================================================
  <b>TODO: write help</b>
  
  
  
  1.1                  jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/view/database-view.vm
  
  Index: database-view.vm
  ===================================================================
  #*
  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.
  *#
  
  #**
  
  @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  @version $Id: database-browser-portlet.vm,v 1.14 2004/08/29 22:27:27 jford Exp $
  
  *#
  <table cellpadding=0 cellspacing=1 border=0 width="100%">
    <tbody>
    <tr>
      #foreach ($column in $title)
        #set ($columnLink = $jslink.setPortletById($portlet.ID).addQueryData("js_dbcolumn",$column))
  
        <td align=CENTER class="listCellHead" width="43" nowrap onClick="window.location.href='$columnLink'">
          <div align="center">$column</div>
        </td>
      #end
      #if ($rowLinks)
          #if ($rowLinks.size() > 0)
              <td align=CENTER width="43" class="listCellHead"></td>
          #end
      #end
    </tr>
    #foreach ( $row in $table )
    <tr>
      #foreach ( $entry in $row )
        #if ($velocityCount == 1)
          #set ($rowid = $entry)
        #end
        <td class="listCell" nowrap width="43">
          <div align="center">$entry</div>
        </td>
      #end
      #if ($rowLinks)
          #if ($rowLinks.size() > 0)
              <td class="listCell" nowrap width="100">
              #foreach ($rowLink in $rowLinks)
                  #set ($rName = $l10n.get($rowLink.Name))
                  #if($rowLink.Type=="pane")
                      #set ($link1 = $jslink.setPaneByName($rowLink.Action).addQueryData("js_rowid",$rowid).addQueryData("js_mode",$rName))
                  #else
                      #set ($link1 = $jslink.setPage($rowLink.Page).addQueryData("js_rowid",$rowid).addQueryData("js_mode",$rName))
                  #end
                  <a class="listCell" href='$link1'>$rName</a>&nbsp;
              #end
              </td>
          #end
      #end
    </tr>
    #end
    #if ($tableLinks)
      #if ($tableLinks.size() > 0)
        <tr>
          <td>&nbsp;
          </td>
        </tr>
        <tr>
          #foreach ($tableLink in $tableLinks)
              #set ($tName = $l10n.get($tableLink.Name) )
              #if ($tableLink.Type == "pane")
                  #set ($link2 = $jslink.setPaneByName($tableLink.Action).addQueryData("js_mode",$tName))
              #else
                  #set ($link2 = $jslink.setPage($tableLink.Page).addQueryData("js_mode",$tName))
              #end
              <td><a href='$link2'>$tName</a></td>
          #end
        </tr>
      #end
    #end
    </tbody>
  </table>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr bgcolor="#6868AB">
      <td>&nbsp;
      </td>
    </tr>
  </table>
  <table width="200" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
      #if ($prev)
        <td valign="middle" height="30">
          <div align="center">
            <form action="$renderResponse.createActionURL()" method="post">
            	<input type='hidden' name='db.browser.action' value='prev'/>          
         
              <input class="bluebuttonsmall" type="submit" value="${l10n.DATABASE_BROWSER_PORTLET_LT_LT_PREVIOUS_VM}">
              <input type="hidden" name="start" value="$prev">
            </form>
          </div>
        </td>
      <td width="50">&nbsp; </td>
      #end
      #if ($next)
        <td valign="middle">
          <div align="center">
            <form action="$renderResponse.createActionURL()" method="post">
            	<input type='hidden' name='db.browser.action' value='next'/>          
              <input class="bluebuttonsmall" type="submit" value="${l10n.DATABASE_BROWSER_PORTLET_NEXT_GT_GT_VM}">
              <input type="hidden" name="start" value="$next">
            </form>
          </div>
        </td>
        <td width="50">&nbsp; </td>
      #end
      #if ($tableSize > 0)
        <td valign="middle">
          <div align="center">
            <form action="$renderResponse.createActionURL()" method="post">
            	<input type='hidden' name='db.browser.action' value='refresh'/>
              <input class="bluebuttonsmall" type="submit" name="eventSubmit_doRefresh"
value="${l10n.DATABASE_BROWSER_PORTLET_REFRESH_VM}" />
            </form>
          </div>
        </td>
      #end
    </tr>
  </table>
  
  
  
  1.30      +39 -0     jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/portlet.xml
  
  Index: portlet.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/portlet.xml,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- portlet.xml	3 Dec 2004 02:06:33 -0000	1.29
  +++ portlet.xml	23 Dec 2004 06:27:42 -0000	1.30
  @@ -594,5 +594,44 @@
           </portlet-info>
       </portlet>
   
  +  <portlet>
  +    <description>Database Portlet</description>
  +    <portlet-name>DatabasePortlet</portlet-name>
  +    <display-name>Database Portlet</display-name>
  +    <portlet-class>org.apache.portals.applications.database.DatabaseBrowserPortlet</portlet-class>
  +    <init-param>
  +		<name>ViewPage</name>
  +			<value>/WEB-INF/view/database-view.vm</value>
  +     </init-param>   
  +    <init-param>
  +		<name>EditPage</name>
  +			<value>/WEB-INF/view/edit-prefs.vm</value>
  +     </init-param>   
  +    <init-param>
  +		<name>HelpPage</name>
  +			<value>/WEB-INF/view/database-help.vm</value>
  +     </init-param>   
  +    <expiration-cache>0</expiration-cache>            
  +    <supports>
  +      <mime-type>text/html</mime-type>                
  +      <portlet-mode>VIEW</portlet-mode>                
  +      <portlet-mode>EDIT</portlet-mode>                
  +      <portlet-mode>HELP</portlet-mode>                
  +    </supports>                                
  +    <supported-locale>en</supported-locale>                
  +    <supported-locale>de</supported-locale>            
  +    <resource-bundle>org.apache.portals.applications.database.resources.DatabaseBrowser</resource-bundle>
           
  +    <portlet-preferences>
  +      <preference>                            
  +        <name>windowSize</name>                    
  +        <value>8</value>    
  +      </preference>                               		
  +      <preference>                            
  +        <name>sql</name>                    
  +        <value>select * from SECURITY_PRINCIPAL</value>    
  +      </preference>                               
  +    </portlet-preferences>        
  +  </portlet>
  +
   </portlet-app>
   
  
  
  

---------------------------------------------------------------------
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