Search Results

Search found 4341 results on 174 pages for 'zend navigation'.

Page 92/174 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • Add title to jQuery Cycle slideshow from Alt attribute?

    - by thatryan
    I am building a slideshow and need to have a title appear for each picture that get cycled. I created alt attributes for them and am trying to have cycle display them for each image, but It only shows the first one. I am unsure how to get the code I have into the cycle "loop" for the gallery? Does this make sense? here is what I have, (well, part of it I mean) :) thanks! $('#slideshow').before('<div class="navigation">').cycle({ fx: 'fade', timeout: 6000, pager: '.navigation' }); $('.image_title').html($(this).find('img').attr('alt'));

    Read the article

  • Loading a UIDatePicker in Landscape on a UINavigationController

    - by Ryan
    I have a custom UINavigationController that supports auto-rotate. I also have a UIDatePicker on one of my views that I throw onto the stack of the Navigation controller. The auto-rotate works if I start the date picker view in portrait and then rotate it. If I try load the date picker view in landscape to begin with, the view is all messed up. It looks like it would if it didn't support rotation and the frame only has about half of the picker visible and off center. I've tried making my own date picker that supports auto-rotate in case that was the problem, I've tried creating two different views and swapping them out, and I've tried changing the view frame size on the ViewWillAppear method. None of them seem to be working for me as of yet. Anyone have any suggestions on how to get the date picker to show up in landscape correctly on a navigation controller? I probably am overlooking something simple and the answer is right in front of me, but I'm not finding it.

    Read the article

  • How can I get popup window using commandButton in Trinidad?

    - by vikram
    How can I get popup window using commandButton in Trinidad? My problem is that by clicking on Add button from dialogdemo.jspx, not any popup window or dialog box is opened. This is dialogdemo.jspx file: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:tr="http://myfaces.apache.org/trinidad" version="1.2"> <jsp:directive.page contentType="text/html;charset=utf-8" /> <f:view> <tr:document title="Dialog Demo"> <tr:form> <!-- The field for the value; we point partialTriggers at the button to ensure it gets redrawn when we return --> <tr:inputText label="Pick a number:" partialTriggers="buttonId" value="#{launchDialog.input}" /> <!-- The button for launching the dialog: we've also configured the width and height of that window --> <tr:commandButton text="Add" action="dialog:chooseInteger" id="buttonId" windowWidth="300" windowHeight="200" partialSubmit="true" useWindow="true" returnListener="#{launchDialog.returned}" /> </tr:form> </tr:document> </f:view> </jsp:root> Here is the associated managed bean LaunchDialogBean.java: package jsfpkg; import org.apache.myfaces.trinidad.component.UIXInput; import org.apache.myfaces.trinidad.event.ReturnEvent; public class LaunchDialogBean { private UIXInput _input; public UIXInput getInput() { return _input; } public void setInput(UIXInput input) { _input = input; } public void returned(ReturnEvent event) { if (event.getReturnValue() != null) { getInput().setSubmittedValue(null); getInput().setValue(event.getReturnValue()); } } } Here is the popup file Popup.jspx: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:trh="http://myfaces.apache.org/trinidad/html" xmlns:tr="http://myfaces.apache.org/trinidad" version="2.0"> <jsp:directive.page contentType="text/html;charset=utf-8" /> <f:view> <tr:document title="Add dialog"> <tr:form> <!-- Two input fields --> <tr:panelForm> <tr:inputText label="Number 1:" value="#{chooseInteger.value1}" required="true" /> <tr:inputText label="Number 2:" value="#{chooseInteger.value2}" required="true" /> </tr:panelForm> <!-- Two buttons --> <tr:panelGroup layout="horizontal"> <tr:commandButton text="Submit" action="#{chooseInteger.select}" /> <tr:commandButton text="Cancel" immediate="true" action="#{chooseInteger.cancel}" /> </tr:panelGroup> </tr:form> </tr:document> </f:view> </jsp:root> For that I have written the bean ChooseIntegerBean.java package jsfpkg; import org.apache.myfaces.trinidad.context.RequestContext; public class ChooseIntegerBean { private Integer _value1; private Integer _value2; public Integer getValue1() { return _value1; } public void setValue1(Integer value1) { _value1 = value1; } public Integer getValue2() { return _value2; } public void setValue2(Integer value2) { _value2 = value2; } public String cancel() { RequestContext.getCurrentInstance().returnFromDialog(null, null); return null; } public String select() { Integer value = new Integer(getValue1().intValue() + getValue2().intValue()); RequestContext.getCurrentInstance().returnFromDialog(value, null); return null; } } Here is my faces-config.xml: <managed-bean> <managed-bean-name>chooseInteger</managed-bean-name> <managed-bean-class>jsfpkg.ChooseIntegerBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>launchDialog</managed-bean-name> <managed-bean-class>jsfpkg.LaunchDialogBean</managed-bean-class> <managed-bean-scope> request </managed-bean-scope> </managed-bean> <navigation-rule> <from-view-id>/dialogdemo.jspx</from-view-id> <navigation-case> <from-outcome>dialog:chooseInteger</from-outcome> <to-view-id>/dialogbox.jspx</to-view-id> </navigation-case> </navigation-rule>

    Read the article

  • Drupal - no self-linking

    - by pygorex1
    So, I've added several pages to my Drupal install and linking to the pages using URL aliases via the Path module. So far so good - http://mydrupal/node/1 becomes http://mydrupal/about which is exactly what I'm looking for. Then I'm adding these links to the primary navigation and outputting the primary links via a custom theme (copy and paste the primary link code from the Chameleon theme). Here's the problem: when viewing http://mydrupal/about the page links to itself - that is the "About" link at http://mydrupal/about is still linking to http://mydrupal/about - the behavior I'm looking for is to have the "About" text display without a link. In summary: how do I prevent self-linking of pages when displaying the primary navigation?

    Read the article

  • Automatically render changed partials in webby

    - by Tomas Sedovic
    I have a webby page and I'm have a layout that all my pages are rendered to. That layout uses a partial for navigation (in HAML): = render(:partial => "navigation", :locals => {:some => "stuff"} ) The problem is that when I change the _navigation partial, neither webby nor webby autobuild recognize the change and they don't re-render the pages. I've solved this by setting the dirty: true flag in the layout, but that makes all the pages re-render every time -- even when nothing changed. I know that this is not that big a deal, but still: is there a way so that when you change partial, webby recognizes this and renders only the affected pages (as it does with everything else)?

    Read the article

  • UINavigationController Right button

    I am unable to set any property of parentController (which is always a UINavigationController in my case) from child views. e.g. I want to add a button on the navigation bar using following code: UINavigationController* parentController = (UINavigationController)self.parentViewController; UIBarButtonItem *addButton = [[[UIBarButtonItem alloc] initWithTitle:@"Something" style:UIBarButtonItemStyleBordered target:self action:@selector(doSomething)] autorelease]; [_parentController.navigationItem setRightBarButtonItem:addButton animated:YES]; This code runs perfectly without errors but I can't see any button added to the navigation bar. Thanks in advance.

    Read the article

  • PHP / jQuery page change transition

    - by Tim
    Hey all Basically I want to replicate the page changing effect found here, at http://timvandamme.com/ But instead of using #values I want to use PHP includes, mainly because I want the site to be as uber-seo-friendly as possible... but still have this nice effect. So is there a way of doing this? I have a main index file which includes other php files in the centre using the usual 'GET' method, so my pages look like: "index.php?page=about" In my jQuery code I want to have a declaration where if I click the navigation, the content scrolls up, then once the relevant PHP file has loaded, have the content scroll back down and show the new page content (whilst also of navigated to the new page in the address bar, so if the user clicks the back button in their browser, they return to the previous page). I know how to code the scrolling bits, it's just literally the ajax loading includes / page navigation parts I'm struggling to work out :\ Any help would be MUCH appreciated!!! Thanks in advance. Tim

    Read the article

  • Disappearing IE6 elements.

    - by Stefan Kendall
    I don't know what could be causing this issue, but for some reason, elements on my page (list navigation items, specifically), are disappearing in IE6. That is, from IE developer toolbar, I can see that the elements are there, and the DOM/css is correct, but the elements just aren't visible. The odd thing is that if you set or toggle ANY css element on the list items with the IE6 toolbar, the elements appear. I also have a hover() jQuery action set on the list navigation items, and the event fires as if the elements were visible and working correctly. What could possibly be going wrong here? I initially thought z-index could be an issue, but changing ANY attribute or css value (not necessarily z-index), causes the element to render. I should note, however, that doing this programmatically does not cause the elements to display properly, even if triggered seconds after the page load.

    Read the article

  • save and restore state of a tab bar controller

    - by phunehehe
    I have an application that has a UITabBarController with two tabs, each having its own navigation controller. Now I want to store the state of the application when the user closes it, so that when the user relauches the application will show the same place as the last time before it was closed. So, in applicationWillTerminate: I have [NSKeyedArchiver archiveRootObject:tabBarController toFile:@"lastVisitedTab"]; Then, in applicationDidFinishLaunching: I have UITabBarController *last= (UITabBarController *)[NSKeyedUnarchiver unarchiveObjectWithFile:@"lastVisitedTab"]; if (last) tabBarController = [last retain]; I also have an extension to UIImage to make it compliant to NSCoding. However, this doesn't work, as the state is not preserved. The first tab gets selected all the time, and no navigation is preserved either. Can someone tell me what's wrong, or show me how to do it correctly?

    Read the article

  • touchesBegan and other touch events not getting detected in UINavigationController

    - by SaltyNuts
    In short, I want to detect a touch on the navigation controller titlebar, but having trouble actually catching any touches at all! Everything is done without IB, if that makes a difference. My app delegate's .m file contains: MyViewController *viewController = [[MyViewController alloc] init]; navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; [window addSubview:navigationController.view]; There are a few other subviews added to this window in a way that overlays navigationController leaving only the navigation bar visible. MyViewController is a subclass of UIViewController and its .m file contains: - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch *touch in touches) { NSLog(@"ended\n"); } } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch *touch in touches) { NSLog(@"began\n"); } } I also tried putting these functions directly into app delegate's .m file, but the console remains blank. What am I doing wrong?

    Read the article

  • UINavigationController and memory management

    - by Dan Ray
    - (void)launchSearch { EventsSearchViewController *searchController = [[EventsSearchViewController alloc] initWithNibName:@"EventsSearchView" bundle:nil]; [self.navigationController pushViewController:searchController animated:YES]; //[searchController release]; } Notice the [searchController release] is commented out. I've understood that pushing searchController onto the navigation controller retains it, and I should release it from my code. I did just alloc/init it, after all, and if I don't free it, it'll leak. With that line commented out, navigation works great. With it NOT commented out, I can navigate INTO this view okay, but coming back UP a level crashes with a *** -[CFArray release]: message sent to deallocated instance 0x443a9e0 error. What's happening here? Is the NavigationController releasing it for me somehow when it goes out of view? The boilerplate that comes on a UINavigationController template in XCode has the newly-pushed controller getting released. But when I do it, it fails.

    Read the article

  • the markup document following the root element must be well formed

    - by Sunny Mate
    hi i am getting the following error while saving my faces-config.xml the markup document following the root element must be well formed and my xml is UserBean com.jsfcompref.register.UserBean session <from-view-id>/register.jsp</from-view-id> <navigation-case> <from-outcome>register</from-outcome> <to-view-id>/confirm.jsp</to-view-id> </navigation-case> i have closed all the tags proerly still i am getting this error any help pls thanks in advance Sunny Mate

    Read the article

  • How to check if a variable is defined in a Master file in ASP.NET MVC

    - by Mortanis
    I've got a Site.Master file I've created to be my template for the majority of the site, with a navigation. This navigation is dynamically created, based on a recursive Entity (called Page) - Pages with a parentID of 0 are top level, and naturally each child carries it's parent's Id in that field. I've created a quick little HTML Helper that accepts the ID of an Page and generates the nav by doing a foreach on the children that have a parentId matching the passed Id. On the majority of the site, I want the Site.Master to use a parentId of 0, but if I'm on a strongly typed View displaying a Page, I naturally want to use the Id of the page. Is there a way to do such conditional logic in a Site.Master (and, does that violate MVC rules)? "If I'm on a strongly typed Page of /Page/{Id}, use the Id render nav, else use 0"

    Read the article

  • Unidirectional One-to-Many Associations in Entity Framework 4?

    - by Eric J.
    Does EF 4 support unidirectional one-to-many associations, as in: public class Parent { public int Id { get; set; } public string Something { get; set; } public List<Child> AllMyChildren { get; set; } } public class Child { public int Id { get; set; } public string Anotherthing { get; set; } // I don't want a back-reference to the Parent! // public int ParentId { get; set; } } When I try to compile my project with an association between Parent and Child where End2 Navigation is blank (because I unchecked the End2 Navigation Property checkbox in the Add Association dialog), I get Error 2027: No mapping specified for the following EntitySet/AssociationSet - Child.

    Read the article

  • Sencha Touch 2: List does not display in Panel

    - by jrboddie
    I am working on an MVC app in Sencha Touch 2 and am having trouble getting a list to display in a nested panel. The structure of the app has a main view which is a tab panel. One of the items in the tab panel is a defined panel, xtype: 'homepanel'. An item in this panel is the list, xtype: 'newslist' that is linked to the appropriate store and model files. The list does not display unless I change its parent 'homepanel' to a type, Ext.navigation.View. What am I missing in the definition of 'homepanel' as a Panel that prevents the display of the list? Ext.define('ACSO.view.Home', { extend: 'Ext.Panel', //<--works if Ext.navigation.View xtype: 'homepanel', requires: [ 'Ext.TitleBar', 'ACSO.view.NewsList' ], config: { title: 'Home', iconCls: 'home', cls: 'home', scrollable: true, styleHtmlContent: true, items: [ { xtype: 'newslist' } ] } });

    Read the article

  • SEO with image link alt text vs standard text-based link

    - by Infiniti Fizz
    Hi, I'm currently developing a website and the main navigation is made up of image links because the font used for them isn't standard. My client's only worry is will this mess up search engine optimization? Can I just add alt text to the images like "link 1" or use the name attribute of the anchor tag? Or would it be better to just have the navigation as anchor tags with the names of the links in them like: <a href="...">link 1</a>? I'm new to SEO so really don't know which to suggest to him, Thanks for your time, InfinitiFizz

    Read the article

  • Creating a custom Publishing Portal Web site in SharePoint 2010

    - by Jourdan
    Custom Web sites built on SharePoint are cropping up everywhere (just visit topsharepoint.com to see). With that said, my question pertains to creating a fully customized, branded site using SharePoint as the CMS as depicted by many of the topsharepoint.com sites. I understand the concept of creating the custom master master page(s) (SharePoint 2010 even includes a minimal.master to start). The problems I have are: What site template does one use? In 2007 the recommended front-facing Web site site collection template was the Publishing Portal. Is this still the case? What navigation do you use? Do you leverage the OOB navigation? If so, how do you style it extensively? How do you keep the on-page editing capabilities within the new site template? Are there any online tutorials are walk-throughs that address all of these issues? I have been searching, but it's really sparse out there.

    Read the article

  • Youtube video embed in WebView and MoviePlayer control

    - by Tronic
    hi, i embed a youtube video into a webview. the problem is: when i pop the current view (which includes the webview) from navigation controller, the the movie itself stops, but the audio is continues running. when i push the view controller on the navigation controller again, i can play the movie newly, but the old audio is still there. my webview code ids_ = [NSArray arrayWithObjects:@"2b84g38Z_60",@"3URx0tM-rMc",@"HZpi-2HVhq0",@"Hhns0DRPI44",@"hRuoxRQ4Q3k",@"lkMXwNBGRA8",@"tXGc6wWIFJo",@"uzGdEn8aW-Q",@"ZAoEBdt8C5M",@"vn8EJqt2BvQ",@"7Z_qRbjG6Ck",@"JspRcxGUijs"@"lM2lcVOh5YU",@"2b84g38Z_60",nil]; int numIds_ = [ids_ count]; NSLog(@"%d", arc4random()%numIds_); NSString *youTubeVideoHTML = [[NSString alloc] initWithFormat:@"<html><head></head><body style=\"margin:0;background-color:#000;\"><iframe class=\"youtube-player\" type=\"text/html\" width=\"640\" height=\"365\" src=\"http://www.youtube.com/embed/%@\" frameborder=\"0\"></iframe></body></html>", [ids_ objectAtIndex:arc4random()%numIds_]]; NSLog(youTubeVideoHTML); [youtubeView loadHTMLString:youTubeVideoHTML baseURL:nil]; thanks in advance

    Read the article

  • In ASP.NET MVC, what is the equivalent of ASP classic's server side includes?

    - by Quakkels
    I have been developing in classic ASP for about 2.5 years and I am trying to update my skill set to include ASP.NET MVC. What is the MVC way of executing SSIs? IE: How can I include a database drawn navigation list in a sidebar? I have been looking into partial views, but they seem to get their content from the controller. As far as I can tell this means that I would need to write each controller to pass the navigation list. Am I thinking along the right lines?

    Read the article

  • iPhone App is leaking memory; Instruments and Clang cannot find the leak

    - by Norbert
    Hi, i've developed an iPhone program which is kind of an image manipulation program: The user get an UIImagePickerController and selects an image. Then the program does some heavy calculating in a new thread (for responsiveness of the application). The thread has, of course, its own autorelease pool. When calculation is done, the seperated thread signals the main thread that the result can be presented. The app creates a new view controller, pushes it onto the navigation controller. In short: UIImagePickerController new thread (autorelease pool) does some heavy calculation with image data signal to main thread that it's done main thread creates view controller and pushes it onto navigation controller view controller presents image result My program works well, but if I dismiss the navigation controller's top view controller by tapping on the back button and repeat the whole process several times, my app crashes. But only on the device! Instruments cannot find any leaks (except for some minor ones which I don't feel responsible for: thread creation, NSCFString; overall about 10 kB). Even Clang static analyzer tells me that my could seems to be all right. I know that the UIImage class can cache images and objects returned from convenience methods get freed only whet their autorelease pool gets drained. But most of the time I work with CGImageRef and I use UIImage' alloc, init & release methods to free memory as soon as possible. Currently, I don't know how to isolate the problem. How would you approach this problem? Crash Log: Incident Identifier: F4C202C9-1338-48FC-80AD-46248E6C7154 CrashReporter Key: bb6f526d8b9bb680f25ea8e93bb071566ccf1776 OS Version: iPhone OS 3.1.1 (7C145) Date: 2009-09-26 14:18:57 +0200 Free pages: 372 Wired pages: 7754 Purgeable pages: 0 Largest process: _MY_APP_ Processes Name UUID Count resident pages _MY_APP_ <032690e5a9b396058418d183480a9ab3> 17766 (jettisoned) (active) debugserver <ec29691560aa0e2994f82f822181bffd> 107 syslog_relay <21e13fa2b777218bdb93982e23fb65d3> 62 notification_pro <8a7725017106a28b545fd13ed58bf98c> 64 notification_pro <8a7725017106a28b545fd13ed58bf98c> 64 afcd <98b45027fbb1350977bf1ca313dee527> 65 mediaserverd <eb8fe997a752407bea573cd3adf568d3> 319 ptpd <b17af9cf6c4ad16a557d6377378e8a1e> 142 syslogd <ec8a5bc4483638539fa1266363dee8b8> 68 BTServer <1bb74831f93b1d07c48fb46cc31c15da> 119 apsd <a639ba83e666cc1d539223923ce59581> 165 notifyd <2ed3a1166da84d8d8868e64d549cae9d> 101 CommCenter <f4239480a623fb1c35fa6c725f75b166> 161 SpringBoard <8919df8091fdfab94d9ae05f513c0ce5> 2681 (active) accessoryd <b66bcf6e77c3ee740c6a017f54226200> 90 configd <41e9d763e71dc0eda19b0afec1daee1d> 275 fairplayd <cdce5393153c3d69d23c05de1d492bd4> 108 mDNSResponder <f3ef7a6b24d4f203ed147f476385ec53> 103 lockdownd <6543492543ad16ff0707a46e512944ff> 297 launchd <73ce695fee09fc37dd70b1378af1c818> 71 **End**

    Read the article

  • How to hide parent tabbar when pushing controller in navigationController

    - by Yannis
    Hi all, I have an application with a tab bar controller and each view contains a navigation controller. My MainWindow looks as follows: Everything works fine as it is but I noticed a problem when pushing a details view to the navigation controller. In the didSelectRowAtIndexPath for a tableviewcontroller that belongs to the tab bar controller (the one called Latest in the image) I am doing this: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ArticleViewController *articleController = [[ArticleViewController alloc] initWithNibName:@"ArticleView" bundle:nil]; [self.navigationController pushViewController:articleController animated:YES]; [articleController release]; articleController = nil; } The ArticleViewController has its own tabbar because it needs to display different things. The problem is that when I push the ArticleViewController into the navigationController I see both tabbars at the bottom of the view. Is there any way I can solve this problem? Thanks in advance

    Read the article

  • How to return focus from GridView or DataGrid to other control on the page

    - by Senthilkumar
    I Want to know how to focus to control after completing tab navigation for the grid view. I have certain controls in my page and GridView/DataGrid as last control, when I navigate (Tab key navigation) on my page. I can navigate from first control to GridView but when I finish all editable items in grid the tab control goes to browser address bar. I need this should focus to again first control on the page. My question is how can I do this? If it is an ordinary controls then I can use (on key down) attribute of the same.. here how can I get access to the last row's last column on the grid view.

    Read the article

  • JSF 2.1 Spring 3.0 Integration

    - by danny.lesnik
    I'm trying to make very simple Spring 3 + JSF2.1 integration according to examples I googled in the web. So here is my code: My HTML submitted to actionController.actionSubmitted() method: <h:form> <h:message for="textPanel" style="color:red;" /> <h:panelGrid columns="3" rows="5" id="textPanel"> //all my bean prperties mapped to HTML code. </h:panelGrid> <h:commandButton value="Submit" action="#{actionController.actionSubmitted}" /> </h:form> now the Action Controller itself: @ManagedBean(name="actionController") @SessionScoped public class ActionController implements Serializable{ @ManagedProperty(value="#{user}") User user; @ManagedProperty(value="#{mailService}") MailService mailService; public void setMailService(MailService mailService) { this.mailService = mailService; } public void setUser(User user) { this.user = user; } private static final long serialVersionUID = 1L; public ActionController() {} public String actionSubmitted(){ System.out.println(user.getEmail()); mailService.sendUserMail(user); return "success"; } } Now my bean Spring: public interface MailService { void sendUserMail(User user); } public class MailServiceImpl implements MailService{ @Override public void sendUserMail(User user) { System.out.println("Mail to "+user.getEmail()+" sent." ); } } This is my web.xml <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <listener> <listener-class> org.springframework.web.context.request.RequestContextListener </listener-class> </listener> <!-- Welcome page --> <welcome-file-list> <welcome-file>index.xhtml</welcome-file> </welcome-file-list> <!-- JSF mapping --> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> my applicationContext.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="mailService" class="com.vanilla.jsf.services.MailServiceImpl"> </bean> </beans> my faces-config.xml is the following: <application> <el-resolver> org.springframework.web.jsf.el.SpringBeanFacesELResolver </el-resolver> <message-bundle> com.vanilla.jsf.validators.MyMessages </message-bundle> </application> <managed-bean> <managed-bean-name>actionController</managed-bean-name> <managed-bean-class>com.vanilla.jsf.controllers.ActionController</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>mailService</property-name> <value>#{mailService}</value> </managed-property> </managed-bean> <navigation-rule> <from-view-id>index.xhtml</from-view-id> <navigation-case> <from-action>#{actionController.actionSubmitted}</from-action> <from-outcome>success</from-outcome> <to-view-id>submitted.xhtml</to-view-id> <redirect /> </navigation-case> </navigation-rule> My Problem is that I'm getting NullPointerExeption because my mailService Spring bean is null. public String actionSubmitted(){ System.out.println(user.getEmail()); //mailService is null Getting NullPointerException mailService.sendUserMail(user); return "success"; }

    Read the article

  • Are there any drawbacks to class-based Javascript injection?

    - by jonathanconway
    A phenomena I'm seeing more and more of is Javascript code that is tied to a particular element on a particular page, rather than being tied to kinds of elements or UI patterns. For example, say we had a couple of animated menus on a page: <ul id="top-navigation"> ... </ul> <!-- ... --> <ul id="product-list"> ... </ul> These two menus might exist on the same page or on different pages, and some pages mightn't have any menus. I'll often see Javascript code like this (for these examples, I'm using jQuery): $(document).ready(function() { $('ul#top-navigation').dropdownMenu(); $('ul#product-selector').dropdownMenu(); }); Notice the problem? The Javascript is tightly coupled to particular instances of a UI pattern rather than the UI pattern itself. Now wouldn't it be so much simpler (and cleaner) to do this instead? - $(document).ready(function() { $('ul.dropdown-menu').dropdownMenu(); }); Then we can put the 'dropdown-menu' class on our lists like so: <ul id="top-navigation" class="dropdown-menu"> ... </ul> <!-- ... --> <ul id="product-list" class="dropdown-menu"> ... </ul> This way of doing things would have the following benefits: Simpler Javascript - we only need to attach once to the class. We avoid looking for specific instances that mightn't exist on a given page. If we remove an element, we don't need to hunt through the Javascript to find the attach code for that element. I believe techniques similar to this were pioneered by certain articles on alistapart.com. I'm amazed these simple techniques still haven't gained widespread adoption, and I still see 'best-practice' code-samples and Javascript frameworks referring directly to UI instances rather than UI patterns. Is there any reason for this? Is there some big disadvantage to the technique I just described that I'm unaware of?

    Read the article

< Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >