Welcome Guest, Not a member yet? Register   Sign In
Nested View: Pass variable so that correct query results returned
#3

[eluser]Tumac[/eluser]
I will look through those in a little more detail. From a "codespeak" standpoint, you are right - I am using html/php views to display data from a model. Now since I am beginning with CI and MVC, I still am processing some code at the view level that eventually could be done in the model. Until I get better, I am going to go with what I know works and is technically acceptable.

Now to try and clarify:

- Model collects data and returns to "main view".
- Main view creates a tabbed container based on number of records sent from model. Tabbed container is JS tabs
- The content area of each tab is query records generated by a model that contain more detail specific to the "customer tab".
- Right now, as the code sits, each Tab content returns ALL the records from the model. I want to display only those records that belong to the customer on the tab.

Does that make more sense. My trouble is that since JS is parsing and creating the tabs, when I call the view to deliver the query, I need to be able to compare the customer with the data from the model to display only that customers records.

I am still hacking at it, but thought I would throw it out here. It is almost like when I click the tab, the tab throws a new variable back to the model that creates the subview. My thinking is that maybe I have multiple datasets from the model (multiple functions returning data), sending the array of datasets to the model to parse which one it needs and somehow determine which one to show.

I am sure that just made it go from murk to mud.


Messages In This Thread
Nested View: Pass variable so that correct query results returned - by El Forum - 12-17-2009, 01:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB