Grokbase
Topics Posts Groups | in
x
[ help ]

Bernhard Graf (html-w...@augensalat.de)

Profile | Posts (3)

User Information

Display Name:Bernhard Graf
Partial Email Address:html-w...@augensalat.de
Posts:
3 total
3 in HTML::Widget

3 Most Recent

1) Bernhard Graf [Html-widget] retain_default() for a HTML::Widget::Element::Button?
| +1 vote
HTML::Widget::Element::Button has a retain_default() accessor. <cite> If true, overrides the...
HTML::Widget
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
HTML::Widget::Element::Button has a retain_default() accessor.

<cite>
If true, overrides the default behaviour, so that after a field is
missing from the form submission, the xml output will contain the
default value, rather than be empty.
</cite>

But why?

A button value (the label) cannot or at least should not be changed by
the user (see bottom of page) - or do I overlook something?

I ask because I struggled some time with HTML::Widget to find out why a
submit button of a form didn't get a value. Finally I found the reason
is because for the corresponding form I always call process with the
HTTP request object as argument -

$widget->process($c->request)

- even at the initial call (*).

I set retain_default(1) on this submit element now and it works, but
actually as I said I think retain_default() is unappropriate for a
button element and in HTML::Widget::Element::Button::containerize() the
line
        and $self->retain_default || not $args->{submitted};

should be removed.


(*) To set and check initial form values. Thus currently (and without
retain_default(1)) I'm also able to set the value of the submit button
(the name is also "submit") by calling the page like this:

http://my.domain/path/to/page?submit=My+Personal+Search-Button

Does anybody need or want this behaviour?
--
Bernhard Graf

_______________________________________________
Html-widget mailing list
[email protected: Html-w...@lists.rawmode.org]
http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget
2) Bernhard Graf Re: [Html-widget] literals
| +1 vote
That works! Many thanks!
HTML::Widget
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Carl Franks wrote:

> On 18/04/07, Bernhard Graf <html-widget@augensalat.de> wrote:
> > Short question:
> >
> > Is there a way for literal texts in labels in HTML::Widget?
> > I need labels with HTML code being untouched.
>
> There are some places a ~literal element can't be used - I'm not sure
> if labels are one of them - but the standard way to use a literal
> HTML string in HTML::Widget is rather than this:
>     $e->foo( $HTML );
> do this instead:
> $e->foo( HTML::Element->new('~literal', text => $HTML) );

That works! Many thanks!
--
Bernhard Graf

_______________________________________________
Html-widget mailing list
[email protected: Html-w...@lists.rawmode.org]
http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget
3) Bernhard Graf [Html-widget] literals
| +1 vote
Short question: Is there a way for literal texts in labels in HTML::Widget? I need labels with HTML...
HTML::Widget
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Short question:

Is there a way for literal texts in labels in HTML::Widget?
I need labels with HTML code being untouched.
--
Bernhard Graf

_______________________________________________
Html-widget mailing list
[email protected: Html-w...@lists.rawmode.org]
http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget

spacer
Profile | Posts (3)
Home > People > Bernhard Graf