myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1738897 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main: java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/
Date Wed, 13 Apr 2016 07:01:26 GMT
Author: lofwyr
Date: Wed Apr 13 07:01:26 2016
New Revision: 1738897

URL: http://svn.apache.org/viewvc?rev=1738897&view=rev
Log:
TOBAGO-1543 Paradigm: The clientId should be rendered in the local root element in HTML
* fix suggest, because of changed position of the "id"

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-suggest.js

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java?rev=1738897&r1=1738896&r2=1738897&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java
Wed Apr 13 07:01:26 2016
@@ -56,7 +56,8 @@ public class InRenderer extends LabelLay
       LOG.debug("currentValue = '{}'", StringUtils.toConfidentialString(currentValue, password));
     }
     final HtmlInputTypes type = password ? HtmlInputTypes.PASSWORD : HtmlInputTypes.TEXT;
-    final String id = input.getClientId(facesContext);
+    final String clientId = input.getClientId(facesContext);
+    final String fieldId = clientId + ComponentUtils.SUB_SEPARATOR + "field";
     final boolean readonly = input.isReadonly();
     final boolean disabled = input.isDisabled();
     final boolean required = ComponentUtils.getBooleanAttribute(input, Attributes.required);
@@ -65,7 +66,8 @@ public class InRenderer extends LabelLay
 
     writer.startElement(HtmlElements.INPUT);
     writer.writeAttribute(HtmlAttributes.TYPE, type);
-    writer.writeNameAttribute(id);
+    writer.writeNameAttribute(clientId);
+    writer.writeIdAttribute(fieldId);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, input);
     if (currentValue != null) {
       writer.writeAttribute(HtmlAttributes.VALUE, currentValue, true);
@@ -103,7 +105,7 @@ public class InRenderer extends LabelLay
 
     writer.writeClassAttribute(Classes.create(input), BootstrapClass.FORM_CONTROL, input.getCustomClass());
     writer.writeAttribute(HtmlAttributes.REQUIRED, required);
-    HtmlRendererUtils.renderFocus(id, input.isFocus(), ComponentUtils.isError(input), facesContext,
writer);
+    HtmlRendererUtils.renderFocus(clientId, input.isFocus(), ComponentUtils.isError(input),
facesContext, writer);
     writeAdditionalAttributes(facesContext, writer, input);
 
     final String commands = RenderUtils.getBehaviorCommands(facesContext, input);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java?rev=1738897&r1=1738896&r2=1738897&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java
Wed Apr 13 07:01:26 2016
@@ -98,7 +98,8 @@ public class SuggestRenderer extends Ren
     writer.writeNameAttribute(clientId);
     writer.writeAttribute(HtmlAttributes.VALUE, ComponentUtils.getStringAttribute(suggest,
Attributes.value), true);
 
-    writer.writeAttribute(DataAttributes.SUGGEST_FOR, in.getClientId(facesContext), false);
+    writer.writeAttribute(DataAttributes.SUGGEST_FOR,
+        in.getClientId(facesContext) + ComponentUtils.SUB_SEPARATOR + "field", false);
     writer.writeAttribute(DataAttributes.SUGGEST_MIN_CHARS, suggest.getMinimumCharacters());
     writer.writeAttribute(DataAttributes.SUGGEST_DELAY, suggest.getDelay());
     writer.writeAttribute(DataAttributes.SUGGEST_MAX_ITEMS, suggest.getMaximumItems());

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-suggest.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-suggest.js?rev=1738897&r1=1738896&r2=1738897&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-suggest.js
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-suggest.js
Wed Apr 13 07:01:26 2016
@@ -28,7 +28,7 @@ Tobago.Suggest.loadFromServer = function
       var id = suggest.attr("id");
       console.info("query: '" + query + "'");
       Tobago.Updater.update(suggest, id, id, {});
-      //jsf.ajax.request( TODO: need a behavior handling for new AJAX...
+      //jsf.ajax.request( // TODO: need a behavior handling for new AJAX...
       //    id,
       //    null, // todo: event
       //    {



Mime
View raw message