Hi Veeresh,
it's not a bug, it is a future.
I add this sub to the modelcode:
sub tst {
shift->output( seekrecord => 200 );
}
and add a View Default/View/tst.tmpl
<html>
<body>
<form >
[% seekrecord %]
<input value=[% seekrecord %] name="seekrecord" type="hidden" />
</form>
</body>
</html>
I reordered it a bit, but without changing the effect ( wo testing ).
What happened is that: the model data is filled ( you could also write
<modelvar seekrecord> instead of [% seekrecord %] this gives you the
advantage to switch between TT and H:T on the fly ). Then the
fillinform action takes place and overwrite the value=200 part with
whatever value you or the form supply. This may happened implicit.
For example with http://whatever/tst?seekrecord=abc for example.
You can overcome the effect by
1.
using $model->fillinform( seekrecord => 'something' ); in addition or
as a replacement for $model->output.
2.
disable the autofillin action for the page: ie fill_in_form="off" for
the page ( Config.xml page section ).
3.
let you source as it is, just tell fillin to ignore this field with
$model->ignore_fillinform_fields( qw/seekrecord/ );
just choice one of the options that you like most ;-)
I have not tested the above, but it should work this way or very close
to that.
> Am Dienstag, 2. November 2004 14:56 schrieb R K:
>> Umm I was wondering, does not Template Toolkit treat templates as
>> binary? There is a binmode option as far as I know.
>>
>> Thanks
>> -RK
>>
>> R K wrote:
>>> Hi Boris,
>>> I am using the latest PageKit 1.15 with Template Toolkit. I am facing
>>> a kind of unique problem here. Consider following (Code: Model) :
>>>
>>> $model->output(seekrecord => $UserData->{seekrecord});
>>> where $UserData->{seekrecord} = 200;
>>>
>>> Now consider following: (Template)
>>> <input value=[% seekrecord %] [% seekrecord %]
>>> name="seekrecord" type="hidden" />
>>>
>>> In output I get: (Final Web Page)
>>> <input 200 value="100" name="seekrecord" type="hidden" />
>>>
>>> Any ideas???? No matter whatever is the value, I always get
>>> vale="100"
>>> and please check I didnt mention any quotes after value, but they
>>> appear in the final output. Any guesses?
>>>
> [...]
> --
> Boris
>
>
--
Boris
|