cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a new view

hverrd
Champ in-the-making
Champ in-the-making
Hi,

You have 3 types of views in browse.jsp
is is possible to add a new view?

for example, I want a view, where only the images are been showed like thumbnails.
How to show the images, that's not a problem, but I'm stuck with making a new view.


1. i make a new listItem in the menu
<a:listItem value="images" label="#{msg.view_image}" />


2. I take the properties of the Icon View mode en change it to the Images View mode (in Space and content offcource)
<%– Primary column for images view mode –%>

But now, where should i define my new "images view"?
somewhere in Browsebean? UIRichList?, …?

greetings
8 REPLIES 8

hverrd
Champ in-the-making
Champ in-the-making
I just added a new class in RichListrenderer


public static class ImagesViewRenderer implements IRichListRenderer

Can I call this class somewhere so it will appears in browse.jsp?

greetings

hverrd
Champ in-the-making
Champ in-the-making
I just also updated WebClientConfigTest.java but I'm still get the error

java.lang.IllegalStateException: IRichListRenderer must be available in UIRichList!

gavinc
Champ in-the-making
Champ in-the-making
This error will occur if the rich list can not find the view renderer with the current viewMode, in your case "images".

This means your renderer is not in the list of known renderers, have you defined your custom renderer in the config file?

Default renderers are registered in web-client-config.xml in the section:


<config evaluator="string-compare" condition="Views">
   <!– the views available in the client –>
   <views>
      <view-impl>org.alfresco.web.ui.common.renderer.data.RichListRenderer$DetailsViewRenderer</view-impl>
      <view-impl>org.alfresco.web.ui.common.renderer.data.RichListRenderer$IconViewRenderer</view-impl>
      <view-impl>org.alfresco.web.ui.common.renderer.data.RichListRenderer$ListViewRenderer</view-impl>
      <view-impl>org.alfresco.web.bean.ForumsBean$TopicBubbleViewRenderer</view-impl>


To augment this with your renderer you will need to add the following config to the web-client-config-custom.xml file (see http://wiki.alfresco.com/wiki/Web_Client_Configuration_Guide😞


<config evaluator="string-compare" condition="Views">
   <!– the views available in the client –>
   <views>
      <view-impl>org.alfresco.web.ui.common.renderer.data.RichListRenderer$ImagesViewRenderer</view-impl>
   </views>
</config>

Let me know if that helps.

hverrd
Champ in-the-making
Champ in-the-making
Hi gavinc,

Thank you very mutch
My new view works without any problems now.

greetings

kevinr
Star Contributor
Star Contributor
That's great stuff! Can you post a link to any images of the view so we can see it in action?

Thanks!

Kevin

friedman30
Champ in-the-making
Champ in-the-making
Hi,

I am trying to figure out how to do the exact thing that kevinr have managed to do… with no success yet…

can you be more specific regarding the steps needed for achieving this goal -                  a thumbnail view of my own..

I'll be more specific:
1. where do you add this class to?:
I just added a new class in RichListrenderer

2. what was the update to this class?:
I just also updated WebClientConfigTest.java but I'm still get the error


3. I've tried to follow the steps in this topic, and now i do see my view in the views list, but i get a "MISSING:" string with the name that i gave my view, and when i choose it i get this error:
"java.lang.IllegalStateException: IRichListRenderer must be available in UIRichList!"

4. how do i configure the renderer? :?

thanks!!

Dror

oro13
Champ in-the-making
Champ in-the-making
Hello everybody,

I have the same issue, could anyone help me with this please?
I have create a class which is extending BaseRenderer and add a "view-impl" referencing this new java class in the web-client-config.xml.

Thak you.

maxxer
Champ in-the-making
Champ in-the-making
I need to customize the search results as well.
Did anyone manage to get more detailed instructions on this?

Thanks
maxxer