Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect field types to variables #263

Open
rallek opened this issue Feb 9, 2013 · 4 comments
Open

connect field types to variables #263

rallek opened this issue Feb 9, 2013 · 4 comments

Comments

@rallek
Copy link

rallek commented Feb 9, 2013

for example the upload field:
in upload you have the property "Allowed File Size"
It would be great to have this property inside the main tools "Variables"

How can this be done?
e.g. "Allowed File Size" must be 0
than you have to create a Container "Variables" in your model with an integer Var type.
Beside the Basic Data with the default Value there should be "Further options"

  • entity
  • entity field

The validator will check if the entity field exists and the var type of the entity field is matching the choosen var type in the variables container.

Other fields of upload where this relation can be usefull:

  • Allowed File Extensions
  • Regular Expression
  • Sub Folder Name (with check if it exists and is writable)

This might be also be usefull for other fields with "further options" but mostly for upload

@rallek
Copy link
Author

rallek commented Nov 1, 2013

Make it more easy and intuitiv: If in a default value is a "myvariable" and myvariable exists as a variable the generator is using the variable.

@ghost ghost assigned Guite Nov 6, 2013
@rallek
Copy link
Author

rallek commented Jan 19, 2014

example: in mostapp we do have today e.g.

upload uploadFile {
    documentation "select a file for uploading"
    mandatory true
    allowedFileSize 102400
    allowedExtensions "pdf, zip, doc, docx, xls, xlsx"
}

if a link to a variable is possible it should look like:

upload uploadFile {
    documentation "select a file for uploading"
    mandatory true
    allowedFileSize #myFileSize#
    allowedExtensions "#myExtensions#"
}

and we declare a variable

textVar myExtensions {
        documentation "the file extensions allowed"
        value "pdf, zip, doc, docx, xls, xlsx, gif, jpeg, jpg, png"
    },
vars {
        intVar myFileSize {
        documentation "the maximum file size allowed"
        value "102400"
    }

This are typically work I have to do for my small modueles. This would be a very wellcome feature :-)

@Guite Guite modified the milestones: Enhancements, Future Aug 27, 2014
@rallek
Copy link
Author

rallek commented Sep 26, 2015

At the moment this ticket is my biggest whish. One more idea how to do.
If I declare one field for an entity there is in MOST on the right the area to adjust the propperties of the field. Allways if the field do offer the possibility to give a default value I propose to have an additional field named defaultVarialble. This have not to be declared in the variable container but will be gernerated as a variable and insted of the default value in the themplates we will have the varibale addressed. That would be great to have :-)

@rallek
Copy link
Author

rallek commented Jan 8, 2017

if #887 is the way you are willing to implement, #263 can be closed.

@Guite Guite modified the milestones: 0.7.2, 0.7.3 Feb 3, 2017
@Guite Guite modified the milestones: 0.7.3, 0.7.4 Feb 14, 2017
@Guite Guite modified the milestones: Future, 0.7.4, 0.8.0 Apr 23, 2017
@Guite Guite modified the milestones: 1.1.0, 1.2.0 Oct 30, 2017
@Guite Guite modified the milestones: 1.2.0, 1.3.0 Dec 8, 2017
@Guite Guite modified the milestones: 1.3.0, 1.4.0 Dec 23, 2017
@Guite Guite modified the milestones: 1.4.0, 1.5.0 Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants