If we use optionsDatasource we get lookupField in the fieldGroup that I have been using frequently. However, How can we get the LookupPickerField instead inside a fieldGroup?
There i have created one entity Country. And an entity for Customer, customer has an ASSOCIATION to Country.
The default is a LookupField. Now in the code you can add features like Lookup, Open and Clear.
I use the same code as the example, but when I run the programm I get the following error:
com.haulmont.cuba.core.sys.javacl.compiler.CharSequenceCompilerException: Compilation failed. Causes:
OrderEdit.java:11: error: cannot find symbol
private PickerField clientField;
^
symbol: class PickerField
location: class com.company.workshop.web.order.OrderEdit OrderEdit.java:10: error: cannot find symbol
@Named("fieldGroup.client")
^
symbol: class Named
location: class com.company.workshop.web.order.OrderEdit
at com.haulmont.cuba.core.sys.javacl.compiler.CharSequenceCompiler.compile(CharSequenceCompiler.java:178)
at com.haulmont.cuba.core.sys.javacl.JavaClassLoader.loadClass(JavaClassLoader.java:167)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:677)
at this time I am not using intelliJ, I use only cuba studio editor.
After that, I closed the studio etc and restart again, then I tried to start the application server and I got again the following errors:
[22:27:35.290] Ready
[22:28:11.865] Restarting the application server
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_6jo8oxswb1bewvutm0guna9l3$_run_closure4.doCall(C:\Users\George\studio-projects\workshop\build.gradle:88)
:app-core:assembleDbScripts UP-TO-DATE
:app-core:dbScriptsArchive UP-TO-DATE
:app-global:compileJavaNote: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
:app-global:enhance
:app-global:processResources UP-TO-DATE
:app-global:classes
:app-global:jar
:app-core:compileJava
:app-core:processResources UP-TO-DATE
:app-core:classes
:app-core:jar UP-TO-DATE
:app-core:sourceJar UP-TO-DATE
:app-core:assemble UP-TO-DATE
:app-core:cleanConf
:app-core:deploy
:app-gui:compileJava UP-TO-DATE
:app-gui:processResources UP-TO-DATE
:app-gui:classes UP-TO-DATE
:app-gui:jar UP-TO-DATE
:app-web:compileJavaC:\Users\George\studio-projects\workshop\modules\web\src\com\company\workshop\web\order\OrderEdit.java:11: error: cannot find symbol
private PickerField clientField;
^ symbol: class PickerField
location: class OrderEdit
C:\Users\George\studio-projects\workshop\modules\web\src\com\company\workshop\web\order\OrderEdit.java:10: error: cannot find symbol
@Named("fieldGroup.client")
^ symbol: class Named
location: class OrderEdit
2 errors
FAILED
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task '
:app-web:compileJava'.
> Compilation failed; see the compiler error output for details.
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 25.979 secs [22:28:39.052] Task 'deploy, start' failed
org.gradle.api.internal.tasks.compile.CompilationFailedException:
Compilation failed; see the compiler error output for details.
I would recommend using IntelliJ community. It will help you solve any import errors.
If you want me to help you further, you have to upload the project without the build folder.
Studio is not aimed at normal Java development. Please always use Eclipse or Intellij for your business logic development. You can easily go to the IDE using Ctrl + I shortcut in the Screen Designer or using IDE buttons in the navigation panel.