view

How to modify partial, depending on controller it's viewed from?

I'm using a partial from my "messages" controller in my "tags" controller. The portion in question looks like this: <% unless message.tag_list.nil? || message.tag_list.empty? %> <% message.tags.each do |t| %> <div class="tag"><%= link_to t.name.titleize, tag_path(t) %></div> <% end %> <% end %> Is there a way to hide...

iPhone Utility Application Convert to View Based Application

Hello everyone, I have a an utility application that was built for the iPhone SDK on Xcode. However, I need to incorporate the application code into my View Based Application. What I am trying to do is create a button on my View Based Application, that will initiate the code that was meant in the utility application. Somehow this all is...

django url - link problem

i have an application, and in my urls.py i have something like that: urlpatterns = patterns('', url(r'^profile_view/(?P<id>\d+)/$', profile_view, name='profile_view'),) meaning that the profile_view function has id as a parameter. Now, i want to call that functio...

Composite Views and View Controllers

Hi, I'm somewhat new to Android and am in the process of designing an application with a couple fairly complex views. One of the views is intended to involve a complex view displaying information associated with model objects and segregated into several different views; the navigation of which is meant to be achieved using sliding effe...

Jquery onclick change value

I have some jquery tabs on my page the code for them is: //tabs options $("#tabs").tabs({ collapsible: true, selected: -1 }); I want to create a button that will toggle the above option 'selected: -1' I need it to change the value of 'selected' to '0' then back to '-1' How would I do this? <a href="#">Toggle View</a> ...

UIImageView movement What am I doing wrong?!?!?!

What am i doing wrong here?!?!! I get an error. I have the following code under a button touch down action. I am trying to make a UIImageView move to the right: character.center = CGPointMake(character.center.x += 1, character.center.y); Please help. Thanks in advance, Bryce ...

Why do I get an error while trying to set the content of a tabspec in android?

I have an android activity in which I'm using tabs. public class UnitActivity extends TabActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.unit_view); TabHost tabHost = getTabHost(); TabSpec spec; spec = tabHost.newTabSpec("control...

Why do I get a null pointer exception from TabWidget?

I'm writing an android program in which I have an activity that uses tabs. The Activity public class UnitActivity extends TabActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TabHost tabHost = getTabHost(); TabSpec spec; Resources res = getResources(); LayoutInfla...

How do I generate a view from the console/script-runner in merb?

I'd like to generate a lot of merb views (around 350.000) and save them to separate files programmatically (they will actually be XML files). One option would be to simply wget them, but that is too slow (already tried it, but takes around two days). For rails I've already found an answer but that doesn't work with merb. ...

refresh table view iphone

Hi all !! So i've set a table view, i have set a system which set if the row have been already selected, i set checkmarck acessory for a row which have been seen, i write the row in a plist to an int value. It work good but only when i restart the app or reload the table view in my navigation controller. I mean when i select a row it ...

iPhone landscape navigation back action shows vertical view transition?

I have a regular UINavigationController and I push a series of UIViewController into the stack. The view transition for push controller is horizontal animation transition: [self.navigationController pushViewController:controller animated:YES]; However, when I press the Back button on the navigation bar, the view transition animation is...

django blog - post- reply system display replies

I have a mini blog app, and a reply system. I want to list all mini blog entries, and their replies, if there are any. i have in views.py def profile_view(request, id): u = UserProfile.objects.get(pk=id) paginator = New.objects.filter(created_by = request.user) replies = Reply.objects.filter(reply_to = paginator...

JSP + View bean complete example

I found this interesting tutorial that explains the concept of view bean with some code snippets http://www.ibm.com/developerworks/ibm/library/i-extreme5/, but I'd like to view a complete (simple) web application in a real world scenario using plain JSP and view beans (not using struts, spring or jsf framework). Thanks for pointing me to...

Access shell methods in controller? Cake PHP 1.3

I wrote a shell method in CakePHP 1.3 that has a return value. I'd like to be able to access that method from within a controller, so that I can pass its return value into the View. I'm not sure how to access those methods appropriately from within the controller. Have I done it wrong? I could easily duplicate the code, but I'd lik...

How to add a conditional filter for drupal's view?

Only apply the filter when there is filter=1 in the query string, has anyone managed to do this kind of conditional filter with drupal? ...

Cakephp inflection, how to change a plural to a singular.

Hi, I have a controller called "Shops", this is the way the routing system looks for it, however I want to be able to called this controller and what not 'shop'. Is it possible to do this. Cheers! ...

How do you add flair to three20's Thumbnail View for iPhone?

Hi. You know three20's Thumbnail View? We're building an iPhone app and want to use that view, except each thumbnail will be a user's profile picture. Then, based on certain flags downloaded as JSON from the server, we want to overlay a green dot on the bottom left of each thumbnail (or give each thumbnail a blue border) where the corres...

how do I get my selected list back with the selected item (asp.net mvc 2)

Hello, I try to make a view in ASP.NEt mvc 2 with a selectList. I fill up the selectlist languages from my model (regDom) listLangModel is a list of languages I retrieve from the database. regDom.Languages = from l in listLangModel select new SelectListItem { Text = l.Na...

XML Viewer with diagram,..

Hello, i am looking for an applet/application/code which reads XML. I know there are many 'Viewers' but i would like to list fields. Sort or search or group as GUI. So For example i have many books in XML and want to present them to lookup. Also a good feature is to convert fields (for example timestamps to date). Also producing diagram...

iPhone: Add background button to view when UITableView has no cells

I have a UITableViewController, when there is no data to populate the UITableView, I want to add a button, which uses an image. So, rather than the user seeing a tableview with no records, they will see an image that says, "No records have been added, Tap to add one", then they click and we create a new one. I assumed I would just hide ...