[jira] Commented: (COCOON-1825) [PATCH] Ajax error when an active state widget become invisible state widget

2006-10-15 Thread vincent Demay (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1825?page=comments#action_12442413 
] 

vincent Demay commented on COCOON-1825:
---

I think this simple patch could resolve the issue :

Index: C:/Program 
Files/Eclipse3.01/workspace/forms/resources/org/apache/cocoon/forms/resources/forms-field-styling.xsl
===
--- C:/Program 
Files/Eclipse3.01/workspace/forms/resources/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(revision 464244)
+++ C:/Program 
Files/Eclipse3.01/workspace/forms/resources/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(working copy)
@@ -730,14 +730,18 @@
   | fi:struct - has no visual representation by default
   +--
   xsl:template match=fi:struct
-xsl:apply-templates/
+   div id=[EMAIL PROTECTED]
+   xsl:apply-templates/
+/div
   /xsl:template
 
   !--+
   | fi:group - has no visual representation by default
   +--
   xsl:template match=fi:group
-xsl:apply-templates/
+div id=[EMAIL PROTECTED]
+   xsl:apply-templates/
+   /div
   /xsl:template
 
   xsl:template match=@*|node() priority=-1


 [PATCH] Ajax error when an active state widget become invisible state widget
 

 Key: COCOON-1825
 URL: http://issues.apache.org/jira/browse/COCOON-1825
 Project: Cocoon
  Issue Type: Bug
  Components: Blocks: Forms
Affects Versions: 2.1.9
Reporter: vincent Demay
 Assigned To: Antonio Gallardo

 Some widget (field with selection-list and styling=radio, group, etc...)  can 
 not be hidden (state=invisible)in ajax mode.
 I declare some widgets without state attribute in the form definition, my 
 form is in ajax mode, when I set the widget state to INVISIBLE, the ajax 
 response can not be applied to the form because span 
 id=widget-name.../span is not available in source code.
 I think about 2 patches : 
 *putting a span/span in forms-field-styling.xsl where is not set
 *or modifing abstractWidgetDefinition.java in ordre to generate a placeholder 
 around each widget (but patch seems to need a lot of modification in 
 forms-field-styling.xsl too)
 Here is the patch for first 
 --- forms-field-styling.orig  2006-04-13 15:37:06.590221200 +0200
 +++ forms-field-styling.xsl   2006-04-13 15:38:22.525291200 +0200
 @@ -198,8 +198,9 @@
  xsl:variable name=value select=fi:value/
  xsl:variable name=vertical 
 select=string(fi:styling/@list-orientation) != 'horizontal'/
  xsl:choose
 -  xsl:when test=$vertical
 -table id={$id} cellpadding=0 cellspacing=0 border=0 
 title={fi:hint}
 +  xsl:when test=$vertical
 +   span id={$id}
 +  table id={$id} cellpadding=0 cellspacing=0 border=0 
 title={fi:hint}
xsl:for-each select=fi:selection-list/fi:item
  xsl:variable name=item-id select=concat($id, ':', 
 position())/
  tr
 @@ -224,6 +225,7 @@
  /tr
/xsl:for-each
  /table
 +/span
/xsl:when
xsl:otherwise
  span id={$id} title={fi:hint}
 @@ -682,22 +684,24 @@
| know where to insert the widget if it becomes visible
+--
xsl:template match=fi:placeholder
 -span id=[EMAIL PROTECTED]/
 +span id=[EMAIL PROTECTED]xsl:apply-templates//span
/xsl:template

!--+
| fi:struct - has no visual representation by default
+--
xsl:template match=fi:struct
 -xsl:apply-templates/
 + span id=[EMAIL PROTECTED]xsl:apply-templates//span
/xsl:template
  
!--+
| fi:group - has no visual representation by default
+--
xsl:template match=fi:group
 -xsl:apply-templates/
 +span id=[EMAIL PROTECTED]xsl:apply-templates//span
/xsl:template
 +  
 +  
  
xsl:template match=@*|node() priority=-1
  xsl:copy
 Here for the second
 --- AbstractWidget.orig   2006-04-13 15:31:07.851701200 +0200
 +++ AbstractWidget.java   2006-04-13 15:30:31.446616200 +0200
 @@ -483,6 +483,10 @@
  public void generateSaxFragment(ContentHandler contentHandler, Locale 
 locale)
  throws SAXException {
  
 + AttributesImpl placeHolderAttrs = new AttributesImpl();
 + placeHolderAttrs.addCDATAAttribute(id, getRequestParameterName());
 +contentHandler.startElement(FormsConstants.INSTANCE_NS, 
 placeholder, FormsConstants.INSTANCE_PREFIX_COLON + placeholder, 
 placeHolderAttrs);
 +
  if (getCombinedState().isDisplayingValues()) {
  // FIXME: we may want to strip out completely widgets that 
 aren't updated when in AJAX mode
  String element = this.getXMLElementName();
 @@ -497,15 +501,9 @@
  
  generateItemSaxFragment(contentHandler, locale);
  
 -

[jira] Commented: (COCOON-1858) [PATCH]on-value-change does not work on suggestion list

2006-06-20 Thread vincent Demay (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1858?page=comments#action_12416858 
] 

vincent Demay commented on COCOON-1858:
---

Dojo ComboBox widget does not support additional event so if we can not 
customize Dojo sources I don't know how we can fix this bug for the moment

I will try to looking for another fix when I will have some free time...

 [PATCH]on-value-change does not work on suggestion list
 ---

  Key: COCOON-1858
  URL: http://issues.apache.org/jira/browse/COCOON-1858
  Project: Cocoon
 Type: Bug

   Components: Blocks: Forms
 Versions: 2.1.9
 Reporter: vincent Demay
  Attachments: ComboBox.js, ComboBox.js

 on-value-change does not work on suggestion list : there are to issues : 
 1 - submit on change is not setted on the widget in 
 form-advanced-field-styling.xsl : 
  Here is the patch : 
 --- sample/forms-advanced-field-styling.xsl 2006-06-07 14:51:27.809216500 
 +0
 200
 +++ sample/forms-advanced-field-styling.new.xsl 2006-06-07 14:52:04.293358000 
 +0
 200
 @@ -272,6 +272,7 @@
xsl:template match=fi:field[fi:styling/@type='suggest' and 
 @state='active']
  span id=[EMAIL PROTECTED]
input name=[EMAIL PROTECTED] id=[EMAIL PROTECTED]:input 
 value={fi:value} dojoType=CFormsSuggest
 +xsl:apply-templates select=. mode=styling/
  xsl:if test=fi:suggestion
xsl:attribute name=suggestionxsl:value-of 
 select=fi:suggestion//xsl:attribute
  /xsl:if
 2 - dojo Widget does not support onchange (see bug : 
 http://trac.dojotoolkit.org/ticket/897)
 So I change the dojo file src/widget/html/ComboBox.js
 The new file is in Attachement (and patch in dojo tracker)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (COCOON-1858) [PATCH]on-value-change does not work on suggestion list

2006-06-07 Thread vincent Demay (JIRA)
[PATCH]on-value-change does not work on suggestion list
---

 Key: COCOON-1858
 URL: http://issues.apache.org/jira/browse/COCOON-1858
 Project: Cocoon
Type: Bug

  Components: Blocks: Forms  
Versions: 2.1.9
Reporter: vincent Demay
 Attachments: ComboBox.js

on-value-change does not work on suggestion list : there are to issues : 
1 - submit on change is not setted on the widget in 
form-advanced-field-styling.xsl : 
 Here is the patch : 
--- sample/forms-advanced-field-styling.xsl 2006-06-07 14:51:27.809216500 +0
200
+++ sample/forms-advanced-field-styling.new.xsl 2006-06-07 14:52:04.293358000 +0
200
@@ -272,6 +272,7 @@
   xsl:template match=fi:field[fi:styling/@type='suggest' and 
@state='active']
 span id=[EMAIL PROTECTED]
   input name=[EMAIL PROTECTED] id=[EMAIL PROTECTED]:input 
value={fi:value} dojoType=CFormsSuggest
+xsl:apply-templates select=. mode=styling/
 xsl:if test=fi:suggestion
   xsl:attribute name=suggestionxsl:value-of 
select=fi:suggestion//xsl:attribute
 /xsl:if



2 - dojo Widget does not support onchange (see bug : 
http://trac.dojotoolkit.org/ticket/897)
So I change the dojo file src/widget/html/ComboBox.js

The new file is in Attachement (and patch in dojo tracker)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1858) [PATCH]on-value-change does not work on suggestion list

2006-06-07 Thread vincent Demay (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1858?page=comments#action_12415128 
] 

vincent Demay commented on COCOON-1858:
---

Ooops I leave some alert in ComboBox.js. Sorry,  I will attach the right file

 [PATCH]on-value-change does not work on suggestion list
 ---

  Key: COCOON-1858
  URL: http://issues.apache.org/jira/browse/COCOON-1858
  Project: Cocoon
 Type: Bug

   Components: Blocks: Forms
 Versions: 2.1.9
 Reporter: vincent Demay
  Attachments: ComboBox.js

 on-value-change does not work on suggestion list : there are to issues : 
 1 - submit on change is not setted on the widget in 
 form-advanced-field-styling.xsl : 
  Here is the patch : 
 --- sample/forms-advanced-field-styling.xsl 2006-06-07 14:51:27.809216500 
 +0
 200
 +++ sample/forms-advanced-field-styling.new.xsl 2006-06-07 14:52:04.293358000 
 +0
 200
 @@ -272,6 +272,7 @@
xsl:template match=fi:field[fi:styling/@type='suggest' and 
 @state='active']
  span id=[EMAIL PROTECTED]
input name=[EMAIL PROTECTED] id=[EMAIL PROTECTED]:input 
 value={fi:value} dojoType=CFormsSuggest
 +xsl:apply-templates select=. mode=styling/
  xsl:if test=fi:suggestion
xsl:attribute name=suggestionxsl:value-of 
 select=fi:suggestion//xsl:attribute
  /xsl:if
 2 - dojo Widget does not support onchange (see bug : 
 http://trac.dojotoolkit.org/ticket/897)
 So I change the dojo file src/widget/html/ComboBox.js
 The new file is in Attachement (and patch in dojo tracker)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Updated: (COCOON-1858) [PATCH]on-value-change does not work on suggestion list

2006-06-07 Thread vincent Demay (JIRA)
 [ http://issues.apache.org/jira/browse/COCOON-1858?page=all ]

vincent Demay updated COCOON-1858:
--

Attachment: ComboBox.js

 [PATCH]on-value-change does not work on suggestion list
 ---

  Key: COCOON-1858
  URL: http://issues.apache.org/jira/browse/COCOON-1858
  Project: Cocoon
 Type: Bug

   Components: Blocks: Forms
 Versions: 2.1.9
 Reporter: vincent Demay
  Attachments: ComboBox.js, ComboBox.js

 on-value-change does not work on suggestion list : there are to issues : 
 1 - submit on change is not setted on the widget in 
 form-advanced-field-styling.xsl : 
  Here is the patch : 
 --- sample/forms-advanced-field-styling.xsl 2006-06-07 14:51:27.809216500 
 +0
 200
 +++ sample/forms-advanced-field-styling.new.xsl 2006-06-07 14:52:04.293358000 
 +0
 200
 @@ -272,6 +272,7 @@
xsl:template match=fi:field[fi:styling/@type='suggest' and 
 @state='active']
  span id=[EMAIL PROTECTED]
input name=[EMAIL PROTECTED] id=[EMAIL PROTECTED]:input 
 value={fi:value} dojoType=CFormsSuggest
 +xsl:apply-templates select=. mode=styling/
  xsl:if test=fi:suggestion
xsl:attribute name=suggestionxsl:value-of 
 select=fi:suggestion//xsl:attribute
  /xsl:if
 2 - dojo Widget does not support onchange (see bug : 
 http://trac.dojotoolkit.org/ticket/897)
 So I change the dojo file src/widget/html/ComboBox.js
 The new file is in Attachement (and patch in dojo tracker)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1825) Ajax errror when an active state widget become invisible state widget

2006-05-31 Thread vincent Demay (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1825?page=comments#action_12413992 
] 

vincent Demay commented on COCOON-1825:
---

I think the better is the first one : putting a span around each element. So 
you can apply only the first one on forms-field-styling.xsl.

Thanks.



 Ajax errror when an active state widget become invisible state widget
 -

  Key: COCOON-1825
  URL: http://issues.apache.org/jira/browse/COCOON-1825
  Project: Cocoon
 Type: Bug

   Components: Blocks: Forms
 Versions: 2.1.9
 Reporter: vincent Demay
 Assignee: Antonio Gallardo


 Some widget (field with selection-list and styling=radio, group, etc...)  can 
 not be hidden (state=invisible)in ajax mode.
 I declare some widgets without state attribute in the form definition, my 
 form is in ajax mode, when I set the widget state to INVISIBLE, the ajax 
 response can not be applied to the form because span 
 id=widget-name.../span is not available in source code.
 I think about 2 patches : 
 *putting a span/span in forms-field-styling.xsl where is not set
 *or modifing abstractWidgetDefinition.java in ordre to generate a placeholder 
 around each widget (but patch seems to need a lot of modification in 
 forms-field-styling.xsl too)
 Here is the patch for first 
 --- forms-field-styling.orig  2006-04-13 15:37:06.590221200 +0200
 +++ forms-field-styling.xsl   2006-04-13 15:38:22.525291200 +0200
 @@ -198,8 +198,9 @@
  xsl:variable name=value select=fi:value/
  xsl:variable name=vertical 
 select=string(fi:styling/@list-orientation) != 'horizontal'/
  xsl:choose
 -  xsl:when test=$vertical
 -table id={$id} cellpadding=0 cellspacing=0 border=0 
 title={fi:hint}
 +  xsl:when test=$vertical
 +   span id={$id}
 +  table id={$id} cellpadding=0 cellspacing=0 border=0 
 title={fi:hint}
xsl:for-each select=fi:selection-list/fi:item
  xsl:variable name=item-id select=concat($id, ':', 
 position())/
  tr
 @@ -224,6 +225,7 @@
  /tr
/xsl:for-each
  /table
 +/span
/xsl:when
xsl:otherwise
  span id={$id} title={fi:hint}
 @@ -682,22 +684,24 @@
| know where to insert the widget if it becomes visible
+--
xsl:template match=fi:placeholder
 -span id=[EMAIL PROTECTED]/
 +span id=[EMAIL PROTECTED]xsl:apply-templates//span
/xsl:template

!--+
| fi:struct - has no visual representation by default
+--
xsl:template match=fi:struct
 -xsl:apply-templates/
 + span id=[EMAIL PROTECTED]xsl:apply-templates//span
/xsl:template
  
!--+
| fi:group - has no visual representation by default
+--
xsl:template match=fi:group
 -xsl:apply-templates/
 +span id=[EMAIL PROTECTED]xsl:apply-templates//span
/xsl:template
 +  
 +  
  
xsl:template match=@*|node() priority=-1
  xsl:copy
 Here for the second
 --- AbstractWidget.orig   2006-04-13 15:31:07.851701200 +0200
 +++ AbstractWidget.java   2006-04-13 15:30:31.446616200 +0200
 @@ -483,6 +483,10 @@
  public void generateSaxFragment(ContentHandler contentHandler, Locale 
 locale)
  throws SAXException {
  
 + AttributesImpl placeHolderAttrs = new AttributesImpl();
 + placeHolderAttrs.addCDATAAttribute(id, getRequestParameterName());
 +contentHandler.startElement(FormsConstants.INSTANCE_NS, 
 placeholder, FormsConstants.INSTANCE_PREFIX_COLON + placeholder, 
 placeHolderAttrs);
 +
  if (getCombinedState().isDisplayingValues()) {
  // FIXME: we may want to strip out completely widgets that 
 aren't updated when in AJAX mode
  String element = this.getXMLElementName();
 @@ -497,15 +501,9 @@
  
  generateItemSaxFragment(contentHandler, locale);
  
 -contentHandler.endElement(FormsConstants.INSTANCE_NS, element, 
 FormsConstants.INSTANCE_PREFIX_COLON + element);
 -
 -} else {
 -// Generate a placeholder that can be used later by AJAX updates
 -AttributesImpl attrs = new AttributesImpl();
 -attrs.addCDATAAttribute(id, getRequestParameterName());
 -contentHandler.startElement(FormsConstants.INSTANCE_NS, 
 placeholder, FormsConstants.INSTANCE_PREFIX_COLON + placeholder, attrs);
 -contentHandler.endElement(FormsConstants.INSTANCE_NS, 
 placeholder, FormsConstants.INSTANCE_PREFIX_COLON + placeholder);
 +contentHandler.endElement(FormsConstants.INSTANCE_NS, element, 
 FormsConstants.INSTANCE_PREFIX_COLON + element); 
  }
 +contentHandler.endElement(FormsConstants.INSTANCE_NS, placeholder, 
 FormsConstants.INSTANCE_PREFIX_COLON + placeholder);
  }
  
   public Object getAttribute(String name) {

-- 
This message is automatically 

[jira] Commented: (COCOON-1846) [PATCH] BooleanField and radio do not send on-value-changed at the rigth time with IE

2006-05-10 Thread vincent Demay (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1846?page=comments#action_12378853 
] 

vincent Demay commented on COCOON-1846:
---

Hello, thanks for you answer

first I think using name() = 'fi:booleanfield' is better than local-name() 
because we stay in the namspace prefix.

I get the [xsl:if test=@listening = 'true' and 
not(fi:styling/@submit-on-change = 'false') and not(fi:styling/@onchange) and 
not(fi:styling/@list-type = 'double-listbox')] condition in my 
forms-field-styling.xsl version which is in my current cocoon version (2.1.9). 
It seems to not allow submit if submit-on-change is not true and if list-type 
is double-listbox (It's classical html inpu in this case). I think this last 
condition is not mandatory in the onclick-case. 
I don't know exactly what is the purpose of @listening='true' but I think it is 
added on fi:* when the widget is supposed to handle events. I made some tests 
and it is setted by jx-generator when using 
org/apache/cocoon/forms/generation/jx-macros.xml. 

So I think we can clean up my patch as  : 

--- forms-field-styling.xsl 2006-05-09 14:53:40.014409000 +0200
+++ forms-field-styling.xsl 2006-05-09 14:45:01.499752000 +0200
@@ -91,11 +91,20 @@
   +--
   xsl:template match=fi:* mode=styling
 xsl:apply-templates select=fi:styling/@* mode=styling/
-
 !-- Auto submit on fields which are listening --
- xsl:if test=@listening = 'true' and not(fi:styling/@submit-on-change 
='false') and not(fi:styling/@onchange) and not(fi:styling/@list-type = 
'double-listbox')
- xsl:attribute name=onchangeforms_submitForm(this)/xsl:attribute
- /xsl:if
+ xsl:choose
+ xsl:when test=name() = 'fi:booleanfield' or 
fi:styling/@list-type='checkbox' or  fi:styling/@list-type = 'radio' 
+ xsl:if test=@listening = 'true' and not(fi:styling/@submit-on-change = 
'false') and not(fi:styling/@onchange)
+ xsl:attribute name=onclickforms_submitForm(this)/xsl:attribute
+ /xsl:if
+ /xsl:when
+ xsl:otherwise
+ xsl:if test=@listening = 'true' and not(fi:styling/@submit-on-change = 
'false') and not(fi:styling/@onchange) and not(fi:styling/@list-type 
='double-listbox')
+ xsl:attribute name=onchangeforms_submitForm(this)/xsl:attribute
+ /xsl:if
+ /xsl:otherwise
+ /xsl:choose
+

 xsl:if test=@state = 'disabled'
   xsl:attribute name=disableddisabled/xsl:attribute 

I hope my answer is usefull for you



 [PATCH] BooleanField and radio do not send on-value-changed at the rigth time 
 with IE
 -

  Key: COCOON-1846
  URL: http://issues.apache.org/jira/browse/COCOON-1846
  Project: Cocoon
 Type: Bug

   Components: Blocks: Forms
 Versions: 2.1.9
 Reporter: vincent Demay
 Assignee: Simone Gianni


 BooleanField and radio list do not send on-value-changed event when the value 
 changed but when the widget loose focus with IE.
 So with ajax mode and submit-on-change='true', the form is submitted only 
 when the widget lost the focus. 
 Here is a patch to use event onclick rather than on value change : 
 --- forms-field-styling.xsl 2006-05-09 14:53:40.014409000 +0200
 +++ forms-field-styling.xsl 2006-05-09 14:45:01.499752000 +0200
 @@ -91,11 +91,20 @@
+--
xsl:template match=fi:* mode=styling
  xsl:apply-templates select=fi:styling/@* mode=styling/
 -
  !--  Auto submit on fields which are listening --
 -  xsl:if test=@listening = 'true' and not(fi:styling/@submit-on-change 
 ='false') and not(fi:styling/@onchange) and not(fi:styling/@list-type = 
 'double-listbox')
 -  xsl:attribute name=onchangeforms_submitForm(this)/xsl:attribute
 -/xsl:if
 +xsl:choose
 +   xsl:when test=name() = 'fi:booleanfield' or fi:styling/@list-type = 
 'radio' 
 +xsl:if test=@listening = 'true' and 
 not(fi:styling/@submit-on-change = 'false') and not(fi:styling/@onchange) and 
 not(fi:styling/@list-type = 'double-listbox')
 +   xsl:attribute 
 name=onclickforms_submitForm(this)/xsl:attribute
 +   /xsl:if
 +   /xsl:when
 +   xsl:otherwise
 +   xsl:if test=@listening = 'true' and 
 not(fi:styling/@submit-on-change = 'false') and not(fi:styling/@onchange) and 
 not(fi:styling/@list-type ='double-listbox')
 +   xsl:attribute 
 name=onchangeforms_submitForm(this)/xsl:attribute
 +   /xsl:if
 +   /xsl:otherwise
 +/xsl:choose
 +
  xsl:if test=@state = 'disabled'
xsl:attribute name=disableddisabled/xsl:attribute

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (COCOON-1848) [PATCH] using setRequired in Ajax mode does not generate bu:replace

2006-05-10 Thread vincent Demay (JIRA)
[PATCH] using setRequired in Ajax mode does not generate bu:replace
---

 Key: COCOON-1848
 URL: http://issues.apache.org/jira/browse/COCOON-1848
 Project: Cocoon
Type: Bug

  Components: Blocks: Forms  
Versions: 2.1.9, 2.1.10-dev (current SVN)
Reporter: vincent Demay


When you use method setRequired on Field, BrowserUpdateTransformer does not 
generate a bu:replace

a litle patch to fix that : 

--- Field.java   2006-05-10 15:52:14.249081500 +0200
+++ Field.java  2006-05-10 15:49:32.847326500 +0200
@@ -476,6 +476,7 @@

 public void setRequired(boolean required) {
 this.required = required;
+getForm().addWidgetUpdate(this);
 }

 /**

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (COCOON-1846) [PATCH] BooleanField and radio do not send on-value-changed at the rigth time with IE

2006-05-09 Thread vincent Demay (JIRA)
[PATCH] BooleanField and radio do not send on-value-changed at the rigth time 
with IE
-

 Key: COCOON-1846
 URL: http://issues.apache.org/jira/browse/COCOON-1846
 Project: Cocoon
Type: Bug

  Components: Blocks: Forms  
Versions: 2.1.9
Reporter: vincent Demay


BooleanField and radio list do not send on-value-changed event when the value 
changed but when the widget loose focus with IE.
So with ajax mode and submit-on-change='true', the form is submitted only when 
the widget lost the focus. 
Here is a patch to use event onclick rather than on value change : 


--- forms-field-styling.xsl 2006-05-09 14:53:40.014409000 +0200
+++ forms-field-styling.xsl 2006-05-09 14:45:01.499752000 +0200
@@ -91,11 +91,20 @@
   +--
   xsl:template match=fi:* mode=styling
 xsl:apply-templates select=fi:styling/@* mode=styling/
-
 !--  Auto submit on fields which are listening --
-  xsl:if test=@listening = 'true' and not(fi:styling/@submit-on-change 
='false') and not(fi:styling/@onchange) and not(fi:styling/@list-type = 
'double-listbox')
-  xsl:attribute name=onchangeforms_submitForm(this)/xsl:attribute
-/xsl:if
+xsl:choose
+   xsl:when test=name() = 'fi:booleanfield' or fi:styling/@list-type = 
'radio' 
+xsl:if test=@listening = 'true' and 
not(fi:styling/@submit-on-change = 'false') and not(fi:styling/@onchange) and 
not(fi:styling/@list-type = 'double-listbox')
+   xsl:attribute 
name=onclickforms_submitForm(this)/xsl:attribute
+   /xsl:if
+   /xsl:when
+   xsl:otherwise
+   xsl:if test=@listening = 'true' and 
not(fi:styling/@submit-on-change = 'false') and not(fi:styling/@onchange) and 
not(fi:styling/@list-type ='double-listbox')
+   xsl:attribute 
name=onchangeforms_submitForm(this)/xsl:attribute
+   /xsl:if
+   /xsl:otherwise
+/xsl:choose
+

 xsl:if test=@state = 'disabled'
   xsl:attribute name=disableddisabled/xsl:attribute

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (COCOON-1825) Ajax errror when an active state widget become invisible state widget

2006-04-13 Thread vincent Demay (JIRA)
Ajax errror when an active state widget become invisible state widget
-

 Key: COCOON-1825
 URL: http://issues.apache.org/jira/browse/COCOON-1825
 Project: Cocoon
Type: Bug

  Components: Blocks: Forms  
Versions: 2.1.9
Reporter: vincent Demay


Some widget (field with selection-list and styling=radio, group, etc...)  can 
not be hidden (state=invisible)in ajax mode.

I declare some widgets without state attribute in the form definition, my form 
is in ajax mode, when I set the widget state to INVISIBLE, the ajax response 
can not be applied to the form because span id=widget-name.../span is not 
available in source code.

I think about 2 patches : 
*putting a span/span in forms-field-styling.xsl where is not set
*or modifing abstractWidgetDefinition.java in ordre to generate a placeholder 
around each widget (but patch seems to need a lot of modification in 
forms-field-styling.xsl too)



Here is the patch for first 

--- forms-field-styling.orig2006-04-13 15:37:06.590221200 +0200
+++ forms-field-styling.xsl 2006-04-13 15:38:22.525291200 +0200
@@ -198,8 +198,9 @@
 xsl:variable name=value select=fi:value/
 xsl:variable name=vertical select=string(fi:styling/@list-orientation) 
!= 'horizontal'/
 xsl:choose
-  xsl:when test=$vertical
-table id={$id} cellpadding=0 cellspacing=0 border=0 
title={fi:hint}
+  xsl:when test=$vertical  
+ span id={$id}
+  table id={$id} cellpadding=0 cellspacing=0 border=0 
title={fi:hint}
   xsl:for-each select=fi:selection-list/fi:item
 xsl:variable name=item-id select=concat($id, ':', 
position())/
 tr
@@ -224,6 +225,7 @@
 /tr
   /xsl:for-each
 /table
+/span
   /xsl:when
   xsl:otherwise
 span id={$id} title={fi:hint}
@@ -682,22 +684,24 @@
   | know where to insert the widget if it becomes visible
   +--
   xsl:template match=fi:placeholder
-span id=[EMAIL PROTECTED]/
+span id=[EMAIL PROTECTED]xsl:apply-templates//span
   /xsl:template
   
   !--+
   | fi:struct - has no visual representation by default
   +--
   xsl:template match=fi:struct
-xsl:apply-templates/
+ span id=[EMAIL PROTECTED]xsl:apply-templates//span
   /xsl:template
 
   !--+
   | fi:group - has no visual representation by default
   +--
   xsl:template match=fi:group
-xsl:apply-templates/
+span id=[EMAIL PROTECTED]xsl:apply-templates//span
   /xsl:template
+  
+  
 
   xsl:template match=@*|node() priority=-1
 xsl:copy




Here for the second


--- AbstractWidget.orig 2006-04-13 15:31:07.851701200 +0200
+++ AbstractWidget.java 2006-04-13 15:30:31.446616200 +0200
@@ -483,6 +483,10 @@
 public void generateSaxFragment(ContentHandler contentHandler, Locale 
locale)
 throws SAXException {
 
+   AttributesImpl placeHolderAttrs = new AttributesImpl();
+   placeHolderAttrs.addCDATAAttribute(id, getRequestParameterName());
+contentHandler.startElement(FormsConstants.INSTANCE_NS, placeholder, 
FormsConstants.INSTANCE_PREFIX_COLON + placeholder, placeHolderAttrs);
+
 if (getCombinedState().isDisplayingValues()) {
 // FIXME: we may want to strip out completely widgets that aren't 
updated when in AJAX mode
 String element = this.getXMLElementName();
@@ -497,15 +501,9 @@
 
 generateItemSaxFragment(contentHandler, locale);
 
-contentHandler.endElement(FormsConstants.INSTANCE_NS, element, 
FormsConstants.INSTANCE_PREFIX_COLON + element);
-
-} else {
-// Generate a placeholder that can be used later by AJAX updates
-AttributesImpl attrs = new AttributesImpl();
-attrs.addCDATAAttribute(id, getRequestParameterName());
-contentHandler.startElement(FormsConstants.INSTANCE_NS, 
placeholder, FormsConstants.INSTANCE_PREFIX_COLON + placeholder, attrs);
-contentHandler.endElement(FormsConstants.INSTANCE_NS, 
placeholder, FormsConstants.INSTANCE_PREFIX_COLON + placeholder);
+contentHandler.endElement(FormsConstants.INSTANCE_NS, element, 
FormsConstants.INSTANCE_PREFIX_COLON + element); 
 }
+contentHandler.endElement(FormsConstants.INSTANCE_NS, placeholder, 
FormsConstants.INSTANCE_PREFIX_COLON + placeholder);
 }
 
public Object getAttribute(String name) {


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1783) Forbid the use of cocoon:// in redirect-to tag in authentication handler configuration

2006-03-29 Thread vincent Demay (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1783?page=comments#action_12372200 
] 

vincent Demay commented on COCOON-1783:
---

I've got the same problem with authenticate and portal. I have to restart my 
tomcat to make it work

 Forbid the use of cocoon:// in redirect-to tag in authentication handler 
 configuration
 

  Key: COCOON-1783
  URL: http://issues.apache.org/jira/browse/COCOON-1783
  Project: Cocoon
 Type: Improvement
   Components: Blocks: Authentication Framework
 Versions: 2.1.8, 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
 Reporter: Philippe Gassmann


 When cocoon:// is used in the redirect-to tag, the redirect uri then used 
 is computed at the first request using the request.getContextPath() method. 
 (HandlerConfiguration.java line 99)
 If the first request comes from a PipelineCronJob, the contextPath is null, 
 and until the server is restarted, the authentication framwork can't be used 
 (it redirects to a wrong URI).
 So, I think that using cocoon:// should be forbidden in that purpose, or it 
 should be used as a real cocoon:// : without a external redirection.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (COCOON-1810) [PATCH] JMSEventMessageListener does not work

2006-03-23 Thread vincent Demay (JIRA)
[PATCH] JMSEventMessageListener does not work
-

 Key: COCOON-1810
 URL: http://issues.apache.org/jira/browse/COCOON-1810
 Project: Cocoon
Type: Bug
  Components: Blocks: JMS  
Versions: 2.1.9-dev (current SVN)
Reporter: vincent Demay
 Attachments: jndi.properties

Event if the rigth jars are copied to WEB-INF/lib, JMSEventMessageListener does 
not work, it can not create a connection.

Here is a patch but it needs to copy the jndi.properties file from OpenJMS 
sample to the cocoon classPath (see attachement)

Index: 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/jms/java/org/apache/cocoon/components/jms/AbstractMessageListener.java
===
--- 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/jms/java/org/apache/cocoon/components/jms/AbstractMessageListener.java
   (revision 388114)
+++ 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/jms/java/org/apache/cocoon/components/jms/AbstractMessageListener.java
   (working copy)
@@ -15,6 +15,8 @@
  */
 package org.apache.cocoon.components.jms;
 
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
 import javax.jms.JMSException;
 import javax.jms.MessageListener;
 import javax.jms.Session;
@@ -22,6 +24,10 @@
 import javax.jms.TopicConnection;
 import javax.jms.TopicSession;
 import javax.jms.TopicSubscriber;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
@@ -101,7 +107,7 @@
 private JMSConnectionManager m_connectionManager;
 
 /* our session */
-private TopicSession m_session;
+private Session m_session;
 
 /* our subscriber */
 private TopicSubscriber m_subscriber;
@@ -121,7 +127,7 @@
 m_connectionName = parameters.getParameter(CONNECTION_PARAM);
 m_topicName = parameters.getParameter(TOPIC_PARAM);
 
-m_subscriptionId = parameters.getParameter(SUBSCRIPTION_ID_PARAM, 
null);
+m_subscriptionId = parameters.getParameter(SUBSCRIPTION_ID_PARAM, 
default_id); //should not be null
 m_selector = parameters.getParameter(MESSAGE_SELECTOR_PARAM, null);
 
 }
@@ -168,26 +174,25 @@
 // concrete implementations may want to override this
 m_acknowledgeMode = Session.DUPS_OK_ACKNOWLEDGE;
 
-// register this MessageListener with a TopicSubscriber
-final TopicConnection connection = (TopicConnection) 
m_connectionManager.getConnection(m_connectionName);
-if (connection != null) {
-m_session = connection.createTopicSession(false, 
m_acknowledgeMode);
-final Topic topic = m_session.createTopic(m_topicName);
-if (m_subscriptionId != null) {
-m_subscriber = m_session.createDurableSubscriber(topic, 
m_subscriptionId, m_selector, false);
-}
-else {
-m_subscriber = m_session.createSubscriber(topic, m_selector, 
false);
-}
+   Context context;
+   try {
+   // The jndi.properties should be in the classpath
+   // it will set up the connection (see OpenJMS samples)
+   context = new InitialContext();
+   String factoryName = ConnectionFactory;
+   ConnectionFactory factory = (ConnectionFactory) 
context.lookup(factoryName);
+   Topic topic = (Topic) context.lookup(m_topicName);
+   Connection connection = factory.createConnection();
+   m_session = connection.createSession(
+   false, Session.AUTO_ACKNOWLEDGE);
+   m_subscriber = m_session.createDurableSubscriber(
+topic, m_subscriptionId);
 m_subscriber.setMessageListener(this);
 // recover in case of reconnection
 m_session.recover();
-}
-else {
-if (getLogger().isWarnEnabled()) {
-getLogger().warn(Could not obtain JMS connection ' + 
m_connectionName + ');
-}
-}
+   } catch (NamingException e) {
+   getLogger().warn(Could not obtain JMS connection ' + 
m_connectionName + ');
+   }
 }
 
 private void closeSubscriberAndSession() {


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Closed: (COCOON-1780) [PATCH] Upload Widget : Can not change selected file

2006-02-23 Thread vincent Demay (JIRA)
 [ http://issues.apache.org/jira/browse/COCOON-1780?page=all ]
 
vincent Demay closed COCOON-1780:
-

Resolution: Fixed

 [PATCH] Upload Widget : Can not change selected file
 

  Key: COCOON-1780
  URL: http://issues.apache.org/jira/browse/COCOON-1780
  Project: Cocoon
 Type: Bug
   Components: Blocks: Forms
 Versions: 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
 Reporter: vincent Demay
 Assignee: Jean-Baptiste Quenot
  Fix For: 2.1.9-dev (current SVN)


 When a file is selected with the upload widget and a on-value-change event is 
 fired, the value of the widget can not be changed by user.
 here is the patch
 Index: 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
 ===
 --- 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(revision 377974)
 +++ 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(working copy)
 @@ -486,7 +486,7 @@
  xsl:text[/xsl:text
  xsl:value-of select=fi:value/
  xsl:text] /xsl:text
 -input type=button id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] value=... onclick=forms_submitForm(this)/
 +   input type=submit id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] value=... onclick=forms_submitForm(this)/
  /xsl:when
  xsl:otherwise
input type=file id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] title={fi:hint} accept=[EMAIL PROTECTED]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Updated: (COCOON-1776) [PATCH]Reload Bookmarks on bookmark file validity

2006-02-23 Thread vincent Demay (JIRA)
 [ http://issues.apache.org/jira/browse/COCOON-1776?page=all ]

vincent Demay updated COCOON-1776:
--

Attachment: BookmarkAction.java.patch

There is a bug in the previous patch

In this one is fixed

 [PATCH]Reload Bookmarks on bookmark file validity
 -

  Key: COCOON-1776
  URL: http://issues.apache.org/jira/browse/COCOON-1776
  Project: Cocoon
 Type: Improvement
   Components: Blocks: Portal
 Versions: 2.2-dev (Current SVN)
 Reporter: vincent Demay
  Attachments: BookmarkAction.java.patch, BookmarkAction.java.patch

 This patch allow bookmarks to be reloaded on source file validity and not on 
 server restart
 thanks to Philippe Gassman

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1780) [PATCH] Upload Widget : Can not change selected file

2006-02-22 Thread vincent Demay (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1780?page=comments#action_12367318 
] 

vincent Demay commented on COCOON-1780:
---

Thanks for the patch, it's working properly now.

I just have a question, what was the problem with replacing button in submit?

 [PATCH] Upload Widget : Can not change selected file
 

  Key: COCOON-1780
  URL: http://issues.apache.org/jira/browse/COCOON-1780
  Project: Cocoon
 Type: Bug
   Components: Blocks: Forms
 Versions: 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
 Reporter: vincent Demay
 Assignee: Jean-Baptiste Quenot
  Fix For: 2.1.9-dev (current SVN)


 When a file is selected with the upload widget and a on-value-change event is 
 fired, the value of the widget can not be changed by user.
 here is the patch
 Index: 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
 ===
 --- 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(revision 377974)
 +++ 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(working copy)
 @@ -486,7 +486,7 @@
  xsl:text[/xsl:text
  xsl:value-of select=fi:value/
  xsl:text] /xsl:text
 -input type=button id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] value=... onclick=forms_submitForm(this)/
 +   input type=submit id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] value=... onclick=forms_submitForm(this)/
  /xsl:when
  xsl:otherwise
input type=file id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] title={fi:hint} accept=[EMAIL PROTECTED]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Reopened: (COCOON-1780) [PATCH] Upload Widget : Can not change selected file

2006-02-22 Thread vincent Demay (JIRA)
 [ http://issues.apache.org/jira/browse/COCOON-1780?page=all ]
 
vincent Demay reopened COCOON-1780:
---


I tried you patch on a form with a on-value-changed listener on upload and it 
works.

but when there isn't any on-value-change-listener and you submit the form with 
another input type=submit the fallowing error occurs
java.lang.IllegalStateException: Submit widget already set to Upload 'upload'. 
Cannot set also Submit 'ok'

I think it's because we set the submit-id with the upload and after we set it 
again.

 [PATCH] Upload Widget : Can not change selected file
 

  Key: COCOON-1780
  URL: http://issues.apache.org/jira/browse/COCOON-1780
  Project: Cocoon
 Type: Bug
   Components: Blocks: Forms
 Versions: 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
 Reporter: vincent Demay
 Assignee: Jean-Baptiste Quenot
  Fix For: 2.1.9-dev (current SVN)


 When a file is selected with the upload widget and a on-value-change event is 
 fired, the value of the widget can not be changed by user.
 here is the patch
 Index: 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
 ===
 --- 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(revision 377974)
 +++ 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(working copy)
 @@ -486,7 +486,7 @@
  xsl:text[/xsl:text
  xsl:value-of select=fi:value/
  xsl:text] /xsl:text
 -input type=button id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] value=... onclick=forms_submitForm(this)/
 +   input type=submit id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] value=... onclick=forms_submitForm(this)/
  /xsl:when
  xsl:otherwise
input type=file id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] title={fi:hint} accept=[EMAIL PROTECTED]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1780) [PATCH] Upload Widget : Can not change selected file

2006-02-22 Thread vincent Demay (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1780?page=comments#action_12367339 
] 

vincent Demay commented on COCOON-1780:
---

What do you think of doing something like that to keep your idea (in order to 
avoid useless code): 

Index: 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Upload.java
===
--- 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Upload.java
 (revision 379761)
+++ 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Upload.java
 (working copy)
@@ -105,11 +105,6 @@
 
 Object obj = request.get(fullId);
 
-if (fullId.equals(request.getParameter(Form.SUBMIT_ID_PARAMETER))) {
-   form.setSubmitWidget(this);
-}
-
-
 // If the request object is a Part, keep it
 if (obj instanceof Part) {
 Part requestPart = (Part)obj;
@@ -129,7 +124,7 @@
 
 // If it's not a part and not null, clear any existing value
 // We also check if we're the submit widget, as a result of clicking 
the ... button
-} else if (obj != null || form.getSubmitWidget() == this){
+} else if (obj != null || 
fullId.equals(request.getParameter(Form.SUBMIT_ID_PARAMETER))){
 // Clear the part, if any
 if (this.part != null) {
 this.part.dispose();



or, and I think it's better because, replace the button by a submit and remove 
the useless condition as in the following patch
Index: 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Upload.java
===
--- 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Upload.java
 (revision 379761)
+++ 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Upload.java
 (working copy)
@@ -105,11 +105,6 @@
 
 Object obj = request.get(fullId);
 
-if (fullId.equals(request.getParameter(Form.SUBMIT_ID_PARAMETER))) {
-   form.setSubmitWidget(this);
-}
-
-
 // If the request object is a Part, keep it
 if (obj instanceof Part) {
 Part requestPart = (Part)obj;
@@ -129,7 +124,7 @@
 
 // If it's not a part and not null, clear any existing value
 // We also check if we're the submit widget, as a result of clicking 
the ... button
-} else if (obj != null || form.getSubmitWidget() == this){
+} else if (obj != null){
 // Clear the part, if any
 if (this.part != null) {
 this.part.dispose();


 [PATCH] Upload Widget : Can not change selected file
 

  Key: COCOON-1780
  URL: http://issues.apache.org/jira/browse/COCOON-1780
  Project: Cocoon
 Type: Bug
   Components: Blocks: Forms
 Versions: 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
 Reporter: vincent Demay
 Assignee: Jean-Baptiste Quenot
  Fix For: 2.1.9-dev (current SVN)


 When a file is selected with the upload widget and a on-value-change event is 
 fired, the value of the widget can not be changed by user.
 here is the patch
 Index: 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
 ===
 --- 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(revision 377974)
 +++ 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(working copy)
 @@ -486,7 +486,7 @@
  xsl:text[/xsl:text
  xsl:value-of select=fi:value/
  xsl:text] /xsl:text
 -input type=button id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] value=... onclick=forms_submitForm(this)/
 +   input type=submit id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] value=... onclick=forms_submitForm(this)/
  /xsl:when
  xsl:otherwise
input type=file id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] title={fi:hint} accept=[EMAIL PROTECTED]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (COCOON-1780) [PATCH] Upload Widget : Can not change selected file

2006-02-20 Thread vincent Demay (JIRA)
[PATCH] Upload Widget : Can not change selected file


 Key: COCOON-1780
 URL: http://issues.apache.org/jira/browse/COCOON-1780
 Project: Cocoon
Type: Bug
  Components: Blocks: Forms  
Versions: 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
Reporter: vincent Demay


When a file is selected with the upload widget and a on-value-change event is 
fired, the value of the widget can not be changed by user.

here is the patch

Index: 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
===
--- 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
 (revision 377974)
+++ 
/cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
 (working copy)
@@ -486,7 +486,7 @@
 xsl:text[/xsl:text
 xsl:value-of select=fi:value/
 xsl:text] /xsl:text
-input type=button id=[EMAIL PROTECTED]:input name=[EMAIL 
PROTECTED] value=... onclick=forms_submitForm(this)/
+   input type=submit id=[EMAIL PROTECTED]:input name=[EMAIL 
PROTECTED] value=... onclick=forms_submitForm(this)/
 /xsl:when
 xsl:otherwise
   input type=file id=[EMAIL PROTECTED]:input name=[EMAIL 
PROTECTED] title={fi:hint} accept=[EMAIL PROTECTED]



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Closed: (COCOON-1780) [PATCH] Upload Widget : Can not change selected file

2006-02-20 Thread vincent Demay (JIRA)
 [ http://issues.apache.org/jira/browse/COCOON-1780?page=all ]
 
vincent Demay closed COCOON-1780:
-

Resolution: Fixed

Yes, it was fixed, thanks

 [PATCH] Upload Widget : Can not change selected file
 

  Key: COCOON-1780
  URL: http://issues.apache.org/jira/browse/COCOON-1780
  Project: Cocoon
 Type: Bug
   Components: Blocks: Forms
 Versions: 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
 Reporter: vincent Demay
 Assignee: Jean-Baptiste Quenot


 When a file is selected with the upload widget and a on-value-change event is 
 fired, the value of the widget can not be changed by user.
 here is the patch
 Index: 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
 ===
 --- 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(revision 377974)
 +++ 
 /cvs/cocoon/cocoon_BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(working copy)
 @@ -486,7 +486,7 @@
  xsl:text[/xsl:text
  xsl:value-of select=fi:value/
  xsl:text] /xsl:text
 -input type=button id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] value=... onclick=forms_submitForm(this)/
 +   input type=submit id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] value=... onclick=forms_submitForm(this)/
  /xsl:when
  xsl:otherwise
input type=file id=[EMAIL PROTECTED]:input name=[EMAIL 
 PROTECTED] title={fi:hint} accept=[EMAIL PROTECTED]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (COCOON-1776) [PATCH]Reload Bookmarks on bookmark file validity

2006-02-15 Thread vincent Demay (JIRA)
[PATCH]Reload Bookmarks on bookmark file validity
-

 Key: COCOON-1776
 URL: http://issues.apache.org/jira/browse/COCOON-1776
 Project: Cocoon
Type: Improvement
  Components: Blocks: Portal  
Versions: 2.2-dev (Current SVN)
Reporter: vincent Demay
 Attachments: BookmarkAction.java.patch

This patch allow bookmarks to be reloaded on source file validity and not on 
server restart
thanks to Philippe Gassman

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira