Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Problem with passing primary key to modify form
Problem with passing primary key to modify form [message #1118547] Fri, 27 September 2013 14:17 Go to next message
katie evans is currently offline katie evansFriend
Messages: 28
Registered: July 2012
Location: brisbane queensland austr...
Junior Member
Hello,

I'm currently generating a search Form similar to the tutorial
http://wiki.eclipse.org/Scout/Tutorial/3.9/Minicrm/Add_a_form_to_edit_the_data#Load_the_data_for_the_form

At some point I have to pass the primary key with the following code:

public void execAction()  throws ProcessingException {
  CompanyForm form = new CompanyForm();
  // Notice the following line
  form.setCompanyNr(getCompanyNrColumn().getSelectedValue());
  form.startModify();
  form.waitFor();
 
  if (form.isFormStored()){
    reloadPage();
  }
}


My Problem is with the mentioned "following line". It is not generated automatically - ok no problem was my thought, I do it on my own. But then the "form.setCompanyNr()" method is missing - there is no useful quickfix available.
I clicked on "create method" but then i was a bit helpless where to set the data...

So do I have to generate the "setCompanyNr" method on my own - or should it be done automatically and I made something wrong. In case I have to write it manually do you have a hint for me, where to set the key in this method.

Regards Silvan

Re: Problem with passing primary key to modify form [message #1118590 is a reply to message #1118547] Fri, 27 September 2013 15:10 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Hi,

Do you have a variable CompanyNr (getter, setter and a field)? You can see it in the Scout SDK:

index.php/fa/16319/0/

If not you can add it by selecting "New Property Bean..." in the context menu of the "Variables" folder.

I hope this helps...

[Updated on: Fri, 27 September 2013 15:11]

Report message to a moderator

Previous Topic:Show proposal form on SmartColumn in table
Next Topic:How to run/debug scout SDK from source?
Goto Forum:
  


Current Time: Thu Apr 25 14:32:24 GMT 2024

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

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

Back to the top