Search Results

Search found 6941 results on 278 pages for 'drupal views'.

Page 61/278 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • Django LFS - custom views

    - by owca
    For all those ligthning fast shop users. I'm trying to implement my own first page view that will list all products from shop ( under '/' address). So I have a template : {% extends "lfs/shop/shop_base.html" %} {% block content %} <div id="najnowsze_produkty"> <ul> {% for obj in objects %} <li> {{ obj.name }} </li> {% endfor %} </ul> </div> {% endblock %} and then I've edited main shop view : from lfs.catalog.models import Category from lfs.catalog.models import Product def shop_view(request, template_name="lfs/shop/shop.html"): products = Product.objects.all() shop = lfs_get_object_or_404(Shop, pk=1) return render_to_response(template_name, RequestContext(request, { "shop" : shop, "products" : products })) but it just shows nothing. When I do Product.objects.all() query in shell I get results. Any ideas what could cause the problem ? Maybe I should filter products with 'active' status only ? But I'm not sure if it can influence all objects in any way.

    Read the article

  • Modifying generator.yml views in Symfony

    - by Alex Ciminian
    Hey! I'm currently working on a web app written in Symfony. I'm supposed to add an "export to CSV" feature in the backend/administration part of the app for some modules. In the list view, there should be an "Export" button which should provide the user with a csv file of the elements that are displayed (considering filtering criteria). I've created a method in the actions class of the module that takes a comma separated list of ids and generates the CSV, but I'm not really sure how to add the link to it in the view. The problem is that the view doesn't exist anywhere, it's generated on the fly from the data in the generator.yml configuration file. I've posted the relevant part of the file below. list: display: [=name, indemn, _status, _participants, _approved_, created_at] title: Lista actiuni object_actions: _edit: ~ _delete: ~ filters: [name, county_id, _status_filter, activity_id] fields: name: name: Nume Actiune indemn: name: Îndemn la actiune description: name: Descriere approved_: name: Operatiune created_at: name: Creata la status: name: Status Actiune I'm new to Symfony, so any help would be appreciated :). Thanks, Alex

    Read the article

  • Databases Views with Parameters

    - by asrijaal
    Hi there, I know that is it possible to create a View with Parameters at MSSQL, does anyone knows if I can achieve something similar with a DB2 database? I have a more complicated query which includes a user number which I want to pass as param to the view.

    Read the article

  • Eclipse RCP: Generating views from form values

    - by binil
    I want to build a user interface similar to the sketch below: When the user fills out the form on the right and clicks the 'Plot!' button, a new closeable tab opens on the left with a chart. I am new to RCP and have been following this tutorial. I am able to bring up tabs with charts triggered from a menu item. How do I go about: creating the tab (view?) with the form open a new chart tab when the user clicks the button

    Read the article

  • resolving localhost in php so can be views outside VM

    - by DA
    I'm running Windows 7. Within, I'm running Virtualbox and Ubuntu. Within Ubuntu, I'm running Apache and using PHP codeigniter. To reference our CSS and JS files, we use this syntax: <?php echo site_url('css/styles.css'); ?> When viewing the site locally (within Ubuntu VM) that resolves to: http://localhost/styles.css So works fine. The catch is when I access that site from within Windows 7 (for IE testing). To access the site in Windows 7, I refer to the IP address of the VM: http://xx.x.x.x/ That loads the site but, alas, all the site_url variables are still being rewritten as 'localhost'. Said files obviously don't exist on the localhost of my windows 7. Is there a way around this short of just hard-coding relative links in my PHP file?

    Read the article

  • iPhone SDK: Orientation (Landscape and Portrait views)

    - by domness
    Okay, I've got my normal app which is in portrait mode. I can force my app to go to landscape mode for a view (using navigationcontroller and viewcontroller) like this: - (void)viewWillAppear:(BOOL)animated { [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; } But then when I go back to the main menu (tableview) it goes straight back to portrait. I try this code: - (void)viewWillAppear:(BOOL)animated { [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait]; } But that doesn't work.. Any ideas?

    Read the article

  • Rendering PDFs from a database inside MVC views?

    - by Mohammad Sepahvand
    I was wondering if it's possible to do this without using 3rd party compnents in MVC 3. (I am open to free components though.) There are a couple of links out there but they seem to be mostly concerned with reporting and other code samples that do claim to do this sort of thing don't seem to compile. I'm not having any trouble saving and retrieving the PDFs to and from my database, but when I return the PDF as a File or a FileStreamResult the user is prompted with a download. A more desirable approach would be to actually render the PDFs inside the browser. I've had a look at iTextSHarp, it does the job to an extent, but it's not a complete solution. For example it will display the PDF inside the view if and only if the client has Adobe Reader installed, otherwise it prompts for a download. So technically, I'm mostly looking for a PDF viewer. Any ideas?

    Read the article

  • ipad: UINavigationController Inside a ModalView not pushing views

    - by nickthedude
    I have a UINavigationController with a UIViewcontroller containing a tableview that is being presented as a UIModalPresentationFormSheet on the ipad. Which works fine until I try to push another view on top of it. Nothing happens anyone else have this issue? It also works perfectly on the iphone. and the didselectrowatindexpath is not a branched method. Nick

    Read the article

  • UIView Obscuring Other Views

    - by Matt Long
    I cannot figure out what is obscuring my buttons. The first image shows the buttons that I want to click. They are clickable while the view is contracted like this, but when the view is expanded like in the second image, the buttons are no longer clickable. There seems to be another view obscuring the buttons. Any thoughts on what might be causing that? If not, any idea how I can figure out what view is getting the tap events when I tap in that area? Thanks. -Matt

    Read the article

  • Cocoa: How to make table view draw custom views in each cell

    - by Inso Reiges
    Hello, I am learning Cocoa and trying to create an application for Mac that displays a simple book list. Each book is an NSView with its cover image, title and author. I want to present this list as a NSTableView with a single column and a book view in each cell. However i can't yet figure out how to display a custom view inside a table cell in interface builder or programmatically. Any tips would be very appreciated :) Inso.

    Read the article

  • Who should call viewDidLoad on progammatically loaded views?

    - by Remus Rusanu
    When I need to load a view programatically I do the following: MyController* myController = [[MyController alloc] init]; [[NSBundle mainBundle] loadNibNamed:@"myNib" owner:myController options:nil]; // use my controller here, eg. push it in the nav controller This works fine, but my controller's viewDidLoad is never called. So I resorted to manually calling it after the loadNibNamed call, but it doesn't seem correct. I was expecting the framework to call the viewDidLoad on my behalf. Is this the right way or I'm missing something?

    Read the article

  • JSF 2.0 Dynamic Views

    - by Robe Eleckers
    Hello, I'm working on a web project which uses JSF 2.0, PrimeFaces and PrettyFaces as main frameworks / libraries. The pages have the following (common) structure: Header, Content, Footer. Header: The Header always contains the same menu. This menu is a custom component, which generates a recursive html <ul><li> list containing <a href="url"> html links, this is all rendered with a custom renderer. The link looks like 'domain.com/website/datatable.xhtml?ref=2'. Where the ref=2 used to load the correct content from the database. I use prettyfaces to store this request value in a backingbean. Question 1: Is it ok to render the <a href> links myself, or should I better add an HTMLCommandLink from my UIComponent and render that in the encodeBegin/End? Question 2: I think passing variables like this is not really the JSF 2.0 style, how to do this in a better way? Content: The content contains dynamic data. It can be a (primefaces) datatable, build with dynamic data from the database. It can also be a text page, also loaded from the database. Or a series of graphs. You got the point, it's dynamic. The content is based on the link pressed in the header menu. If the content is of type datatable, then I put the ref=2 variable to a DataTableBean (via prettyfaces), which then loads the correct datatable from the database. If the content is of type chart, I'll put it on the ChartBean. Question 3: Is this a normal setup? Ideally I would like to update my content via Ajax. I hope it's clear :)

    Read the article

  • iphone SDK buttons control views

    - by mangnv
    Hi, all I'v just started to learn SDK. I have several questions. First. I will do the project about university APP. if u clike the app, then u can c several buttons on one page, then each button( eg: event, BBS,courses, map....) has specific function...each one connect to anohter view. Are they buttons on the main page? Second, how to deal with one view has several buttons, one button connect to other view? Third, how to deal with controller classes? I'd like to make a app like this way. Main Page has 6 buttonss(event, community, directory...), take community for eg: community has two functions( Notices and BBS). if i clike Notices, then i can read notices, and if i clike BBS, then i could also read BBS. The thing that i do not get is..how to deal with classes. I mean main Page has one controller classes that control 6 buttons? If my question is not so clearly, then let me know....I really need help~

    Read the article

  • Show/hide views with checkbox

    - by DixieFlatline
    Hi! I want to show or hide some elements (textviews and edittexts) with checkbox. I set their visibility to gone in layout file. Showing them when user checks the box works, but the when user unchecks it, they don't hide. (android 1.5 and 1.6) My code: cb=(CheckBox)findViewById(R.id.cek); cb.setOnClickListener(new OnClickListener() { // checkbox listener public void onClick(View v) { // Perform action on clicks, depending on whether it's now checked if (((CheckBox) v).isChecked()) { tv1.setVisibility(0); //visible==0 et3.setVisibility(0); } else if (((CheckBox) v).isChecked() == false) { tv1.setVisibility(2); //gone=2 et3.setVisibility(2); } } });

    Read the article

  • Switch between views in Android

    - by ZelluX
    Hi, all I'm writing an Android application with multiple Tabs. The content of each tabs is determined by XMLs on the Internet, and it could be WebView for HTML rendering, GridView for photo displaying, etc. I'm going to delay downloading of those XML until the tab is clicked. Upon clicking the application will download corresponding XML from the Internet, and then choose suitable View for it. Currently I have written a MyViewDelegate and use TabSpec.setContent() to set the spec pointing to MyViewDelegate: spec = tabHost.newTabSpec(tabName[i]); intent = new Intent().setClass(this, HomeActivity.class); spec.setIndicator(title[i]); spec.setContent(new MyViewDelegate(this, tabName[i])); tabHost.addTab(spec); My problem is, after MyViewDelegate is required to draw, how can I switch to WebView/GridView and initialize it? Many thanks.

    Read the article

  • Views jump during ViewDidLoad

    - by Jon-Paul
    Hi, I have a custom button, subclassed from UIButton that is initialised as below (obviously all the button does is use a custom font). @implementation HWButton - (id)initWithCoder:(NSCoder *)decoder { if (self = [super initWithCoder: decoder]) { [self.titleLabel setFont:[UIFont fontWithName: @"eraserdust" size: self.titleLabel.font.pointSize]]; } return self; } So far so good. But when I use the custom class in my nib and launch the app, the button initially displays for a split second as tiny with small text, then grows. So the outcome is what I want, but I don't want to see the transition. Can anyone put me right? Thanks. JP

    Read the article

  • New to Android: Dynamically changing views

    - by Josiah Kiehl
    I'm trying to learn how to build apps for Android. The first simple app, which will become a component of a bigger app I hope to build, is to have a button on the screen where, when tapped, it adds something new to the view. For instance: Imagine a layout that only has a button: [Create!] When that button, the view gets a new row added to it: [Create!] A Something! Upon subsequent presses, more rows are added [Create!] A Something! A Something! And so on. I've made a LinearLayout and placed the button in it, and have attached a click listener to it. That all works great. What I can't figure out is how to get a handle on the LinearLayout in the onClick function with which I'll addView() the new TextView that says "A Something!" Am I on the right track? What basic thing am I missing? Thanks!

    Read the article

  • asp.net-mvc return a couple of partial views onclick

    - by niao
    Greetings, I have an asp.net mvc application. When button is clicked (submit button) i would like to results to be displayed inside some div. I know how to do it. I have some action where I return a partial view. But when button is submitted then I get some multiple objects from db and I would like to display them all in div. How can I achieve it?

    Read the article

  • NSMutableArray & Multiple Views

    - by Antonio
    I am trying to write an application that has a NSMutableArray that needs to be accessed and modified in a different View. The MainViewController displays a table that gets the information from an NSMutableArray. The SecondaryViewController is used to addObjects into the array. How do I go about this without declaring it as a global variable?

    Read the article

  • Problem with my Jquery loading in my Codeigniter views

    - by sico87
    Hello, I am working on a one page website that allows the users to add and remove pages from there navigation as and when they would like too, the way it works is that if the click 'Blog' on the main nav a 'Blog' section should appear on the page, if they then click 'News' the 'News' section should also be visible, however the way I have started to implement this it seems I can only have one section at a time, can my code be adpated to allow multiple sections to shown on the main page. Here is my code for the page that has the main menu and the users selections on it. <!DOCTYPE html> <head> <title>Development Site</title> <link rel="stylesheet" href="/media/css/reset.css" media="screen"/> <link rel="stylesheet" href="/media/css/generic.css" media="screen"/> <script type="text/javascript" src="/media/javascript/jquery-ui/js/jquery.js"></script> <script type="text/javascript" src="/media/javascript/jquery-ui/development-bundle/ui/ui.core.js"></script> <script type="text/javascript" src="/media/javascript/jquery-ui/development-bundle/ui/ui.accordion.js"></script> <script type="text/javascript"> $(document).ready(function() { $('a.menuitem').click(function() { var link = $(this), url = link.attr("href"); $("#content_pane").load(url); return false; // prevent default link-behavior }); }); </script> </head> <body> <li><a class="menuitem" href="inspiration">Inspiration</a></li> <li><a class="menuitem" href="blog">Blog</a></li> <div id="content_pane"> </div> </body> </html>

    Read the article

  • UITouch Events and Table Views

    - by Andy
    I'm working on a navigation-based iPhone-only app that serves two main purposes: One, to present data in a hierarchical view, allowing users to drill down and eventually edit said data, and, two, to all users to perform a default action when the table view cell is tapped. I now need to offer a small set of options tied to the same data; however, both the didSelectRowAtIndexPath: and accessoryButtonTappedForRowAtIndexPath: methods are obviously taken. So, my options seem to be to implement a double-tap method, wherein the small list of additional options would be presented after (you guessed it) a double-tap on said table row; or, preferably, a tap-and-hold method. From what I can tell, tap-and-hold seems like the way to go in SDK 4.0 - which does me no good right this red-hot minute. I decided to go with the double-tap option, but I'm having a little trouble. First and foremost, the touchesBegan:withEvent: method does not seem to be getting called at all; a breakpoint placed within the method is never called while the application runs, and the table view responds exactly as it did before I inserted the method (which is to say, it performs the default action): - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *aTouch = [touches anyObject]; if (aTouch.tapCount == 2) { [NSObject cancelPreviousPerformRequestsWithTarget:self]; } } Second, I don't really need to handle a single-tap - the didSelectRowAtIndexPath: method can handle the single-tap just fine. The double-tap is the funky one I want to handle. I suspect the answer is going to contain the phrase, "You can't have the table view handle the single-tap and the touchesBegan: method handle the double-tap. The touch handling methods have to handle all of them." I would really appreciate some guidance from some of you who've dealt with this issue. Thanks in advance.

    Read the article

  • iPhone SDK allow touches to affect multiple views

    - by Parad0x13
    I have a main view that has has two buttons on it that control methods to display the next image and display the previous image. In this case the 'Image' is a class that inherits from UIImageView and has multiple pictures on it that you can interact with, and I call this class a 'Pane'. The pane itself handles all the user interaction itself while the main view controls the display of next and previous panes with the buttons. Here is my dilemma, because the pane fully covers the main view it wont allow for the user to tap the buttons on the main view! So once a pane pops up you cannot change it via the buttons! Is there a way to allow touches through transparent parts of a view, or if not how in the world do I achieve this?! I cannot pass touchesBegan or any of those methods from the pane to the superview because all of the button touch methods are created in the xib file. I cannot insert the pane under the control panel because then you wouldn't be able to interact with the pane. And as far as I know theres no way to pass touch events to every single pane within the paneHoldingArray that belongs to the main view I cannot add the command buttons inside of the pane because I want to be able to replace the command button's image with a thumbprint render of the next/previous pane. I've been stuck on this for a very long time, please somebody help me out with a fix action or a new way to re-engineer the code so that it will work!

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >