[Seaside] Re: JQAjax>>serializeForm: behaves differently using jQuery 1.6.1 and jQuery 1.5.1 & radio groups.

Paul DeBruicker pdebruic at gmail.com
Tue Jun 7 19:41:47 UTC 2011


>
> How do the requests as displayed with FireBug (or similar a tool) differ?
>
> I don't think that the changes on find() and closest() affect the behavior.
>
> Can you provide a minimal example that shows the problem. The
> functional form tests seems to work with jQuery 1.6.1, but then it is
> not using #serializeForm:
>
> Lukas

I do not think it is a jQuery/Seaside issue because I cannot recreate 
the issue out of context.  Yesterday I did not think of this but its 
either a problem with an outdated jQuery Stars plugin (which affects the 
functionality and appearance of radio groups) that I'm using or I did 
something else wrong.  But to answer your questions:

1. The difference in the requests is that in the request that misbehaves 
the form inputs that pertain to the radio group aren't detected or sent 
at all.  E.g. in the working example the request's Params are:
22	
33	q
35	q
38	
41	
43	@q
45	
48	
51	
53	40
55	40
57	12
59	on
60	
62	on
63	
70	1
73	1
76	1
80	
_k	Ss0Tw-LSHIQuiJDW
_s	EOhO0oPlg44QtFQe
page	

and in the broken one the Params are:
22	
33	q
35	q
38	
41	
43	@q
45	
48	
51	
53	40
55	40
57	12
59	on
60	
62	on
63	
80	
_k	Ss0Tw-LSHIQuiJDW
_s	EOhO0oPlg44QtFQe
page	

where numbers 70,73,and 76 pertain to the three radio groups on the page.

The example code that I created as a minimal example after I got your 
email is pasted below.  It does not exhibit the issue I'm seeing on my 
other page.  The example works just fine using jQuery 1.5.1, 1.6, and 
1.6.1.   So that leads me to believe I should look at either the Stars 
plugin or something else I've done.  Or just stick to jQuery 1.5.1 for 
now as I don't need any functionality provided by 1.6.1 yet.


Thanks and sorry for the noise.

Paul




renderContentOn: html
	(html form)
		id: 'textInput';
		with: [
					html
						unorderedList: [
							html listItem: [  ].
							html listItem: [  ].
							html listItem: [  ].
							html
								listItem: [
									html
										div: [
											html
												table: [
													html
														tableHeading: #('nested text input example');
														tableRow: [ html tableData: [ html textInput callback: [ 
:val |  ] ] ] ] ] ].
							html listItem: [  ] ] ].
	(html anchor)
		url: '#test';
		onClick: (html jQuery ajax serializeForm: (html jQuery id: 'textInput'));
		with: 'submit textInput'.
	(html form)
		id: 'radioGroup';
		with: [
					html
						unorderedList: [
							html listItem: [  ].
							html listItem: [  ].
							html listItem: [  ].
							html
								listItem: [
									html
										div: [
											html
												table: [
													html
														tableHeading: #('nested radio groups');
														tableRow: [
																	html
																		tableData: [ html render: 'group 1'.
																			(html radioGroup)
																				callback: [ :value |  ];
																				selected: 3;
																				with: [ :group |
																							(1 to: 5)
																								do: [ :each |
																									(html radioButton)
																										group: group;
																										value: each;
																										title: each ] ].
																								html break.
																								html render: 'group 2'.
																								(html radioGroup)
																				callback: [ :value |  ];
																				selected: 3;
																				with: [ :group |
																							(1 to: 5)
																								do: [ :each |
																									(html radioButton)
																										group: group;
																										value: each;
																										title: each ] ] .
																								html break.
																								html render: 'group 3'.
																								(html radioGroup)
																				callback: [ :value |  ];
																				selected: 3;
																				with: [ :group |
																							(1 to: 5)
																								do: [ :each |
																									(html radioButton)
																										group: group;
																										value: each;
																										title: each ] ]  ] ] ] ] ].
							html listItem: [  ] ] ].
	(html anchor)
		url: '#test';
		onClick: (html jQuery ajax serializeForm: (html jQuery id: 'radioGroup'));
		with: 'submit radioGroup'



More information about the seaside mailing list