views

How to get CakePHP to render plain text with line feeds?

I need one of my controller actions to return a list of names, on name per line, as plain text. The reason for this is so that it can be consumed by the JQuery autocomplete plugin which expects this format. Unfortunately, when the page renders, the \n characters won't render as newlines. Controller function UserController extends App...

How do I use a correlated sub query for a new column in my view?

Hi, I am trying to write a view that has 3 columns: Planet, Moon, and Largest. The view is meant to show planets, their moons, and a Yes or No column indicating whether or not it is the largest moon for the planet. Only one Basetable is used, and the columns I am referencing are moonPlanetOrbit (only not null if bodyType is = to 'Moon'...

Refresh MySQL views?

At work I'm constantly being told that when changes are made to a MySQL db that the views need to be 'refreshed'. The accepted manual solution seems to be going into Workbench, right clicking, and hitting 'Refresh All' Is this just meant to be clearing the cache? Or does that rebuild the views from scratch, or is this totally bogus? The...

Creating and Destroying Objects for passing between Views

Overview of app My RVC has an object of custom type 'Entry' that has various values (AssetURL, Notes for item). I pass an instance of this to two viewControllers in order to add information about the Entry into this instance for saving. I do this successfully, but am unsure about how I should be creating / destroying my objects. If I ...

Drupal exposed view

is there a way to not display any results initially until the form has been submitted? Also, I cant see where I can override the exposed form ...

Drupal views 2 Feed display adds surrounding html to items

I have a view that has a Default display and a Feed display. When I go to the url of the page, it displays the info ok, but I have a JwPlayer flash file that's trying to read that xml. The problem is Drupal is surrounding each element with a bunch of divs and classes that I don't want. I just want to have the path to some audio files and...

Views VS Tables For "facebook" like feed

Hey Guys, I am currently designing a dashboard feed that functions similar to the facebook feed. The feed will contain the following: Notify user of new users Show referrals sent to users, referrals received News from the administrator Up comming events. Each of the above is stored in it's own table but on the feeds page, they shoul...

Drupal: what's the simliar way of views_embed_view() for embeding a Panel page?

hi, i use to use views_embed_view API function to load views automatically. now i need to load a panel content problematically; but i could not find a function like views_embed_view. is there such a thing at all? is there something like panels_embed_page or is it related to ctools? ...

Switching between Views in Android

Hi there In my android game I want to display a screen when it loads up with my logo saying I built the game, then after a few seconds I want this to switch to the menu screen, and then after a game is started, the screen changes to the game screen for the action to start. I looked in to ViewFlipper but I have since concluded this is n...

Magento - How to pull a configurable product view into a template

I have a template file under the 'page' directory. This template has been assigned to be a category's 'Page Layout' through the backend. In this template I have a configurable product object. The following pulls in the view, but all it has in it is the product's name and short description. $prod = /* get product object here */; $layo...

Android string and layout editors in Eclipse-ADT frequently crash

I recently started programming for Android using the Eclipse ADT. What I am frequently observing is, that when I open some Android .xml file (e.g. res/strings.xml or some res/layout/<...>.xml file) that there are NullPointerExceptions. One can then still edit the file in source mode, but the convenient Resources-tab or the Layout-tab, r...

Dynamic Appending of Views and crashing

Hey everyone, again! Having another issue, and this one is BAFFLING! Here we go. We have a layout... <?xml version="1.0" encoding="utf-8"?> <!-- Template for creating a result in MediaUpload --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_heigh...

Handling multiple alert views in iPhone/iPad application

Hi All, I am working on an application that involves communication between two devices. When device#1 seeks to communicate with device#2, it first sends a request message. Upon receiving the message, device#2 informs the user that a person wishes to communicate with it. If the user is interested in receiving the data, he choses Yes ot...

How to handle role-based views in MVC?

Regardless of the language or MVC framework used, how should I handle different views based on roles? For example (pseudo code): views/post/show: <% show post here %> if (role.isAdmin or role.isModerator) { <% show moderation tools %> } <% show rest of content %> I don't quite like the idea of putting too much business logic into...

View with a page using arguments wtih a path using %

Hi, I've just started using Drupal and I must admit its brilliant. Im still finding my way around it, so this might be a stupdi question, but Id like to know what the best and least perofrmance impacting way to achieve the below. I have created a view with the "Node: Nid" argument to bascially list certain information about additioanl ...

CodeIgniter: View doesn't load if I use die() function.

Hi, I have the following code. Checks if the user is logged in or not. When the variable $is_logged_in is not set or is False, I load a message view. Unfortunately, at the same time the system loads the restricted content view. So I used die() function, and now only shows a blank page. What can I do to only load the message view when t...

Drupal Views - Custom Theme for a field

Two quick questions regarding custom theming of view fields in Drupal 6 - (a) I know that we can include a custom theme for a view field in a appropriately named template file but I notice that it has to be placed in the theme folder. However, I want this theme file to be bundled with my module and was wondering if it could be done so...

"Parent Key Not Found" although it exists (within the TX)

I just observed a strange behaviour (of course Oracle is probably supposed to behave this way, but it didn't fit in my world view yet): I try to insert two rows into a parent and a child table, both within the same transaction: INSERT INTO V_Parent (ID, Name) VALUES (777, 'Hello World'); INSERT INTO T_Child (ParentID, Name) VALUES (777...

Linear navigation in WPF MVVM

Hi, I'm using the Cinch MVVM framework, however I think this is something that relates to all WPF approaches. I want to have a primary screen - Shell or MainWindow - which then contains various viewmodels. To navigate between viewmodels I'm using (or going to use) a tab control styled as a button strip with the content area beneath - w...

Taxonomy view with nodes

Using Drupal 6, I'm trying to create a page with views that shows something like the following: -Taxonomy Term 1 -- Title and description of a node that contains this term -- Title and description of a node that contains this term -Taxonomy Term 2 -- Title and description of a node that contains this term -- Title and descr...