Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

I

...

ran

...

into

...

an

...

interesting

...

problem

...

today

...

in

...

v3.1

...

that

...

I

...

thought

...

I

...

might

...

share

...

with

...

the

...

community.

...

I

...

had

...

previously

...

built

...

a

...

Form

...

that

...

used

...

a

...

Bean

...

Shell

...

Form

...

Binder

...

to

...

load

...

data

...

into

...

the

...

form

...

fields.

...

My

...

requirements

...

changed

...

so

...

I

...

needed

...

to

...

remove

...

the

...

Form

...

Binder

...

binding.

...

When

...

I

...

did

...

that,

...

the

...

UI

...

seemed

...

to

...

indicate

...

that

...

everything

...

had

...

been

...

changed

...

correctly,

...

but

...

when

...

I

...

went

...

to

...

run

...

my

...

process,

...

I

...

found

...

that

...

the

...

form

...

fields

...

were

...

still

...

loading

...

the

...

data

...

as

...

if

...

the

...

Bean

...

Shell

...

Form

...

Binder

...

was

...

still

...

bound.

...

I

...

tried

...

changing

...

it

...

to

...

a

...

Workflow

...

Form

...

binder,

...

but

...

it

...

didn't

...

change

...

the

...

behavior.

...

I

...

also

...

tried

...

changing

...

the

...

source

...

within

...

the

...

Bean

...

Shell

...

and

...

that

...

didn't

...

work

...

either.

...

It

...

turns

...

out

...

that

...

JSON

...

Definition

...

that

...

the

...

form

...

is

...

built

...

off

...

of

...

wasn't

...

getting

...

updated

...

when

...

I

...

changed

...

the

...

Form

...

Binder.

...

Under

...

the

...

'ADVANCED:

...

JSON

...

Definition'

...

at

...

the

...

bottom

...

of

...

the

...

Form

...

editor,

...

I

...

had

...

to

...

manually

...

remove

...

the

...

BeanshellFormBinder

...

class

...

and

...

script

...

property

...

from

...

the

...

JSON

...

itself.

...

When

...

I

...

did

...

that,

...

things

...

started

...

working

...

properly.

...

This

...

might

...

be

...

a

...

bug

...

in

...

the

...

Joget

...

Core

...

software.

...

Example:

From:

Code Block


From:

 "className":"org.joget.apps.form.model.Section",
         "properties":{
            "id":"reviewPhoneSection",
            "loadBinder":{
               "className":"org.joget.apps.form.lib.BeanShellFormBinder",
               "properties":{
                  "script":"import org.joget.apps.app.service.*;\nimport org.joget.apps.form.model.*;\nimport org.joget.apps.form.service.*;\nimport java.util.*;\n\nSystem.out.println(\"looking at results\");\npublic FormRowSet getData() {\n\n    FormRowSet results = null;\n\n    if (results == null) {\n        results = new FormRowSet();\n    \n\tFormRow row = new FormRow();\n        row.put(\"carrier\", \"ATT\");\n\trow.put(\"groupName\", \"1234\");\n\tresults.add(row);\n    }\n\n    return results;\n}\n\nreturn getData();"
               }
            },
            "visibilityControl":"",
            "regex":"",
            "visibilityValue":"",
            "storeBinder":{
               "className":"",
               "properties":{
               }
            },
            "label":"Review Phone",
            "permission":{
               "className":"",
               "properties":{
               }
            },
            "elementUniqueKey":"132399"
         }

{code}
 "className":"org.joget.apps.form.model.Section",

         "properties":{

            "id":"reviewPhoneSection",

            "loadBinder":{

               "className":"org.joget.apps.form.lib.BeanShellFormBinder",

               "properties":{

                  "script":"import org.joget.apps.app.service.*;\nimport org.joget.apps.form.model.*;\nimport org.joget.apps.form.service.*;\nimport java.util.*;\n\nSystem.out.println(\"looking at results\");\npublic FormRowSet getData() {\n\n    FormRowSet results = null;\n\n    if (results == null) {\n        results = new FormRowSet();\n    \n\tFormRow row = new FormRow();\n        row.put(\"carrier\", \"ATT\");\n\trow.put(\"groupName\", \"1234\");\n\tresults.add(row);\n    }\n\n    return results;\n}\n\nreturn getData();"

               }

            },

            "visibilityControl":"",

            "regex":"",

            "visibilityValue":"",

            "storeBinder":{

               "className":"",

               "properties":{



               }

            },

            "label":"Review Phone",

            "permission":{

               "className":"",

               "properties":{



               }

            },

            "elementUniqueKey":"132399"

         }

To

Code Block
{code}
To

{code}
 "className":"org.joget.apps.form.model.Section",

         "properties":{

            "id":"reviewPhoneSection",

            "loadBinder":{

               "className":"",

               "properties":{

               }

            },

            "visibilityControl":"",

            "regex":"",

            "visibilityValue":"",

            "storeBinder":{

               "className":"",

               "properties":{



               }

            },

            "label":"Review Phone",

            "permission":{

               "className":"",

               "properties":{



               }

            },

            "elementUniqueKey":"132399"

         }
{code}