Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » FormData not generated
FormData not generated [message #1740490] Sun, 14 August 2016 21:23 Go to next message
Luka Cavic is currently offline Luka CavicFriend
Messages: 25
Registered: August 2014
Junior Member
Hi, I have noticed that Scout does not generate FormData sometimes.

For example, I create a new form UserForm, then I set private property iduser, set getters and setter, and add @FormData and it is ok, Iduser is accesible in FormData..

Then I close window, and opet UserForm again after, make the same thing, create new property someProperty, set getters and setters, append @FormData, but then someProperty is not avaliable in FormData class...

Is thre a way to update it or to edit formData and add it manualy...?

The same is true for TableData.

Thanks!
Re: FormData not generated [message #1740492 is a reply to message #1740490] Mon, 15 August 2016 03:49 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1237
Registered: October 2011
Senior Member
It should work as you have described.

Are the getter and setter public?
Can you send an example of the property that is not working?

--------

To force the generation of the FormData:

Have you tried the "Scout" Menu (in the menu bar): "Update all derived resource..." or "Update all derived resource in selected scope..."

--------

In the preferences (under the scout page) have you checked if the Checkbox "Automatically update generated classes" is checked?
Re: FormData not generated [message #1740499 is a reply to message #1740492] Mon, 15 August 2016 08:22 Go to previous messageGo to next message
Luka Cavic is currently offline Luka CavicFriend
Messages: 25
Registered: August 2014
Junior Member
Hi, Thanks for answer. When I run "Update all derived resource..." I get this error. In preferences the checkbox is selected.

This is property in form.

	private int countWorkLog;


@FormData
	public int getCountWorkLog() {
		return countWorkLog;
	}

	@FormData
	public void setCountWorkLog(int countWorkLog) {
		this.countWorkLog = countWorkLog;
	}


[SEVERE]: Error while: Update DTO for 'com.sample.sysdba.client.settings.projects.ProjectsForm'.
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.eclipse.scout.sdk.core.model.api.internal.WrappedList.get(WrappedList.java:66)
at org.eclipse.scout.sdk.core.util.CoreUtils.getResolvedTypeParamValue(CoreUtils.java:556)
at org.eclipse.scout.sdk.core.util.CoreUtils.getResolvedTypeParamValue(CoreUtils.java:537)
at org.eclipse.scout.sdk.core.util.CoreUtils.getResolvedTypeParamValueSignature(CoreUtils.java:514)
at org.eclipse.scout.sdk.core.s.util.DtoUtils.getColumnValueTypeSignature(DtoUtils.java:93)
at org.eclipse.scout.sdk.core.s.sourcebuilder.dto.table.TableRowDataTypeSourceBuilder.setup(TableRowDataTypeSourceBuilder.java:123)
at org.eclipse.scout.sdk.core.s.sourcebuilder.dto.table.TableRowDataTypeSourceBuilder.createSource(TableRowDataTypeSourceBuilder.java:71)
at org.eclipse.scout.sdk.core.sourcebuilder.type.TypeSourceBuilder.createTypeContent(TypeSourceBuilder.java:179)
at org.eclipse.scout.sdk.core.sourcebuilder.type.TypeSourceBuilder.createSource(TypeSourceBuilder.java:137)
at org.eclipse.scout.sdk.core.sourcebuilder.type.TypeSourceBuilder.createTypeContent(TypeSourceBuilder.java:179)
at org.eclipse.scout.sdk.core.sourcebuilder.type.TypeSourceBuilder.createSource(TypeSourceBuilder.java:137)
at org.eclipse.scout.sdk.core.sourcebuilder.compilationunit.CompilationUnitSourceBuilder.createSource(CompilationUnitSourceBuilder.java:113)
at org.eclipse.scout.sdk.core.util.CoreUtils.createJavaCode(CoreUtils.java:871)
at org.eclipse.scout.sdk.s2e.util.S2eUtils.createJavaCode(S2eUtils.java:1188)
at org.eclipse.scout.sdk.s2e.internal.dto.DtoDerivedResourceHandler.newDtoOp(DtoDerivedResourceHandler.java:79)
at org.eclipse.scout.sdk.s2e.internal.dto.DtoDerivedResourceHandler.runImpl(DtoDerivedResourceHandler.java:51)
at org.eclipse.scout.sdk.s2e.trigger.AbstractDerivedResourceHandler.run(AbstractDerivedResourceHandler.java:30)
at org.eclipse.scout.sdk.s2e.internal.trigger.DerivedResourceManager$P_RunQueuedTriggerHandlersJob.run(DerivedResourceManager.java:509)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: FormData not generated [message #1740501 is a reply to message #1740490] Mon, 15 August 2016 09:03 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1237
Registered: October 2011
Senior Member
As I expected, your problem has nothing to do with your getter and setter. When I copy your code in the HelloWorld Form, the corresonding code is generated in the FormData:

@Generated(value = "com.company.example.helloworld.client.helloworld.HelloWorldForm", comments = "This class is auto generated by the Scout SDK. No manual modifications recommended.")
public class HelloWorldFormData extends AbstractFormData {

	private static final long serialVersionUID = 1L;

	/**
	 * access method for property CountWorkLog.
	 */
	public int getCountWorkLog() {
		return getCountWorkLogProperty().getValue() == null ? 0 : getCountWorkLogProperty().getValue();
	}

	/**
	 * access method for property CountWorkLog.
	 */
	public void setCountWorkLog(int countWorkLog) {
		getCountWorkLogProperty().setValue(countWorkLog);
	}

	public CountWorkLogProperty getCountWorkLogProperty() {
		return getPropertyByClass(CountWorkLogProperty.class);
	}

	public static class CountWorkLogProperty extends AbstractPropertyData<Integer> {

		private static final long serialVersionUID = 1L;
	}

	//... other content
}


I have transmitted your message (thanks for the Stacktrace) to the SDK Dev-Team.

It would help if you could reduce your not working example, to minimal Form that can be shared on the forum.
Re: FormData not generated [message #1742566 is a reply to message #1740499] Mon, 05 September 2016 09:05 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 111
Registered: September 2011
Senior Member
Hi Luka

Can you please share de code (remove all sensitive/business logic lines of code) of the Form causing problems.

Thank you very much.
Re: FormData not generated [message #1742570 is a reply to message #1742566] Mon, 05 September 2016 10:09 Go to previous message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 111
Registered: September 2011
Senior Member
I also created bug 500849 to track this issue.

And I already found an issue that may caused your problems. It should be fixed with Neon.1 RC3. Can you please test if this solves your issues?

Thank you for reporting this!

Matthias
Previous Topic:Copy to Clipboard
Next Topic:[NEON] Key Generation with secp256k1
Goto Forum:
  


Current Time: Sat May 27 15:41:49 GMT 2017

Powered by FUDForum. Page generated in 0.04354 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software