plainblack.com
Username Password
search
Bookmark and Share

    

DynamicField

User dionak
Date 4/17/2007 11:19 am
Views 2816
Rating -4    Rate [
|
]
Previous · Next
User Message
dionak

I'm using WebGUI::Form::DynamicField in a custom wobject. I don't appear to be able to adjust the size of the selectList. I'm passing in size as a hashref param but it doesn't appear to have an effect. Is it possible to adjust the size of a selectList using the DynamicField class?

$html .= WebGUI::Form::DynamicField->new($self->session, %{$properties} )->toHtmlWithWrapper; 

 



Back to Top
Rate [
|
]
 
 
fdillon
There is some odd code in Dynamic Field which is preventing this:
if (exists $param->{size}) {   $size = $param->{size};   delete $param->{size}; }
....
##Fix up methods for List type forms and restore the size to all Forms *except*##List type forms.  Historically, dynamically created forms have always##used the default size.
if ($formObj->isa('WebGUI::Form::List')) {   $formObj->correctValues($param->{value});   $formObj->correctOptions($param->{possibleValues});}elsif ($size) {   $formObj->set('size',$size);} 
The comments seem to specify that when Dynamically creating a list, the default size must be used but no indication as to why this is.  Unless there is a good reason for not allowing dynamically created lists to specify size, this should probably be removed.

On Apr 17, 2007, at 11:19 AM, <diona@knowmad.com> <diona@knowmad.com> wrote:
dionak wrote:

I'm using WebGUI::Form::DynamicField in a custom wobject. I don't appear to be able to adjust the size of the selectList. I'm passing in size as a hashref param but it doesn't appear to have an effect. Is it possible to adjust the size of a selectList using the DynamicField class?

$html .= WebGUI::Form::DynamicField->new($self->session, %{$properties} )->toHtmlWithWrapper; 

 


http://www.plainblack.com/webgui/dev/discuss/dynamicfield

Unsubscribe



-- 
Plain Black&#44; makers of WebGUIhttp://plainblack.com



Back to Top
Rate [
|
]
 
 
dionak
Perhaps this is best reported as a bug?


Back to Top
Rate [
|
]
 
 
colink
I remember that code from all the way back when WebGUI was in
CVS.  It's been around for a long time.  I would make this an
RFE, and that would allow JT to weigh in on anything that isn't obvious
on inspection.

Back to Top
Rate [
|
]
 
 
fdillon
Dione,
If it is something you need and are willing to contribute (fixing DynamicField.pm), email JT and ask him if he'd  be wiling to allow the change in the next release.  Otherwise this one might not see a change for quite some time.
On Apr 17, 2007, at 1:24 PM, <ckuskie@sterlink.net> wrote:
colink wrote:

I remember that code from all the way back when WebGUI was in
CVS.  It's been around for a long time.  I would make this an
RFE, and that would allow JT to weigh in on anything that isn't obvious
on inspection.

http://www.plainblack.com/webgui/dev/discuss/dynamicfield/3

Unsubscribe



-- 
Plain Black&#44; makers of WebGUIhttp://plainblack.com



Back to Top
Rate [
|
]
 
 
dionak

I submitted a bug report but I'll go ahead and create a patch, submit it as an RFE and email JT to cover all bases. 

Thanks. 



Back to Top
Rate [
|
]
 
 
JT
I didn't write that section of code. And I don't have any recollection of why size should not be allowed on dynamically created lists. Go ahead and change it for yourself, and submit an RFE with a patch for 7.4.

Back to Top
Rate [
|
]
 
 
dionak

Is this the correct command for checkout out from SVN?

svn co https://svn.webgui.org/svnroot/WebGUI

I'm getting the following: 

svn: PROPFIND request failed on '/svnroot/WebGUI'
svn: PROPFIND of '/svnroot/WebGUI': 405 Method Not Allowed (https://svn.webgui.org)

Btw, I just want to use this to create the patch against 7.4. 



Back to Top
Rate [
|
]
 
 
dionak

nvrmind. i should read my email more often.

svn co https://svn.webgui.org/plainblack/WebGUI



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved