You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2009/05/26 16:05:41 UTC

svn commit: r778708 - in /myfaces/tobago/branches/tobago-1.0.x/example/addressbook/lib/src/main: java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java resources/META-INF/resources/addressbook/tab/personal.xhtml

Author: lofwyr
Date: Tue May 26 14:05:40 2009
New Revision: 778708

URL: http://svn.apache.org/viewvc?rev=778708&view=rev
Log:
Failed commit: Default

Modified:
    myfaces/tobago/branches/tobago-1.0.x/example/addressbook/lib/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java
    myfaces/tobago/branches/tobago-1.0.x/example/addressbook/lib/src/main/resources/META-INF/resources/addressbook/tab/personal.xhtml

Modified: myfaces/tobago/branches/tobago-1.0.x/example/addressbook/lib/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/addressbook/lib/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java?rev=778708&r1=778707&r2=778708&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/addressbook/lib/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/addressbook/lib/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java Tue May 26 14:05:40 2009
@@ -209,6 +209,13 @@
     return null;
   }
 
+  public String getCurrentAddressPictureUrl() {
+     return (currentAddress != null && currentAddress.getPicture() != null)
+         ? FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath() + "/faces/picture?id=XXXX"
+         :"image/empty-portrait.png";
+
+   }
+
   public void validatePhoneNumber(
       FacesContext context, UIComponent component, Object value) {
     String phoneNumber = (String) value;

Modified: myfaces/tobago/branches/tobago-1.0.x/example/addressbook/lib/src/main/resources/META-INF/resources/addressbook/tab/personal.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/addressbook/lib/src/main/resources/META-INF/resources/addressbook/tab/personal.xhtml?rev=778708&r1=778707&r2=778708&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/addressbook/lib/src/main/resources/META-INF/resources/addressbook/tab/personal.xhtml (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/addressbook/lib/src/main/resources/META-INF/resources/addressbook/tab/personal.xhtml Tue May 26 14:05:40 2009
@@ -74,7 +74,7 @@
         </f:facet>
         <tc:form>
           <tc:button
-              image="#{controller.currentAddress.picture != null?'${pageContext.request.contextPath}/faces/picture?id=XXXX':'image/empty-portrait.png'}"
+              image="#{controller.currentAddressPictureUrl}"
               action="#{controller.popupFileUpload}">
             <f:facet name="popup">
               <tc:popup width="300px" height="170px" left="200px"