Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Problem with passing primary key to modify form
Problem with passing primary key to modify form [message #1118547] Fri, 27 September 2013 10:17 Go to next message
katie evans is currently offline katie evans
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 11:10 Go to previous message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 640
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 11: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: Wed Jul 30 07:24:39 EDT 2014

Powered by FUDForum. Page generated in 0.01805 seconds