Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[HELP HOWTO] form for a specific record in V2 (1:1) 16 Nov 2012 20:07 #5432

I've been trying to understand this at this post: www.j-cook.pro/forum/9-coding-inside-you...or-a-specific-record

It refers to how easy it is in V2, but doesn't explain how to do it in V2. As this example talks about, I want to display an edit form for the user where it's primary key is equal to $user->id instead of the value specified in the menu item for the component.

How can this be done in V2?

Please Log in or Create an account to join the conversation.

Re: [HELP HOWTO] form for a specific record in V2 20 Nov 2012 21:43 #5521

Found the answer for my implementation:

In protected function displayLicenseemaintenance (where I'm loading the form), I did this. In my component, the table "license" will always have an id equal to the current user_id, so I adjusted the state as follows:
protected function displayLicenseemaintenance
...
$this->model	= $model	= $this->getModel();
$this->state	= $state	= $this->get('State');
$this->state->{'licensee.id'} = $user->id;
It doesn't strike me as the "right" way of doing it, but it works :unsure:
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.074 seconds

Real time saver and great Component Builder tool ! I have been developing with J-Cook Pro Component Builder for several months now and can say with all honesty that this product/service is second to none. The product is feature rich and is being improved and added to all the time. Do yourself a favor if you need to build a Joomla! Component then you can do no wrong in trying the product. You will save on time and effort while being able to deliver your project on time. J-Cook pro does the hard work for you you then have the freedom to fully customise the end result for your own needs. 

One word: Awesome.
Edwardcox (JED)
         

Get Started