FAQ
Author: lofwyr
Date: Tue May 26 13:14:08 2009
New Revision: 778688

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

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

Modified: myfaces/tobago/trunk/example/addressbook/lib/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/addressbook/lib/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java?rev=778688&r1=778687&r2=778688&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/addressbook/lib/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java (original)
+++ myfaces/tobago/trunk/example/addressbook/lib/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java Tue May 26 13:14:08 2009
@@ -26,6 +26,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.myfaces.tobago.component.UIColumn;
+import org.apache.myfaces.tobago.component.UIData;
import org.apache.myfaces.tobago.config.TobagoConfig;
import org.apache.myfaces.tobago.context.ClientProperties;
import org.apache.myfaces.tobago.context.Theme;
@@ -124,7 +125,7 @@
SortActionEvent sortEvent = (SortActionEvent) event;
UIColumn column = (UIColumn) sortEvent.getColumn();

- SheetState sheetState = sortEvent.getSheet().getSheetState(FacesContext.getCurrentInstance());
+ SheetState sheetState = ((UIData)sortEvent.getSheet()).getSheetState(FacesContext.getCurrentInstance());
currentAddressList = addressDao.findAddresses(searchCriterion, column.getId(), sheetState.isAscending());
}
}
@@ -209,6 +210,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/trunk/example/addressbook/lib/src/main/resources/META-INF/resources/addressbook/tab/personal.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/addressbook/lib/src/main/resources/META-INF/resources/addressbook/tab/personal.xhtml?rev=778688&r1=778687&r2=778688&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/addressbook/lib/src/main/resources/META-INF/resources/addressbook/tab/personal.xhtml (original)
+++ myfaces/tobago/trunk/example/addressbook/lib/src/main/resources/META-INF/resources/addressbook/tab/personal.xhtml Tue May 26 13:14:08 2009
@@ -74,11 +74,11 @@
</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"
- top="200px" rendered="#{controller.renderFileUploadPopup}"
+ <tc:popup width="300" height="170" left="200"
+ top="200" rendered="#{controller.renderFileUploadPopup}"
id="popup-fileUpload">
<tc:box label="FileUpload">
<f:facet name="layout">

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categoriesmyfaces
postedMay 26, '09 at 1:14p
activeMay 26, '09 at 1:14p
posts1
users1
websitemyfaces.apache.org

1 user in discussion

Lofwyr: 1 post

People

Translate

site design / logo © 2019 Grokbase