textInput callback is not used

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

textInput callback is not used

bachitoph
Hi,
I'm working with Dolphin and Seaside 2.8 and my question is probably a newbee querstion. I tried to get an Input field in a html table. The renderMessage is as below and the rendering looks good. I see the correct value but if I change the value in the Input field, no callback is used and the value is not stored. Using the productCount or productEditorDialog the value changes. Only the textInput does not work.
Any hints,

Thanks
cjb

renderProduct: aProduct asRowOn: html
        "Render a product line"

        | list |
        list := aProduct productValues.
        html tableData:
                        [list do: [:element | html tableData: element].
                        html tableData:
                                        [(html anchor)
                                                callback: [self productCount: aProduct plus: -1];
                                                with: '-'].
                        html tableData:
                                        [(html textInput)
                                                value: aProduct count;
                                                callback:
                                                                [:value |
                                                                Transcript show: value.
                                                                aProduct count: value] ].
                        html tableData:
                                        [(html anchor)
                                                callback: [self productCount: aProduct plus: 1];
                                                with: '+'].
                        html tableData:
                                        [(html anchor)
                                                callback: [self productEditorDialog: aProduct];
                                                with: 'Change']]

End of code
Reply | Threaded
Open this post in threaded view
|

Re: textInput callback is not used

Philippe Marschall
2009/2/9 Zirbler <[hidden email]>:
>
> Hi,
> I'm working with Dolphin and Seaside 2.8 and my question is probably a
> newbee querstion. I tried to get an Input field in a html table. The
> renderMessage is as below and the rendering looks good. I see the correct
> value but if I change the value in the Input field, no callback is used and
> the value is not stored. Using the productCount or productEditorDialog the
> value changes. Only the textInput does not work.
> Any hints,

You're probably missing a form and a submit button.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: textInput callback is not used

bachitoph

Philippe Marschall wrote
2009/2/9 Zirbler <cj-bachinger@gmx.de>:
>
> Hi,
> I'm working with Dolphin and Seaside 2.8 and my question is probably a
> newbee querstion. I tried to get an Input field in a html table. The
> renderMessage is as below and the rendering looks good. I see the correct
> value but if I change the value in the Input field, no callback is used and
> the value is not stored. Using the productCount or productEditorDialog the
> value changes. Only the textInput does not work.
> Any hints,

You're probably missing a form and a submit button.

Philippe, I do not use a form. My application looks like the tutorial at:
http://www.hpi.uni-potsdam.de/hirschfeld/seaside/tutorial

I have a tableData like rendering the "tasklist", the only additonal code is the textInput code.

                        html tableData:
                                        [(html textInput)
                                                value: aProduct count;
                                                callback:
                                                                [:value |
                                                                Transcript show: value.
                                                                aProduct count: value] ].

Can it be that textInput callback: []. only work correctly in forms?

cjb

Reply | Threaded
Open this post in threaded view
|

Re: textInput callback is not used

Philippe Marschall
2009/2/10 Zirbler <[hidden email]>:

>
>
>
> Philippe Marschall wrote:
>>
>> 2009/2/9 Zirbler <[hidden email]>:
>>>
>>> Hi,
>>> I'm working with Dolphin and Seaside 2.8 and my question is probably a
>>> newbee querstion. I tried to get an Input field in a html table. The
>>> renderMessage is as below and the rendering looks good. I see the correct
>>> value but if I change the value in the Input field, no callback is used
>>> and
>>> the value is not stored. Using the productCount or productEditorDialog
>>> the
>>> value changes. Only the textInput does not work.
>>> Any hints,
>>
>> You're probably missing a form and a submit button.
>>
>> Philippe, I do not use a form. My application looks like the tutorial at:
>> http://www.hpi.uni-potsdam.de/hirschfeld/seaside/tutorial

You need one.

>> I have a tableData like rendering the "tasklist", the only additonal code
>> is the textInput code.
>>
>>                       html tableData:
>>                                       [(html textInput)
>>                                               value: aProduct count;
>>                                               callback:
>>                                                               [:value |
>>                                                               Transcript show: value.
>>                                                               aProduct count: value]  ].
>>
>> Can it be that textInput callback: []. only work correctly in forms?

Yes, that's how HTML works. Form elements (textInput, checkBox,
submitButton, ...) need to be inside a form.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: textInput callback is not used

bachitoph

Philippe Marschall wrote
2009/2/10 Zirbler <cj-bachinger@gmx.de>:
>
>
>
> Philippe Marschall wrote:
>>
>> 2009/2/9 Zirbler <cj-bachinger@gmx.de>:
>>>
>>> Hi,
>>> I'm working with Dolphin and Seaside 2.8 and my question is probably a
>>> newbee querstion. I tried to get an Input field in a html table. The
>>> renderMessage is as below and the rendering looks good. I see the correct
>>> value but if I change the value in the Input field, no callback is used
>>> and
>>> the value is not stored. Using the productCount or productEditorDialog
>>> the
>>> value changes. Only the textInput does not work.
>>> Any hints,
>>
>> You're probably missing a form and a submit button.
>>
>> Philippe, I do not use a form. My application looks like the tutorial at:
>> http://www.hpi.uni-potsdam.de/hirschfeld/seaside/tutorial

You need one.

>> I have a tableData like rendering the "tasklist", the only additonal code
>> is the textInput code.
>>
>>                       html tableData:
>>                                       [(html textInput)
>>                                               value: aProduct count;
>>                                               callback:
>>                                                               [:value |
>>                                                               Transcript show: value.
>>                                                               aProduct count: value]  ].
>>
>> Can it be that textInput callback: []. only work correctly in forms?

Yes, that's how HTML works. Form elements (textInput, checkBox,
submitButton, ...) need to be inside a form.

Philippe,
thanks for confirmation. Does a form has scrollbars if the form is greater than the viewing window.
cjb

_______________________________________________
seaside mailing list
seaside@lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: textInput callback is not used

Marco Qualizza
(inlined)

On 10-Feb-09, at 2:49:45.000 AM, Zirbler wrote:

>>>> I have a tableData like rendering the "tasklist", the only  
>>>> additonal
>>>> code
>>>> is the textInput code.
>>>>
>>>>                      html tableData:
>>>>                                      [(html textInput)
>>>>                                              value: aProduct count;
>>>>                                              callback:
>>>>                                                              
>>>> [:value |
>>>>                                                              
>>>> Transcript
>>>> show: value.
>>>>                                                              
>>>> aProduct
>>>> count: value]  ].
>>>>
>>>> Can it be that textInput callback: []. only work correctly in  
>>>> forms?
>>
>> Yes, that's how HTML works. Form elements (textInput, checkBox,
>> submitButton, ...) need to be inside a form.
>>
>> Philippe,
>> thanks for confirmation. Does a form has scrollbars if the form is  
>> greater
>> than the viewing window.
>> cjb
>>
>>

An HTML form isn't actually a visual element -- it just logically  
groups all of the form elements (radio buttons, drop downs, check  
boxes, input fields, etc) so that they can be submitted as one set of  
data.  As far as I remember, and it's been a while since I've played  
with HTML, you can't actually assign styling (e.g. background colours,  
borders, etc) to a form.  But, if the "contents" of the form is bigger  
than the viewing window, then yes, you will get scroll bars.

-m
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: textInput callback is not used

Lukas Renggli
> An HTML form isn't actually a visual element -- it just logically groups all
> of the form elements (radio buttons, drop downs, check boxes, input fields,
> etc) so that they can be submitted as one set of data.  As far as I
> remember, and it's been a while since I've played with HTML, you can't
> actually assign styling (e.g. background colours, borders, etc) to a form.
>  But, if the "contents" of the form is bigger than the viewing window, then
> yes, you will get scroll bars.

All HTML DOM nodes are equal. You can style a FORM element the exact
way you style a DIV. Use CSS to set background color, change borders,
select fonts, define scrolling behavior, etc.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: textInput callback is not used

Marco Qualizza

On 10-Feb-09, at 7:27:08.000 AM, Lukas Renggli wrote:

>> An HTML form isn't actually a visual element -- it just logically  
>> groups all
>> of the form elements (radio buttons, drop downs, check boxes, input  
>> fields,
>> etc) so that they can be submitted as one set of data.  As far as I
>> remember, and it's been a while since I've played with HTML, you  
>> can't
>> actually assign styling (e.g. background colours, borders, etc) to  
>> a form.
>> But, if the "contents" of the form is bigger than the viewing  
>> window, then
>> yes, you will get scroll bars.
>
> All HTML DOM nodes are equal. You can style a FORM element the exact
> way you style a DIV. Use CSS to set background color, change borders,
> select fonts, define scrolling behavior, etc.
>
> Lukas

Granted that you can assign styling, but will the styling be rendered?
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: textInput callback is not used

Lukas Renggli
> Granted that you can assign styling, but will the styling be rendered?

It is not a common practice to style FORMs, but all browser I know
display its styles. According to the DOM standard the HTMLFormElement
inherits from HTMLElement. The specialization merely adds a few
attributes and methods. Rendering should not be affected.

   http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-40002357

Related, the HEAD element is no different to a DIV element either. It
is just that the default style-sheet of the web browser hides it. You
can override that in your own CSS and for example display the contents
of the TITLE tag as part of the page.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: textInput callback is not used

Marco Qualizza
Thanks for the info :-)  Like I said, it's been a while -- apparently  
too long.

-m

On 10-Feb-09, at 11:04:34.000 AM, Lukas Renggli wrote:

>> Granted that you can assign styling, but will the styling be  
>> rendered?
>
> It is not a common practice to style FORMs, but all browser I know
> display its styles. According to the DOM standard the HTMLFormElement
> inherits from HTMLElement. The specialization merely adds a few
> attributes and methods. Rendering should not be affected.
>
>   http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-40002357
>
> Related, the HEAD element is no different to a DIV element either. It
> is just that the default style-sheet of the web browser hides it. You
> can override that in your own CSS and for example display the contents
> of the TITLE tag as part of the page.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside