Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] html.fly.enum of Foreign key doesn't work

[FIXED] html.fly.enum of Foreign key doesn't work 21 Jun 2012 06:54 #2600

  • Tomaselli
  • Tomaselli's Avatar
  • Offline
  • Elite Member
  • Posts: 293
  • Thank you received: 87
  • Karma: 46
in a grid view, I wanna show a value of a enumeration field of a foreign key.
The Jdom doesn't work on this.
I simply replaced the:
				<?php echo JDom::_('html.fly.enum', array(
												'dataKey' => '_FOREIGN_ENUM',
												'dataObject' => $this->MYITEMVIEW,
												'list' => $this->lists['enum']['MYCOMPONENTTABLE.MYFOREIGNKEY'],
												'listKey' => 'value',
												'labelKey' => 'text'
												));
				?>

with:
<?php echo $this->MYITEMVIEW->_FOREIGN_ENUM; ?>

and it perfectly shows the value.
Last Edit: 25 Jul 2012 13:48 by admin.
The administrator has disabled public write access.

Re: html.fly.enum of Foreign key doesn't work 21 Jun 2012 07:13 #2602

  • Tomaselli
  • Tomaselli's Avatar
  • Offline
  • Elite Member
  • Posts: 293
  • Thank you received: 87
  • Karma: 46
Ok, that just shows the value.
I found something wrong in the view.html.php of that view.

In the view.html.php I have:
$lists['enum']['FOREIGN_TABLE.FIELD'] = MYCOMPONENTHelper::enumList('FOREIGN_TABLE', 'FIELD');

and in the view I have:
				<?php echo JDom::_('html.fly.enum', array(
												'dataKey' => '_DATABASE_LABEL_FOREIGN_FIELD',
												'dataObject' => $this->ITEMVIEW,
												'list' => $this->lists['enum']['THISTABLE.FOREIGN_TABLE_ID'],
												'listKey' => 'value',
												'labelKey' => 'text'
												));
				?>

the:
'list' => $this->lists['enum']['THISTABLE.FOREIGN_TABLE_ID']

it's wrong. it should be:
'list' => $lists['enum']['FOREIGN_TABLE.FIELD']
The administrator has disabled public write access.

Re: html.fly.enum of Foreign key doesn't work 22 Jun 2012 12:49 #2612

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
Yes, You are right.

It is now solved, but I cannot upgrade now the fix.

As you know, I am working on the 2.0 version, and the current version is migrating, so it is bit difficult to make easily the updates on the old version. (Still some conflicts)

If I upgade now, there will be some collateral bugs duing of the 2.0 evolution.
So, I am working on this and when everything is good, I will upgrade to 1.4.15

stay in touch.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: html.fly.enum of Foreign key doesn't work 22 Jun 2012 13:44 #2617

  • Tomaselli
  • Tomaselli's Avatar
  • Offline
  • Elite Member
  • Posts: 293
  • Thank you received: 87
  • Karma: 46
Thanks,
I hope to see the jcook 2.0 soon :) .
The administrator has disabled public write access.

Re: html.fly.enum of Foreign key doesn't work 25 Jun 2012 09:48 #2645

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
Me too !!!

I am so tired at the moment !!
Too much work to do...
Coding is now a piece of cake
The administrator has disabled public write access.

Re: html.fly.enum of Foreign key doesn't work 27 Jun 2012 09:05 #2702

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
Fixed.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: html.fly.enum of Foreign key doesn't work 27 Jun 2012 09:10 #2705

  • Tomaselli
  • Tomaselli's Avatar
  • Offline
  • Elite Member
  • Posts: 293
  • Thank you received: 87
  • Karma: 46
great! thanks. I saw it.
The administrator has disabled public write access.
Time to create page: 0.123 seconds

Get Started