You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2008/01/15 23:57:38 UTC

svn commit: r612284 - in /myfaces/tobago/branches/tobago-1.0.x: ./ core/src/main/java/org/apache/myfaces/tobago/component/ theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ theme/standard/src/main/resour...

Author: bommel
Date: Tue Jan 15 14:57:37 2008
New Revision: 612284

URL: http://svn.apache.org/viewvc?rev=612284&view=rev
Log:
Merged revisions 612250-612251 via svnmerge from 
https://svn.apache.org/repos/asf/myfaces/tobago/trunk

........
  r612250 | bommel | 2008-01-15 23:21:33 +0100 (Di, 15 Jan 2008) | 1 line
  
  (TOBAGO-596) Duplicate component Id exception with tc:date and tx:date with facelets
........
  r612251 | bommel | 2008-01-15 23:21:55 +0100 (Di, 15 Jan 2008) | 1 line
  
  (TOBAGO-596) Duplicate component Id exception with tc:date and tx:date with facelets
........

Modified:
    myfaces/tobago/branches/tobago-1.0.x/   (props changed)
    myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UIDatePicker.java
    myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java
    myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Propchange: myfaces/tobago/branches/tobago-1.0.x/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jan 15 14:57:37 2008
@@ -1 +1 @@
-/myfaces/tobago/trunk:1-603371,609568-609629
+/myfaces/tobago/trunk:1-603371,609568-609629,612250-612251

Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UIDatePicker.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UIDatePicker.java?rev=612284&r1=612283&r2=612284&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UIDatePicker.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UIDatePicker.java Tue Jan 15 14:57:37 2008
@@ -135,13 +135,15 @@
     UIHiddenInput hidden =
         (UIHiddenInput) ComponentUtil.createComponent(facesContext,
             UIHiddenInput.COMPONENT_TYPE, RENDERER_TYPE_HIDDEN);
+    hidden.setId(facesContext.getViewRoot().createUniqueId());
     link.getChildren().add(hidden);
 
     // create popup
     final UIPopup popup =
         (UIPopup) ComponentUtil.createComponent(facesContext, UIPopup.COMPONENT_TYPE,
             RENDERER_TYPE_POPUP);
-    //popup.setId(link.getId() + "popup");
+
+    popup.setId(facesContext.getViewRoot().createUniqueId());
     link.getFacets().put(FACET_PICKER_POPUP, popup);
 
     popup.setRendered(false);
@@ -234,6 +236,7 @@
     UIGraphic image = (UIGraphic) ComponentUtil.createComponent(
         facesContext, UIGraphic.COMPONENT_TYPE, RENDERER_TYPE_IMAGE);
     image.setRendered(true);
+    image.setId(facesContext.getViewRoot().createUniqueId());
     image.setValue("image/date.gif");
     image.getAttributes().put(ATTR_ALT, ""); //TODO: i18n
     StyleClasses.ensureStyleClasses(image).addFullQualifiedClass("tobago-input-picker"); // XXX not a standard name

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java?rev=612284&r1=612283&r2=612284&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java Tue Jan 15 14:57:37 2008
@@ -70,20 +70,18 @@
         link.setDisabled(dateInput.isReadonly() || dateInput.isDisabled());
       }
     }
-    String idPrefix = dateInput.getId() + "_picker";
     Map<String, Object>  attributes = link.getAttributes();
     link.setActionListener(datePickerController);
     attributes.put(ATTR_LAYOUT_WIDTH, getConfiguredValue(facesContext, component, "pickerWidth"));
     UIComponent hidden = (UIComponent) link.getChildren().get(0);
-    hidden.setId(idPrefix + "Dimension");
+    UIPopup popup = (UIPopup) link.getFacets().get(FACET_PICKER_POPUP);
+
     attributes.put(ATTR_ACTION_ONCLICK, "Tobago.openPickerPopup(event, '"
         + link.getClientId(facesContext) + "', '"
-        + hidden.getClientId(facesContext) + "')");
-
-    UIPopup popup = (UIPopup) link.getFacets().get(FACET_PICKER_POPUP);
+        + hidden.getClientId(facesContext) + "', '"
+        + popup.getClientId(facesContext) +"')");
 
     attributes = popup.getAttributes();
-    popup.setId(idPrefix + "popup");
 
     attributes.put(ATTR_WIDTH, String.valueOf(
            ThemeConfig.getValue(facesContext, link, "CalendarPopupWidth")));
@@ -113,8 +111,6 @@
 
     applyConverterPattern(popup, converterPattern);
 
-    UIComponent image = (UIComponent) link.getChildren().get(1);
-    image.setId(idPrefix + "image");
     if (popup != null) {
       UIPage page = ComponentUtil.findPage(facesContext, link);
       page.getPopups().add(popup);

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=612284&r1=612283&r2=612284&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Tue Jan 15 14:57:37 2008
@@ -510,7 +510,7 @@
   /**
    * Submit the page with specified actionId and position data for popup.
    */
-  openPickerPopup: function(event, actionId, hiddenId) {
+  openPickerPopup: function(event, actionId, hiddenId, popupId) {
     var hidden = this.element(hiddenId);
     if (hidden) {
       // calculate position of command and size of window
@@ -520,8 +520,6 @@
       }
     }
     if (Tobago.Updater.hasTransport()) {
-      var idPrefix = hiddenId.substring(0, hiddenId.indexOf("Dimension"));
-      var popupId = idPrefix + "popup";
       Tobago.openPopupWithAction(popupId, actionId);
     } else {
       this.submitAction(actionId);