Load empty values from referenced node in Views (Drupal 7) - drupal-7

I have a view displaying nodes of two content types. The nodes all have a cck field made with Entity Reference referencing a "parent" node. If the displayed node in the view has an empty value, the view should display the value in the parent node. Simple as that.
The filters should also be able to filter on the parent's values...
I'm thinking it should be solved with handlers somehow, but I'm having a lot of trouble finding my way through the documentation. Could anybody please help?
I'm working with Drupal 7.14, Views 7.x-3.3 and Entity Reference 7.x-1.0-rc3+2-dev.
-- Mikkel

Related

How can I ensure that NSOutlineView.parent(forItem:) returns the correct parent object if the same child object exists multiple times?

I have just encountered a problem when using NSOutlineView and wonder is anyone has a solution.
I have a hierarchy of items and the lowest nodes are objects that can appear in more than one location.
For example:
Country
Town
Car Manufacturer
USA
Chicago
Toyota
Dallas
Toyota
Now if the user selects the 'Toyota' items in the list and if I then try and find the parent for the selected item using the outlineView.parent(forItem:) API it will always return the same parent item, presumably the first one it encounters.
It seems that outlineView does not independently keep track of the parent item when loading data from the data source.
Presumably the only way to overcome this would be to create some sort of unique wrapper object, a struct maybe, at each node to hold the common object.
Anyone have any idea what methods NSOutlineView uses to find the parent of a given object?
From NSOutlineView Class Reference (emphasis mine):
An outline view has the following features:
A user can expand and collapse rows.
Each item in the outline view must be unique. In order for the collapsed state to remain consistent between reloads the item's pointer must remain the same and the item must maintain isEqual: sameness.

ADF tree binding issue

I'm using 3 levels tree VO's. All three VO's has bind variables. The VO's are connected via View link. I'm using createViewLinkAccessorRS in order to pass the variables from parent to child VO.. i defined Target Data Source (EL_expression) for second and third level.The tree works fine, and the nodes filled correctly (all the way down). The Problem is that the second and the third tree level attributes are only shown in the tree component. anywhere else in the page it looks like they are empty ({bindings.(attname).inputValue} = null) (E.g - after dragging the third tree level "FlowOrder" from the AppModuleDataControl and create a form out of it, and selecting the second node of the tree will update all the third level tree node (please see attached image), but will leave the entire form which was just created empty)
Any idea why the FlowOrder bindings are empty? i assume that maybe it has to do with the bind variable of the VO .. i even thought i would change the tree selection listener so on the second level click it will perform a full query of "FlowOrder" via executewithparams, but it does not make any sense because the data was fetched already after clicking level 2 tree)
(Jdeveloper : 12.2.1.2.0)
attached image: Details
Check out my explanation on trees and example application in another post: ADF filter table based on tree selection The tree shows data from view link accessors. The form shows data from view instance. They are in different state.

ExtJS 6.5 Treegrid with different model for Parent and Child

I am loading a dynamic treegrid with children loading only after expanding the tree column (separate rest call). The parent model is different from the child model other than the shared Key. I am able to do load the parent tree store. I was also able to load and add childnodes to the parent node. When i expand the treecolumn, i only see the shared Key but not the other columns of the childnode. Can the loaded child node have its own model ? Also, is there a way to display the childnode column names in a separate grid-like view ?
Thanks.

Calculated View Object Attribute not able to be used in JSPX page

Hello I have a View Object "Validationerrortallygroupsview" In this VO I have a calculated attribute that is generated by a join in the query. The calculated attribute is RuleName1 (RULE_NAME alias).
Here is where I show the attributes:
The SQL query that backs this View Object has a join with another table and this join is what generates this extra RULE_NAME attribute:
The SQL Query tests fine and everything but when I go to my JSPX page to actually reference this attribute using EL, the new attribute doesn't show up in the variable.
I have a row variable that is simply used to iterate through the bindings for a table Control, ruleName1 is not an element that I can choose off of that variable, I can only choose the Attributes that were defined originally as part of the Entity:
Can you check the tree binding whether the attribute "RuleName1" is present or not ? If not , you may need to refresh the data control once and add it to attribute list of the tree binding .
Drag&Drop that property from your DataControl, or better the whole form/table in a clean page to see what is going on.

Can't see custom CCK field in view

I created a content type a while ago, and a view to filter it. I just added a field to that content type. When I try to add a filter to the view, the field that I just created isn't in the list. If I create new content of that type, I can see the new field, but not from the view. I deleted and recreated the field, changing the type of field, and have cleared cache. I've also tried creating another view, and still can't see that field. I can see all other custom fields, though.
Is the field you added a taxonomy or node reference? You may need to add a relationship to the referenced entity in order to get it to show up under the view fields.
Click "Add" beside "Relationships", and see if the entity type you are referencing is in that list... add the reference, then go back to adding fields and see if it shows up in your list.

Resources