Screen structure reference for filepicker-ed images [message #1375] |
Thu, 19 June 2008 18:28 |
ikatz
Messages: 40 Registered: December 2007 Location: Durham, NH
|
Member |
|
|
I'm working on a multi2 transaction that links images (inner table) to the record in the outer table. The images are chosen by a filepicker transaction.
I am looking for the documentation on screen structure concerning images. Currently, the multi2 transaction is displaying a very wide textbox with the image filename as well as the ">>" button for me to choose a different image. I want this field to display the thumbnailed image, like it does by default in a list1 transaction.
I have tried marking the image field noedit in attempts to get rid of the very wide textbox, but it does not seem to make a difference.
This brings up a second question, which is how to completely refresh a multi2 screen. I've noticed that while I edit the screen structure, dict, and class files, the rows of data in the multi2 do not always pick up the new values -- even though the changes to the screen structure (column titles, widths) take effect immediately. I've tried the reset button, cancelling and re-visiting, creating a new session, etc... pretty much everything I can think of short of logging off and back on.
What steps do you go through to completely reload a multi2 screen and its data after you have made a change to the underlying class, dict, or control script?
|
|
|
Re: Screen structure reference for filepicker-ed images [message #1376 is a reply to message #1375] |
Fri, 20 June 2008 05:35 |
AJM
Messages: 2369 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Here are some answers:
(a) If a field is defined with a long length, say 80 characters, but when it is displayed on the screen you want the textbox to be shorter, say 40 characters, you have to modify your screen structure file to provide a size override, as in:
$structure['main']['fields'][] = array('picture' => 'Picture', 'size' => 40);
This is documented in http://www.tonymarston.net/php-mysql/model-view-controller.h tml#xsl-structure-detail.
(b) By default a field which has 'subtype' => 'image' and 'control' => 'filepicker' will display both the image and the text, but the text can be omitted by amending the $fieldspec values within your _cm_changeConfig() method:
$this->fieldspec['picture']['notext'] = 'y';
This is documented in http://www.tonymarston.net/php-mysql/data-dictionary.html#$f ieldspec in the 'subtype' section.
(c) If you run a task, then change some code or screen structure settings, it may not be enough just to hit the 'refresh' button in your browser - you may have to exit the task and restart it so that it can redo its initialisation procedure. This procedure is only performed when the task is first initialised and omitted on subsequent iterations (until the task is terminated).
(d) By default the session data on each task is dropped when the task terminates so that the initialisation procedure can be performed when the task is next activated, but this behaviour can be overridden by setting 'Keep data on exit' to YES on the task's details in the MENU database. This will allow you to leave the task, but when you return to it it will resume from where it left off instead of starting from scratch. If this setting is YES there are two ways to force the task to be re-initialised:
- log off and on again
- go to the Home page, press the 'Session Data' button, select 'Drop Saved Pages' and hit 'submit'.
I hope this helps.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
Re: Screen structure reference for filepicker-ed images [message #1377 is a reply to message #1376] |
Mon, 23 June 2008 13:54 |
ikatz
Messages: 40 Registered: December 2007 Location: Durham, NH
|
Member |
|
|
Thanks for your detailed response!
My problem was that I had omitted the 'subtype' => 'image' from my fieldspec. Also, I had not realized that the textbox width could be varied -- so now I have it narrow enough that it looks nice where it is.
|
|
|