Author: amarkhel
Date: 2009-03-11 12:37:33 -0400 (Wed, 11 Mar 2009)
New Revision: 12924
Removed:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/utils/
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/Upload/Noname/26/Thumbs.db
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/Upload/Viking/15/Thumbs.db
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/Upload/amarkhel/20/Thumbs.db
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/Upload/amarkhel/23/Thumbs.db
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/Upload/amarkhel/25/Thumbs.db
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchByAlbumTemplate.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchByImageTemplate.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/whatNew.xhtml
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/SearchAction.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/NavigationEnum.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByAlbum.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByImage.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByTag.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByUser.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/search.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/imageResult.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/tagsResult.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/userResult.xhtml
Log:
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/SearchAction.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/SearchAction.java 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/SearchAction.java 2009-03-11
16:37:33 UTC (rev 12924)
@@ -24,15 +24,19 @@
private User user;
public List<Image> searchByAlbum(String searchQuery, boolean searchInMyAlbums,
boolean searchInShared) {
- StringBuilder b = new StringBuilder("from Album a where a.name=:name and
a.shelf.shared=:shared");
+ StringBuilder b = new StringBuilder("from Album a where lower(a.name) like :name
or lower(a.description) like :name");
if (searchInMyAlbums) {
b.append(" and a.owner.login=:login");
}
+ if(searchInShared){
+ b.append(" and a.shelf.shared=:shared");
+ }
Query query = em.createQuery(b.toString());
- query.setParameter("name", searchQuery);
- query.setParameter("shared", searchInShared);
-
+ query.setParameter("name", "%" + searchQuery.toLowerCase() +
"%");
+ if(searchInShared){
+ query.setParameter("shared", searchInShared);
+ }
if (searchInMyAlbums) {
query.setParameter("login", user.getLogin());
}
@@ -40,15 +44,21 @@
}
public List<Image> searchByImage(String searchQuery, boolean searchInMyAlbums,
boolean searchInShared) {
- StringBuilder b = new StringBuilder("from Image i where i.name=:name and
i.album.shelf.shared=:shared");
+ StringBuilder b = new StringBuilder("from Image i where lower(i.name) like :name
or lower(i.description) like :name or lower(i.cameraModel) like :name");
if (searchInMyAlbums) {
b.append(" and i.album.owner.login=:login");
}
+ if(searchInShared){
+ b.append(" and i.album.shelf.shared=:shared");
+ }
Query query = em.createQuery(b.toString());
- query.setParameter("name", searchQuery);
- query.setParameter("shared", searchInShared);
+ query.setParameter("name", "%" + searchQuery.toLowerCase() +
"%");
+ if(searchInShared){
+ query.setParameter("shared", searchInShared);
+ }
+
if (searchInMyAlbums) {
query.setParameter("login", user.getLogin());
}
@@ -56,22 +66,19 @@
}
public List<Image> searchByUsers(String searchQuery, boolean searchInMyAlbums,
boolean searchInShared) {
- StringBuilder b = new StringBuilder("select distinct u from User u, Album a where
u.login=:name");
- if (searchInShared) {
- b.append(" and a.owner=u and a.shelf.shared=true");
- }
+ StringBuilder b = new StringBuilder("select u from User u where lower(u.login)
like :name or lower(u.firstName) like :name or lower(u.secondName) like :name");
Query query = em.createQuery(b.toString());
- query.setParameter("name", searchQuery);
+ query.setParameter("name", "%" + searchQuery.toLowerCase() +
"%");
return query.getResultList();
}
public List<Image> searchByTags(String searchQuery, boolean searchInMyAlbums,
boolean searchInShared) {
- StringBuilder b = new StringBuilder("from MetaTag t where t.tag=:name");
+ StringBuilder b = new StringBuilder("from MetaTag t where lower(t.tag) like
:name");
Query query = em.createQuery(b.toString());
- query.setParameter("name", searchQuery);
+ query.setParameter("name", "%" + searchQuery.toLowerCase() +
"%");
return query.getResultList();
}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-03-11
16:37:33 UTC (rev 12924)
@@ -36,6 +36,7 @@
import org.richfaces.component.UIDatascroller;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.MetaTag;
import org.richfaces.realworld.domain.Shelf;
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.service.Constants;
@@ -161,6 +162,11 @@
model.setSelectedUser(user);
}
+ public void showTag(MetaTag metatag){
+ model.setMainArea(NavigationEnum.TAGS);
+ model.setSelectedTag(metatag);
+ }
+
private void updateDataScroller(Integer index, String dataScrollerId) {
UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
UIDatascroller scroller = (UIDatascroller)component.findComponent(dataScrollerId);
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/NavigationEnum.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/NavigationEnum.java 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/NavigationEnum.java 2009-03-11
16:37:33 UTC (rev 12924)
@@ -26,7 +26,6 @@
FILE_UPLOAD("includes/fileUpload.xhtml"),
USER_PREFS("includes/userPrefs.xhtml"),
SEARCH("includes/search.xhtml"),
- WHAT_NEW("includes/recent.xhtml"),
ALBUM_PREVIEW("includes/userAlbum.xhtml"),
ALBUM_IMAGE_PREVIEW("/includes/userImage.xhtml"),
SHELF_PREVIEW("/includes/userShelf.xhtml"),
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-03-11
16:37:33 UTC (rev 12924)
@@ -10,6 +10,7 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.Events;
@@ -30,7 +31,7 @@
ISearchOption selectedOption;
List<ISearchOption> options;
-
+ private boolean searchSuccess;
String selectedTab;
String searchQuery;
@@ -50,6 +51,7 @@
public void search() {
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT, NavigationEnum.SEARCH);
Iterator<ISearchOption> it = options.iterator();
+ setSearchSuccess(false);
while (it.hasNext()) {
ISearchOption option = it.next();
if (option.getSelected()) {
@@ -74,13 +76,9 @@
}
}
}
-
- public void back() {
- Iterator<ISearchOption> it = options.iterator();
- while (it.hasNext()) {
- it.next().setSelected(false);
- }
- selectedOption = null;
+ @Observer("searchSuccess")
+ public void setSearchSuccess(){
+ setSearchSuccess(true);
}
@Out
@@ -105,14 +103,6 @@
this.options = options;
}
- public String getSelectedTab() {
- return selectedTab;
- }
-
- public void setSelectedTab(String selectedTab) {
- this.selectedTab = selectedTab;
- }
-
public String getSearchQuery() {
return searchQuery;
}
@@ -136,5 +126,13 @@
public void setSearchInShared(boolean searchInShared) {
this.searchInShared = searchInShared;
}
+
+ public boolean isSearchSuccess() {
+ return searchSuccess;
+ }
+
+ public void setSearchSuccess(boolean searchSuccess) {
+ this.searchSuccess = searchSuccess;
+ }
}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByAlbum.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByAlbum.java 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByAlbum.java 2009-03-11
16:37:33 UTC (rev 12924)
@@ -1,8 +1,11 @@
package org.richfaces.realworld.search;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
+import org.jboss.seam.core.Events;
+import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.service.ISearchAction;
@@ -23,7 +26,11 @@
@Override
public void search(ISearchAction action, String q, boolean searchInMyAlbums, boolean
searchInShared) {
- setSearchResult(action.searchByAlbum(q, searchInMyAlbums, searchInShared));
+ List<Image> searchByAlbum = action.searchByAlbum(q, searchInMyAlbums,
searchInShared);
+ if(searchByAlbum.size() > 0){
+ Events.instance().raiseEvent("searchSuccess");
+ }
+ setSearchResult(searchByAlbum);
}
@Override
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByImage.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByImage.java 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByImage.java 2009-03-11
16:37:33 UTC (rev 12924)
@@ -5,9 +5,12 @@
import java.util.Date;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.jboss.seam.annotations.In;
+import org.jboss.seam.core.Events;
+import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.service.ISearchAction;
/**
@@ -32,7 +35,11 @@
@Override
public void search(ISearchAction action, String q, boolean searchInMyAlbums, boolean
searchInShared) {
- setSearchResult(action.searchByImage(q, searchInMyAlbums, searchInShared));
+ List<Image> searchByImage = action.searchByImage(q, searchInMyAlbums,
searchInShared);
+ if(searchByImage.size() > 0){
+ Events.instance().raiseEvent("searchSuccess");
+ }
+ setSearchResult(searchByImage);
}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByTag.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByTag.java 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByTag.java 2009-03-11
16:37:33 UTC (rev 12924)
@@ -3,6 +3,10 @@
*/
package org.richfaces.realworld.search;
+import java.util.List;
+
+import org.jboss.seam.core.Events;
+import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.service.ISearchAction;
/**
@@ -50,7 +54,11 @@
@Override
public void search(ISearchAction action, String searchQuery,
boolean searchInMyAlbums, boolean searchInShared) {
- setSearchResult(action.searchByTags(searchQuery, searchInMyAlbums, searchInShared));
+ List<Image> searchByTags = action.searchByTags(searchQuery, searchInMyAlbums,
searchInShared);
+ if(searchByTags.size() > 0){
+ Events.instance().raiseEvent("searchSuccess");
+ }
+ setSearchResult(searchByTags);
}
}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByUser.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByUser.java 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByUser.java 2009-03-11
16:37:33 UTC (rev 12924)
@@ -3,6 +3,10 @@
*/
package org.richfaces.realworld.search;
+import java.util.List;
+
+import org.jboss.seam.core.Events;
+import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.service.ISearchAction;
/**
@@ -48,7 +52,11 @@
*/
@Override
public void search(ISearchAction action, String q, boolean searchInMyAlbums, boolean
searchInShared) {
- setSearchResult(action.searchByUsers(q, searchInMyAlbums, searchInShared));
+ List<Image> searchByUsers = action.searchByUsers(q, searchInMyAlbums,
searchInShared);
+ if(searchByUsers.size() > 0){
+ Events.instance().raiseEvent("searchSuccess");
+ }
+ setSearchResult(searchByUsers);
}
Deleted:
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/Upload/Noname/26/Thumbs.db
===================================================================
(Binary files differ)
Deleted:
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/Upload/Viking/15/Thumbs.db
===================================================================
(Binary files differ)
Deleted:
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/Upload/amarkhel/20/Thumbs.db
===================================================================
(Binary files differ)
Deleted:
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/Upload/amarkhel/23/Thumbs.db
===================================================================
(Binary files differ)
Deleted:
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/Upload/amarkhel/25/Thumbs.db
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml 2009-03-11
16:37:33 UTC (rev 12924)
@@ -4,25 +4,40 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <rich:dataGrid id="album"
- value="#{result}"
- columns="5" style="width:500px;" var="album"
border="0">
-
- <h:panelGrid id="grid" columns="1">
- <h:panelGroup id="group">
- <a4j:commandLink
- action="#{model.setMainArea(navigationHelper.navigationEnumImagePreview)}"
- actionListener="#{model.setSelectedAlbum(album)}"
- reRender="mainArea, tree">
- <h:graphicImage
- style="width:100px;height:100px" id="image"
value="/img/folder.jpg" />
- </a4j:commandLink>
- </h:panelGroup>
- <a4j:commandLink
- action="#{model.setMainArea(navigationHelper.navigationEnumImagePreview)}"
- actionListener="#{model.setSelectedAlbum(album)}"
- reRender="mainArea, tree" value="#{album.name}">
- </a4j:commandLink>
- </h:panelGrid>
- </rich:dataGrid>
+ <a4j:repeat id="albumsList" value="#{result}"
var="album" >
+ <h:panelGroup layout="block"
styleClass="preview_box_album_120">
+ <h:graphicImage styleClass="pr_album_bg"
value="/img/shell/frame_album_200.png" />
+ <h:panelGrid cellpadding="0">
+ <h:panelGroup>
+ <a4j:commandLink
+ rendered="#{controller.isAccessToAlbumGranted(album)}"
+ actionListener="#{controller.showAlbum(album)}"
+ reRender="mainArea, tree">
+ <a4j:mediaOutput rendered="#{!album.isEmpty()}" id="img"
element="img"
+ createContent="#{imageLoader.paintImage}"
+ styleClass="album-cover-image"
+ style="#{richx:rectangle(album.lastImage.width, album.lastImage.height,
120)}"
+ value="#{fileManager.transformPath(album.lastImage.path,
'_mini')}">
+ </a4j:mediaOutput>
+ <h:graphicImage rendered="#{album.isEmpty()}"
+ style="width:80px; height:80px;"
+ value="img/shell/frame_album_200.png"
+ styleClass="album-cover-image">
+ </h:graphicImage>
+ <rich:toolTip followMouse="true" direction="top-right"
+ showDelay="500" styleClass="tooltip">
+ <span style="white-space: nowrap"> #{album.name} </span>
+ </rich:toolTip>
+ </a4j:commandLink>
+ <br/>
+ </h:panelGroup>
+ </h:panelGrid>
+ <h:panelGroup layout="block"
styleClass="album_name">#{album.name}</h:panelGroup>
+ <h:panelGroup layout="block" styleClass="album_data">
+ <h:outputText value="#{album.created}">
+ <f:convertDateTime />
+ </h:outputText>
+ </h:panelGroup>
+ </h:panelGroup>
+ </a4j:repeat>
</ui:composition>
\ No newline at end of file
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/imageResult.xhtml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/imageResult.xhtml 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/imageResult.xhtml 2009-03-11
16:37:33 UTC (rev 12924)
@@ -4,33 +4,30 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- hhh
- <a4j:repeat id="previewList" value="#{result}"
var="item">
- <table cellpadding="0" cellspacing="0" border="0"
width="170" height="170" style="float: left; margin: 0px 10px
10px 0px;" >
- <tr>
- <td style="text-align: center;vertical-align: middle; background:
white;border: 1px solid #909090">
+ <a4j:repeat value="#{result}" var="image">
+ <h:panelGroup layout="block"
styleClass="preview_box_photo_120">
+ <h:graphicImage styleClass="pr_photo_bg"
value="/img/shell/frame_photo_200.png" />
+ <h:panelGrid cellpadding="0">
+ <h:panelGroup>
<a4j:commandLink
- actionListener="#{controller.showImage(item)}"
- reRender="mainArea">
- <a4j:mediaOutput element="img"
createContent="#{imageLoader.paintImage}"
- styleClass="all-images"
- value="#{fileManager.transformPath(item.path, '_mini')}">
- <rich:dragSupport rendered="#{controller.isUserAlbum(item.album)}"
- dragIndicator="dragIndicator" dragType="image"
dragValue="#{item}"
- reRender=" mainArea">
- <rich:dndParam name="label" value="#{item.name}" />
- </rich:dragSupport>
- <ui:include src="/includes/contextMenu/CMForImage.xhtml" >
- <ui:param name="CMImage" value="#{item}" />
- </ui:include>
- <rich:toolTip followMouse="true" direction="top-right"
- showDelay="500" styleClass="tooltip">
- <span style="white-space: nowrap"> #{item.description}
</span>
- </rich:toolTip>
- </a4j:mediaOutput>
+ actionListener="#{controller.showImage(image)}"
+ reRender="mainArea, tree">
+ <a4j:mediaOutput id="img" element="img"
+ createContent="#{imageLoader.paintImage}"
+ style="border : 2px solid #FFFFFF; #{richx:rectangle(image.width,
image.height, imageSizeHelper.currentDimension.x)};"
+ value="#{fileManager.transformPath(image.path,
imageSizeHelper.currentDimension.filePostfix)}">
+ <f:param value="#{imageSizeHelper.currentDimension.x}"
name="x" />
+ </a4j:mediaOutput>
</a4j:commandLink>
- </td>
- </tr>
- </table>
+ <br/>
+ </h:panelGroup>
+ </h:panelGrid>
+ <h:panelGroup layout="block"
styleClass="photo_name">#{image.name}</h:panelGroup>
+ <h:panelGroup layout="block" styleClass="photo_data">
+ <h:outputText value="#{image.created}">
+ <f:convertDateTime />
+ </h:outputText>
+ </h:panelGroup>
+ </h:panelGroup>
</a4j:repeat>
</ui:composition>
\ No newline at end of file
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/tagsResult.xhtml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/tagsResult.xhtml 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/tagsResult.xhtml 2009-03-11
16:37:33 UTC (rev 12924)
@@ -4,7 +4,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <a4j:repeat id="previewList" value="#{result}"
var="tag">
- <h:outputText value="#{tag.tag}"></h:outputText><br/>
+ <a4j:repeat id="tagList" value="#{result}"
var="tag">
+ <a4j:commandLink reRender="mainArea"
actionListener="#{controller.showTag(tag)}"
value="#{tag.tag}"></a4j:commandLink><br/>
</a4j:repeat>
</ui:composition>
\ No newline at end of file
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/userResult.xhtml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/userResult.xhtml 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/userResult.xhtml 2009-03-11
16:37:33 UTC (rev 12924)
@@ -4,9 +4,10 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <a4j:repeat id="previewList" value="#{result}"
var="user">
- <div>
- <img src="" width="50" height="50"
/><h:outputText value="#{user.firstName}"></h:outputText>
- </div>
+ <a4j:repeat id="userList" value="#{result}"
var="user">
+ <a4j:mediaOutput rendered="#{user.hasAvatar}"
element="img" createContent="#{imageLoader.paintImage}"
+ styleClass="avatar"
+ value="/#{user.login}/avatar.jpg" />
+ <a4j:commandLink reRender="mainArea"
actionListener="#{controller.showUser(user)}"
value="#{user.login}"></a4j:commandLink><br/>
</a4j:repeat>
</ui:composition>
\ No newline at end of file
Deleted:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchByAlbumTemplate.xhtml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchByAlbumTemplate.xhtml 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchByAlbumTemplate.xhtml 2009-03-11
16:37:33 UTC (rev 12924)
@@ -1,20 +0,0 @@
-<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich">
-
- <h:panelGrid columns="2">
- <h:outputText value="Name"></h:outputText>
- <h:inputText
value="#{searchImageHelper.selectedOption.params['name']}" />
- <h:outputText value="Description"></h:outputText>
- <h:inputText
value="#{searchImageHelper.selectedOption.params['description']}"></h:inputText>
- <h:outputText value="Owner Name"></h:outputText>
- <h:inputText
value="#{searchImageHelper.selectedOption.params['owner.login']}" />
- <h:outputText value="Shared"></h:outputText>
- <h:selectBooleanCheckbox
value="#{searchImageHelper.selectedOption.params['shared']}"></h:selectBooleanCheckbox>
- </h:panelGrid>
-
-
-</ui:composition>
\ No newline at end of file
Deleted:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchByImageTemplate.xhtml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchByImageTemplate.xhtml 2009-03-11
15:23:52 UTC (rev 12923)
+++
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchByImageTemplate.xhtml 2009-03-11
16:37:33 UTC (rev 12924)
@@ -1,27 +0,0 @@
-<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich">
-
- <h:panelGrid columns="2">
- <h:outputText value="Name"></h:outputText>
- <h:inputText
value="#{searchImageHelper.selectedOption.params['name']}" />
- <h:outputText value="Description"></h:outputText>
- <h:inputText
value="#{searchImageHelper.selectedOption.params['description']}" />
- <h:outputText value="Path"></h:outputText>
- <h:inputText
value="#{searchImageHelper.selectedOption.params['path']}" />
- <h:outputText value="Size"></h:outputText>
- <h:inputText
value="#{searchImageHelper.selectedOption.params['size']}"
converter="javax.faces.Integer" />
- <h:outputText value="Width"></h:outputText>
- <h:inputText
value="#{searchImageHelper.selectedOption.params['width']}"
converter="javax.faces.Integer" />
- <h:outputText value="Height"></h:outputText>
- <h:inputText
value="#{searchImageHelper.selectedOption.params['height']}"
converter="javax.faces.Integer"/>
- <h:outputText value="Uploaded Date"></h:outputText>
- <rich:calendar
value="#{searchImageHelper.selectedOption.params['uploaded']}" />
- <h:outputText value="Created Date"></h:outputText>
- <rich:calendar
value="#{searchImageHelper.selectedOption.params['created']}" />
-
- </h:panelGrid>
-</ui:composition>
\ No newline at end of file
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/search.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld2/web/src/main/webapp/includes/whatNew.xhtml
===================================================================
(Binary files differ)