portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhardage <bhard...@harding.edu>
Subject Re: Edit Option isn't showing up
Date Wed, 14 Jul 2010 13:37:22 GMT

Thanks for your help Gonzalo. That solved my problem.

I have another question, though, regarding Jetspeed's security
implementation.

First, let me say that I know fairly little about how Jetspeed's security
works, and I'm hoping that there's a simple solution such as adding a
<security-constraint> tag somewhere.

Basically, I have a class that extends the
org.apache.jetspeed.portlets.selector.PortletSelector class (one of the
classes in j2-admin). It overrides the init() function, and calls
PortletSelector's init() on the first line. 

What's happening is PortletSelector is throwing an exception because it
can't find a securityAccessController in the context.

My user-portlet-selector.psml file just has a standard oneColumn fragment in
it, and the definition in the portlet.xml looks like this:

<portlet id="DashboardSelector">
  <init-param>
    <description>This parameter sets the template used in view
mode.</description>
    <name>ViewPage</name>
    <value>/WEB-INF/view/selectors/user-portlet-selector.vm</value>
  </init-param>
  <portlet-name>DashboardSelector</portlet-name>
  <display-name>DashboardSelector</display-name>
  <description>DashboardSelector</description>
 
<portlet-class>org.fake.portletSelector.DashboardPortletSelector</portlet-class>
  <expiration-cache>-1</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>
  <portlet-preferences>
    <preference>
      <name>WindowSize</name>
      <value>100</value>
    </preference>
    <preference>
      <name>parallel</name>
      <value>true</value>
      <read-only>true</read-only>
    </preference>
  </portlet-preferences>
</portlet>

I guess the real problem is that I don't really know what a
securityAccessController is.

Any help would be much appreciated.

Thanks,
B.J.


Gonzalo Aguilar Delgado-4 wrote:
> 
> Hi bhardage, 
> 
> You will have to log in as admin... After that it should show up.
> 
> 
> The rest seems to be right...
> 
> 
> 
> 
> 
> 
> 
> ____________________________________
> 
> 
> 
> 
>   Gonzalo Aguilar Delgado
>   Consultor CRM - Ingeniero en
> Informática
>         M. +34 607814276
> 
> 
> 
> 
> 
> 
> 
> 
> 
> El vie, 25-06-2010 a las 06:53 -0700, bhardage escribió:
>> Hello,
>> 
>> I'm fairly new to Jetspeed and I'm having some problems getting
>> everything
>> to work correctly. I'll list off what I consider to be the relevant code
>> snippets for reference and then explain the problem.
>> 
>> Portlet.xml snippet:
>> 
>> <portlet-app id="Fake" version="1.0">
>> 	<portlet id="MyPortletID">
>> 		<portlet-name>MyPortletName</portlet-name>
>> 		<display-name>My Portlet Name</display-name>
>> 		<description>My Portlet Description</description>
>> 		<portlet-class>org.fake.MyClass</portlet-class>
>> 		<expiration-cache>-1</expiration-cache>
>> 		<supports>
>> 			<mime-type>text/html</mime-type>
>> 			<portlet-mode>EDIT</portlet-mode>
>> 			<portlet-mode>VIEW</portlet-mode>
>> 			<portlet-mode>HELP</portlet-mode>
>> 		</supports>
>> 		<supported-locale>en</supported-locale>
>> 		<portlet-info>
>> 			<title>My Portlet Title</title>
>> 			<short-title>My Portlet Title</short-title>
>> 			<keywords>My Portlet Title</keywords>
>> 		</portlet-info>
>> 	</portlet>
>> </portlet-app>
>> 
>> PSML Snippet:
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <page id="/administrator/MyPortlet.psml" hidden="false">
>> 	<title>MyPortletPage</title>
>> 	<short-title>MyPortletPage</short-title>
>> 	<defaults skin="orange" layout-decorator="pagelayout"
>> portlet-decorator="portletlayout"/>
>> 	<fragment id="0685683554585891"
>> 	          type="layout"
>> 	          name="jetspeed-layouts::VelocityOneColumn">
>> 		<fragment id="04487633864220224"
>> 		          type="portlet"
>> 		          name="Fake::MyPortletID">
>> 			<property name="row" value="0"/>
>> 		</fragment>
>> 	</fragment>
>> </page>
>> 
>> Snippet from decorations/portlet/portletlayout/decorator.vm:
>> 
>> #set($decoration = $f.decoration)
>> #set($actions = $decoration.actions)
>> 
>> <!-- Begin: Fragment: ${f.id} Decoration: ${decoratorId} -->
>> <table width="100%">
>>   <tr>
>>     <td>
>>       <div id="${f.id}" class="portletlayout">
>>         <div class="PTitle">
>>         #if( $!jetspeed.getTitle($jetspeed.getPortletEntity($f),
>> $f).length() <= 40)
>>           <div class="PTitleContent">
>>             $!jetspeed.getTitle($jetspeed.getPortletEntity($f), $f)
>>           </div>
>>         #else
>>           #if( $!jetspeed.getTitle($jetspeed.getPortletEntity($f),
>> $f).length() > 40)
>>     	    #set($header1 =
>> $!jetspeed.getTitle($jetspeed.getPortletEntity($f),
>> $f).substring(0,40))
>>     	    #set($header2 =
>> $!jetspeed.getTitle($jetspeed.getPortletEntity($f),
>> $f).substring(40, $!jetspeed.getTitle($jetspeed.getPortletEntity($f),
>> $f).length()))
>>           <div class="PTitleContent">
>>             $header1 </br> $header2
>>           </div>
>>           #end
>>         #end
>>         #PortletActionBar($decoration)  ##<-- NOTICE THIS LINE
>>         </div>
>> 
>>         #if (!$jetspeed.isHidden($f) || $jetspeed.WindowState !=
>> "minimized")
>>         <div class="PContent">
>>           &nbsp;
>>           $f.renderedContent
>>         </div>
>>         #end
>>       </div>
>>     </td>
>>   </tr>
>> </table>
>> <br/>
>> <!-- END: Fragment: ${f.id} Decoration: ${decoratorId} -->
>> 
>> Definition of PortletActionBar:
>> 
>> #macro(PortletActionBar $_decoration)
>>   #set($_actions = $_decoration.actions)
>>   
>>   <div class="PActionBar">
>>     #foreach ($_action in $_actions)
>>       < a href="${_action.Action}"
>>          title="${_action.Name}"
>>          class="action portlet-action"
>>          #if($_action.target)
>>            target="$_action.target"
>>          #end
>>       >
>>         < img src="$request.contextPath/${_action.link}"
>> alt="${_action.Alt}" border="0" />
>>        
>>     #end    
>>   </div>
>> #end
>> 
>> Alright, so my problem is that when I load the page, the portlets don't
>> have
>> an edit icon.
>> 
>> I've put a "<portlet-mode>EDIT</portlet-mode>" statement in the
>> portlet.xml,
>> and org.Fake.MyClass extends GenericPortlet and overrides the doEdit
>> function. All the PortletActionBar macro does is print out all the
>> portlets
>> actions. However, the edit action isn't showing up, and I don't know why.
>> 
>> I'm using Jetspeed 2.1.3. (Also, this is part of an upgrade process from
>> 2.0
>> to 2.1.3)
>> 
>> Any help or advice would be much appreciated.
>> 
>> Thanks,
>> B.J.
>> -- 
>> View this message in context:
>> http://old.nabble.com/Edit-Option-isn%27t-showing-up-tp28992555p28992555.html
>> Sent from the Jetspeed - Dev mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Edit-Option-isn%27t-showing-up-tp28992555p29162087.html
Sent from the Jetspeed - Dev mailing list archive at Nabble.com.


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


Mime
View raw message