[Vtigercrm-developers] vt7: Inconsistency in views

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Vtigercrm-developers] vt7: Inconsistency in views

Alan Lord (News)
I am struggling a bit to achieve something in Edit View which was fairly
straightforward in Detail View.

I have vtlib module called, for example,  "SVS". There is a UI10 field
in this module which links to another module called, for example,
"Satellite".

In the Satellite module is various information and configuration data.
Once a Satellite has been selected in the SVS module I want to use some
of the information in the Satellite to limit values within a Picklist of
the SVS module.

In Detail View, this was fairly easy. I had to make some minor tweaks to
the Detail and Index View Classes of my module and it works just fine...
(I remove the values I do not want inside the setModuleInfo() function
call of the Index View),

However in Edit View the picklist values are not loaded until almost the
very final stage where the Picklist template is loaded and it calls for
(this is despite the fact that setModuleInfo() is called previously but
the info is ignored, so it is probably wasted cycles anyway):

> {assign var="FIELD_INFO" value=$FIELD_MODEL->getFieldInfo()}

> {assign var=PICKLIST_VALUES value=$FIELD_MODEL->getPicklistValues()}

(NB: you have a typo... Missing " around the PICKLIST_VALUES assignment)

I have come across this issue in the past where in the Field Model, I
have no way of finding/retrieving the parent RecordModel so I could
potentially do some processing of the Picklist values at the Field Model
level.

Anyone got a suggestions?

Cheers

Al

_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vt7: Inconsistency in views

Alan Lord (News)
On 21/02/17 10:09, Alan Lord wrote:
> I am struggling a bit to achieve something in Edit View which was fairly
> straightforward in Detail View.

Why is the uimeta var being populated in Edit View? I can't see it is
being used at all? So the setModuleInfo() call in the Edit View class
seems rather wasteful of resources to me?

Al


_______________________________________________
http://www.vtiger.com/
Loading...