Search Results

Search found 1206 results on 49 pages for 'bootstrap datepicker'.

Page 27/49 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • How to set up Hierarchical Zend Rest Routes?

    - by Kenji Baheux
    With the Zend Framework, I am trying to build routes for a REST api on resources organized in the following pattern: http://example.org/users/ http://example.org/users/234 http://example.org/users/234/items http://example.org/users/234/items/34 How do I set up this with Zend_Rest_Route? Here is how I have setup the route for the users resource (users/:id) in my bootstrap.php file: $this->bootstrap('frontController'); $frontController = Zend_Controller_Front::getInstance(); $restRoute = new Zend_Rest_Route($frontController); $frontController->getRouter()->addRoute('default', $restRoute); [As far as I understand, this is a catch all route so users/324/items/34 would results in parameters set as id=324 and items=34 and everything would be mapped to the Users (front module) Model. From there I guess I could just test for the items parameter and retrieve the item #34 for user #324 on a get request.]<=== I just checked it and it doesn't seems to work like that: Acessing /users/234/items/43 and var_dump($this->_getAllParams()); in the get action of the rest controller results in the following output: array(4) { ["controller"]=> string(5) "users" ["action"]=> string(3) "get" [2]=> string(5) "items" ["module"]=> string(7) "default"] } Somehow both ids got lost... Anyone?

    Read the article

  • css positioning

    - by bsreekanth
    Hello, I have uploaded a part of my screen below (link: http://yfrog.com/0d30127380p) It is part of a forum, so there are elements above and below it. The "Response Req.. Date" has a label, a date picker, and two drop down select control for time. I tried setting the width of the datepicker element, and a right margin so that the time selectors would position next to it. But it always sit below it. I'm not good in css positioning, so any suggestion would be highly appreciated. <div class="wrapper "> <label for="responseRequiredDate"> Response Required Date <span class="indicator">*</span> </label> <input type="hidden" name="responseRequiredDate" value="struct" /><div class="datetimepicker"> <div class="datePicker"> </div> <script> ...</script> <div class="timepicker"><select .... </div> </div> the date picker insert a script tag, would that cause a problem. probably not.

    Read the article

  • Zend framework "invalid controller" error message

    - by stef
    When I load the homepage of a ZF site I get a message saying "Invalid controller specified (error)" where "error" seems to be the name of the controller. In my bootstrap.php I have the snippet below where I added the prints statement in the catch(): // Dispatch the request using the front controller. try { $frontController->dispatch(); } catch (Exception $exception) { print $exception; exit; exit($exception->getMessage()); } This prints out: exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in /www/common/ZendFramework/library16/Zend/Controller/Dispatcher/Standard.php:241 Stack trace: #0 /www/common/ZendFramework/library16/Zend/Controller/Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 /www/site.com/htdocs/application/bootstrap.php(38): Zend_Controller_Front->dispatch() #2 /www/site.com/htdocs/public/index.php(16): require('/www/site....') #3 {main} Can anyone make sense out of what it going on? I have a hunch it has something to do with case sensitivity and the naming conventions of ZF. The initial "invalid controller" message comes from the snippet below print $request->getControllerName(); if (!$this->isDispatchable($request)) { $controller = $request->getControllerName(); if (!$this->getParam('useDefaultControllerAlways') && !empty($controller)) { require_once 'Zend/Controller/Dispatcher/Exception.php'; throw new Zend_Controller_Dispatcher_Exception('Invalid controller specified (' . $request->getControllerName() . ')'); } $className = $this->getDefaultControllerClass($request); } This all prints out "indexerrorInvalid controller specified (error)" so it looks like it's trying to load the index controller first, can not and then has a problem loading the error controller. Could it just be that the path to the controller files is wrong?

    Read the article

  • Not able to use spring Beans outside container . Always picking up WebSphere Context

    - by Abhijit
    We have the a whole lot of spring bean defined in our project which we deploy in Websphere ^. One example being the following: oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@oracle:1521:OASIS oasis_owner o3ngin33r Now we have a service locator class like following private static ServiceLocator serviceLocator = new ServiceLocator(); private static ApplicationContext beanFactory = new ClassPathXmlApplicationContext(APPLICATION_CONTEXT_LOCATION); protected ServiceLocator() { } public ApplicationContext getBeanFactory() { return beanFactory; } public static ServiceLocator getInstance() { return serviceLocator; Now when I am trying to do this from my jUnit ServiceLocator.getInstance().getBean("oasJdbcData"; getting the following exception Caused by: javax.naming.ServiceUnavailableException: Could not obtain an initial context due to a communication failure. Since no provider URL was specified, the default provider URL of "corbaloc:iiop:[email protected]:2809/NameService" was used. Make sure that any bootstrap address information in the URL is correct and that the target name server is running. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration. [Root exception is org.omg.CORBA.TRANSIENT: java.net.ConnectException: Connection refused: connect:host=192.168.255.1,port=2809 vmcid: IBM minor code: E02 completed: No] at com.ibm.ws.naming.util.WsnInitCtxFactory.mapInitialReferenceFailure(WsnInitCtxFactory.java:1968) at com.ibm.ws.naming.util.WsnInitCtxFactory.mergeWsnNSProperties(WsnInitCtxFactory.java:1172) at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:720) at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:643) at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:489) at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:113) at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:428) at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144) at javax.naming.InitialContext.lookup(InitialContext.java:361) at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155) at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:153) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178) at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:104) at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105) at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:200) at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:186) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334) ... 33 more which clearly shows it is looking for IntialContext of Websphere which I dont want Any body can tell me what I am doing wrong?

    Read the article

  • Using Zend Framework and Doctrine with independend modular structures

    - by stefax
    I've seen a lot of articles about integrating ZF and Doctrine. There is also a proposal for ZF here but they have always two possible structures. Either they put all models into one top level model directory or they put it into a module related model directory. application |-- Bootstrap.php |-- configs |-- controllers |-- models - EITHER HERE |-- modules | -- examplemodule | |-- controllers | |-- models - OR HERE | |-- views |-- views For our projects I see problems for either of the two options: 1. One directory: application/models - in a complex system after a short time there will be hundreds of files, over all when you have the table classes two (e.g. User.php and UserTable.php). 2. Module based model directories: application/modules/examplemodule/models - in many cases we use models in multiple modules at the same time. So the "User" is required e.g. in the modules "game", "administration", ... Is there a way to use some kind of sub directories under the top level directory "models" to get some grouping. It should be completely independent of the module structure. application |-- Bootstrap.php ... |-- models | -- user | |-- User.php | |-- Friend.php | |-- other user related models | -- game | |-- Game.php | |-- Score.php | |-- ... ... Any solution should support autoloading and the class generation from yaml files. Any ideas, links or solutions? Thanks!

    Read the article

  • How can I programmatically add more than just one view object to my view controller?

    - by BeachRunnerJoe
    I'm diving into iPhone OS development and I'm trying to understand how I can add multiple view objects to the "Left/Root" view of my SplitView iPad app. I've figured out how to programmatically add a TableView to that view based on the example code I found in Apple's online documentation... RootViewController.h @interface RootViewController : UITableViewController <NSFetchedResultsControllerDelegate, UITableViewDelegate, UITableViewDataSource> { DetailViewController *detailViewController; UITableView *tableView; NSFetchedResultsController *fetchedResultsController; NSManagedObjectContext *managedObjectContext; } RootViewController.m - (void)loadView { UITableView *newTableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain]; newTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth; newTableView.delegate = self; newTableView.dataSource = self; [newTableView reloadData]; self.view = newTableView; [newTableView release]; } but there are a few things I don't understand about it and I was hoping you veterans could help clear up some confusion. In the statement self.view = newTableView, I assume I'm setting the entire view to a single UITableView. If that's the case, then how can I add additional view objects to that view alongside the table view? For example, if I wanted to have a DatePicker view object and the TableView object instead of just the TableView object, then how would I programmatically add that? Referencing the code above, how can I resize the table view to make room for the DatePicker view object that I'd like to add? Thanks so much in advance for your help! I'm going to continue researching these questions right now.

    Read the article

  • Multiple table relationships in Zend Help

    - by Zogi
    Hi Guys I have been doing some DB mapping to link two tables to no avail. Everytime I run the code I get the following error: Message: File "Role.php" does not exist or class "Role" was not found in the file Stack trace: #0 C:\wamp\www\zend\library\Zend\Db\Table\Row\Abstract.php(867): Zend_Db_Table_Row_Abstract->_getTableFromString('Role') #1 C:\wamp\www\uw\application\models\admin\User.php(56): Zend_Db_Table_Row_Abstract->findDependentRowset('Role') #2 C:\wamp\www\uw\application\controllers\AdminController.php(110): Application_Model_Admin_User->getUsers() #3 C:\wamp\www\zend\library\Zend\Controller\Action.php(513): AdminController->usersAction() #4 C:\wamp\www\zend\library\Zend\Controller\Dispatcher\Standard.php(289): Zend_Controller_Action->dispatch('usersAction') #5 C:\wamp\www\zend\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #6 C:\wamp\www\zend\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch() #7 C:\wamp\www\zend\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #8 C:\wamp\www\uwi\public\index.php(26): Zend_Application->run() #9 {main} Code & DB below: application/models/admin/User.php class Application_Model_Admin_User extends Zend_Db_Table_Abstract { protected $_name = 'user'; protected $_dependentTables = array('Role'); public function getUsers() { $rows = $this->fetchAll($this->select()->where('active = ?', 1)); $rows1 = $rows->current(); $rows2 = $rows1->findDependentRowset('Role'); return $rows2; } } application/models/admin/Role.php class Application_Model_Admin_Role extends Zend_Db_Table_Abstract { protected $_name = 'role'; protected $_referenceMap = array ( 'Role' => array( 'columns' => array('id'), 'refTableClass' => 'User', 'refColumns' => array('role_id') ); } DB tables CREATE TABLE role ( id integer auto_increment NOT NULL, name varchar(120), PRIMARY KEY(id) ); CREATE TABLE user ( id integer auto_increment NOT NULL, username varchar(120), PRIMARY KEY(id), FOREIGN KEY(role_id) REFERENCES role(id) );

    Read the article

  • ID not recognized in .ascx page

    - by Alexander
    I have the following code: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DurationPicker.ascx.cs" Inherits="Permias.DurationPicker" %> <%@ Register TagPrefix="Club" Namespace="ClubSite" %> <div class="controlblock"> <table> <tr> <td> Start Date: </td> <td> <Club:DatePicker ID="dp1" runat="server" /> </td> <td> <Club:TimePicker ID="tp1" runat="server" /> </td> </tr> <tr> <td> End Date: </td> <td> <Club:DatePicker ID="dp2" runat="server" /> </td> <td> <Club:TimePicker ID="tp2" runat="server" /> </td> </tr> </table> </div> In my code behind I have public System.DateTime startDateTime { get { return dp1.SelectedDate.Add(tp1.SelectedTime.TimeOfDay); } set { dp1.SelectedDate = value; tp1.SelectedTime = value; } } However dp1 is underlined in red, which means it can't find dp1.. why is this?

    Read the article

  • Zend Framework: Zend_DB Error

    - by Sergio E.
    I'm trying to learn ZF, but got strange error after 20 minutes :) Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'Configuration array must have a key for 'dbname' that names the database instance' What does this error mean? I got DB information in my config file: resources.db.adapter=pdo_mysql resources.db.host=localhost resources.db.username=name resources.db.password=pass resources.db.dbname=name Any suggestions? EDIT: This is my model file /app/models/DbTable/Bands.php: class Model_DbTable_Bands extends Zend_Db_Table_Abstract { protected $_name = 'zend_bands'; } Index controller action: public function indexAction() { $albums = new Model_DbTable_Bands(); $this->view->albums = $albums->fetchAll(); } EDIT All codes: bootstrap.php protected function _initAutoload() { $autoloader = new Zend_Application_Module_Autoloader(array( 'namespace' => '', 'basePath' => dirname(__FILE__), )); return $autoloader; } protected function _initDoctype() { $this->bootstrap('view'); $view = $this->getResource('view'); $view->doctype('XHTML1_STRICT'); } public static function setupDatabase() { $config = self::$registry->configuration; $db = Zend_Db::factory($config->db); $db->query("SET NAMES 'utf8'"); self::$registry->database = $db; Zend_Db_Table::setDefaultAdapter($db); Zend_Db_Table_Abstract::setDefaultAdapter($db); } IndexController.php class IndexController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function indexAction() { $albums = new Model_DbTable_Bands(); $this->view->albums = $albums->fetchAll(); } } configs/application.ini, changed database and provided password: [development : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 db.adapter = PDO_MYSQL db.params.host = localhost db.params.username = root db.params.password = pedro db.params.dbname = test models/DbTable/Bands.php class Model_DbTable_Bands extends Zend_Db_Table_Abstract { protected $_name = 'cakephp_bands'; public function getAlbum($id) { $id = (int)$id; $row = $this->fetchRow('id = ' . $id); if (!$row) { throw new Exception("Count not find row $id"); } return $row->toArray(); } }

    Read the article

  • Static content not displayed with Zend FW

    - by shin
    I am trying to display a static content with Zend framework. When I go to http://square.localhost/content/services, I get an error message. Could anyone tell me how to fix this please? Thanks in advance. application.ini .... .... resources.layout.layoutPath = APPLICATION_PATH "/layouts" resources.layout.layout = "master" resources.router.routes.home.route = /home resources.router.routes.home.defaults.module = default resources.router.routes.home.defaults.controller = index resources.router.routes.home.defaults.action = index resources.router.routes.static-content.route = /content/:page resources.router.routes.static-content.defaults.module = default resources.router.routes.static-content.defaults.controller = static-content resources.router.routes.static-content.defaults.action = display application/modules/default/controllers/StaticContentController.php class StaticContentController extends Zend_Controller_Action { public function init() { } // display static views public function displayAction() { $page = $this->getRequest()->getParam('page'); if (file_exists($this->view->getScriptPath(null) . "/" . $this->getRequest()->getControllerName() . "/$page." . $this->viewSuffix)) { $this->render($page); } else { throw new Zend_Controller_Action_Exception('Page not found', 404); } } } application/modules/default/views/scripts/static-content/services.phtml some html ... ... Error message An error occurred Page not found Exception information: Message: Page not found Stack trace: #0 /var/www/square/library/Zend/Controller/Action.php(513): StaticContentController->displayAction() #1 /var/www/square/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('displayAction') #2 /var/www/square/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #3 /var/www/square/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch() #4 /var/www/square/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #5 /var/www/square/public/index.php(26): Zend_Application->run() #6 {main} Request Parameters: array ( 'page' => 'services', 'module' => 'default', 'controller' => 'static-content', 'action' => 'display', )

    Read the article

  • Zend_Controller_Router_Route: Could not find a translator

    - by Antonio
    I am developing a multilanguage application. In the bootstrap there is the routes setup: protected function _initRoutes() { $this->bootstrap('frontController'); $router = $this->frontController->getRouter(); // PAGES ROUTE $page = new Zend_Controller_Router_Route( ':language/:ident', array( 'module' => 'core', 'controller' => 'pagine', 'action' => 'view' ), array( 'ident' => '[a-zA-Z-_0-9]{3,}', 'language' => '[a-z]{2}' ) ); $registrazione = new Zend_Controller_Router_Route( ':language/@utenti/@registrati', array( 'module' => 'core', 'controller' => 'utenti', 'action' => 'registrazione' ), array( 'language' => '[a-z]{2}' ) ); $router->addRoute('page', $page); $router->addRoute('registrazione', $registrazione); ..... } I cannot set the default translator to Zend_Controller_Router_Route (for translated segments) because i don't know the language parameter in the request object. I get the language parameter in Multilanguage Plugin during the "routeShutdown": class Activa_Controller_Plugin_Multilanguage extends Zend_Controller_Plugin_Abstract { public function routeShutdown(Zend_Controller_Request_Abstract $request) { $language = $request->getParam("language"); $locale = new Zend_Locale($language); $translate = new Zend_Translate('array', APPLICATION_PATH.'/config/lang/'.$language.'.php', $locale); Zend_Registry::set('Zend_Locale', $locale); Zend_Registry::set('Zend_Translate', $translate); Zend_Controller_Router_Route::setDefaultTranslator($translate); //////////////////////// // BUT NOW IS TOO LATE //////////////////////// } When i type the address "http://servername/it/utenti/registrati" i get the exception with the message "Could not find a translator". How can i fix it? Antonio (Italy)

    Read the article

  • RegisterStartupScript doesn't appear to be working on page postback within update panel

    - by Jen
    OK - so am working on a system that uses a custom datepicker control (I know there are other ones out there.. but for consistency would like to understand why my current issue is happening and fix it). So its a custom user control with a textbox and on Page_PreRender does this: protected void Page_PreRender(object sender, EventArgs e) { string clientScript = @" $(function(){ $('#" + this.Date1.ClientID + @"').datepicker({dateFormat: 'dd/mm/yy', constrainInput: true}); });"; Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID, clientScript, true); //Type t = this.GetType(); //if (!Page.ClientScript.IsStartupScriptRegistered(t, this.ClientID)) //{ // Page.ClientScript.RegisterStartupScript(t, this.ClientID, clientScript, true); //} } Ignore commented out stuff - that was me trying something different - didn't help. My issue is that this all works fine when I load the page. But if I select something from a dropdownlist causing a page postback - when I click into my date fields they stop working. As in I should be able to click into the textbox and a nice calendar control appears. But after postback there is no nice calendar control appearing! It's currently all wrapped (in the hosting page) inside an update panel. So I comment out the update panel stuff and the dates are working after page postback. So it appears to be something related to that update panel. Any suggestions please? Thanks!!

    Read the article

  • How to define a default tooltip style for all Controls

    - by skjagini
    I would like to define a style with a template when there are validation errors and would display the first error message as a tooltip. It works fine when targeting specific control like DatePicker in the following xaml. <Style TargetType="{x:Type ToolKit:DatePicker}"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/> </Trigger> </Style.Triggers> </Style> I cannot get it to work for Control though, i.e. the following doesn't give any tooltip <Style TargetType="{x:Type ToolKit:Control}"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/> </Trigger> </Style.Triggers> </Style> Any idea?

    Read the article

  • Invalid controller using custom routes

    - by AlexW
    I've been following the instruction on how to create custom routes from the book Zend Framework - A Beginners Guide I've changed my application.ini file to include this routing information: resources.router.routes.static-content.route = /content/:page resources.router.routes.static-content.defaults.module = default resources.router.routes.static-content.defaults.controller = static-content resources.router.routes.static-content.defaults.view = static-content resources.router.routes.static-content.defaults.action = display Given the above configuration, I have this controller: <?php class Default_StaticContentController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function displayAction() { // action body $page = $this->getRequest()->getParam('page'); if (file_exists($this->view->getScriptPath(null) . '/' . $this->getRequest()->getControllerName() . '/' . $page . $this->viewSuffix )) { $this->render($page); } else { throw new Zend_Controller_Action_Exception('HLC - Page not found', 404); } } } I have a view named about.phtml in the APPLICATION_PATH/modules/default/views/static-content folder. What ahppens is I get an error saying: An error occurred Page not found Exception information: Message: Invalid controller class ("StaticContentController") Stack trace: #0 /Applications/MAMP/htdocs/zend/library/Zend/Controller/Dispatcher/Standard.php(262): Zend_Controller_Dispatcher_Standard->loadClass('StaticContentCo...') #1 /Applications/MAMP/htdocs/zend/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #2 /Applications/MAMP/htdocs/zend/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch() #3 /Applications/MAMP/htdocs/zend/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #4 /Applications/MAMP/htdocs/HLC/public/index.php(26): Zend_Application->run() #5 {main} Request Parameters: array ( 'page' => 'about', 'module' => 'default', 'controller' => 'static-content', 'view' => 'static-content', 'action' => 'display', ) Note that it is not rendering my customised Zend_Controller_Action_Exception but throwing the global error. I'm using the URL: http://hlc.local:8888/content/about The default index action works ok, just this routing that's not working.

    Read the article

  • Can't use my form

    - by Alexandr
    I have class with my form in folder /application/forms/Auth.php it looks like class Form_Auth extends Zend_Form { public function __construct() { $this->setName(); parent::__construct(); $username = new Zend_Form_Element_Text('username'); $password = new Zend_Form_Element_Password('password'); $mail = new Zend_Form_Element_Text('mail'); $submit = new Zend_Form_Element_Submit('submit'); $this->addElements(array($username,$password,$mail,$submit)); } } When i try create object $this->view->form = new Form_Auth(); is see exeption Application error Exception information: Message: Invalid name provided; must contain only valid variable characters and be non-empty Stack trace: D:\WWW\zends\application\Forms\Auth.php(8): Zend_Form-setName() d:\WWW\zends\application\controllers\RegistrationController.php(49): Form_Auth-__construct() D:\WebServer\ZendFramework\ZendFramework\library\Zend\Controller\Action.php(513): RegistrationController-indexAction() D:\WebServer\ZendFramework\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php(289): Zend_Controller_Action-dispatch('indexAction') D:\WebServer\ZendFramework\ZendFramework\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard-dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) D:\WebServer\ZendFramework\ZendFramework\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front-dispatch() D:\WebServer\ZendFramework\ZendFramework\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap-run() D:\WWW\zends\public\index.php(26): Zend_Application-run() {main} Request Parameters: array ( 'controller' = 'registration', 'action' = 'index', 'module' = 'default', ) the version zf is 1.10.3 what i do wrong ?

    Read the article

  • WPF - How do I use the UserControl with a dependency property and view model?

    - by user320849
    Hello, My goal is to have a user select a year and a month. Translate the selection into a date and have the user control send the date back to my view model. That part works for me....However, I cannot get the ViewModel's initial date to set those drop downs. public static readonly DependencyProperty Date = DependencyProperty.Register("ReturnDate", typeof(DateTime), typeof(DatePicker), new FrameworkPropertyMetadata{BindsTwoWayByDefault = true,}); public DateTime ReturnDate { get { return Convert.ToDateTime(GetValue(Date)); } set { SetDropDowns(value); SetValue(Date, value); } } The SetDropDowns(value) just sets the selected items on the combo boxes, however, the program never makes it to that method. On the view I am using: <cc1:DatePicker ReturnDate="{Binding Path=StartDate, Mode=TwoWay}" IsStart="True" /> If this has been answered, then my bad. I looked around and didn't see anything that worked for me. Thus, when the program loads how do I get the value from the view model to a method in order to set the combo boxes? Thanks, -Scott

    Read the article

  • CONSOLE appender was turned off. But JBoss still writes some traces to STDOUT

    - by Vladimir Bezugliy
    CONSOLE appender was turned off. But JBoss still writes some traces to STDOUT during startup. Why? C:\as\jboss-5.1.0.GA\bin>start.cmd Calling C:\as\jboss-5.1.0.GA\bin\run.conf.bat =============================================================================== JBoss Bootstrap Environment JBOSS_HOME: C:\as\jboss-5.1.0.GA JAVA: C:\as\jdk1.6.0_07\bin\java JAVA_OPTS: -Dprogram.name=run.bat -Xms512M -Xmx758M -XX:MaxPermSize=256M -server CLASSPATH: C:\as\jboss-5.1.0.GA\bin\run.jar =============================================================================== 13:11:25,080 INFO [ServerImpl] Starting JBoss (Microcontainer)... 13:11:25,080 INFO [ServerImpl] Release ID: JBoss [The Oracle] 5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053) 13:11:25,080 INFO [ServerImpl] Bootstrap URL: null 13:11:25,080 INFO [ServerImpl] Home Dir: C:\as\jboss-5.1.0.GA 13:11:25,080 INFO [ServerImpl] Home URL: file:/C:/as/jboss-5.1.0.GA/ 13:11:25,080 INFO [ServerImpl] Library URL: file:/C:/as/jboss-5.1.0.GA/lib/ 13:11:25,080 INFO [ServerImpl] Patch URL: null 13:11:25,080 INFO [ServerImpl] Common Base URL: file:/C:/as/jboss-5.1.0.GA/common/ 13:11:25,080 INFO [ServerImpl] Common Library URL: file:/C:/as/jboss-5.1.0.GA/common/lib/ 13:11:25,080 INFO [ServerImpl] Server Name: web 13:11:25,080 INFO [ServerImpl] Server Base Dir: C:\as\jboss-5.1.0.GA\server 13:11:25,080 INFO [ServerImpl] Server Base URL: file:/C:/as/jboss-5.1.0.GA/server/ 13:11:25,080 INFO [ServerImpl] Server Config URL: file:/C:/as/jboss-5.1.0.GA/server/web/conf/ 13:11:25,080 INFO [ServerImpl] Server Home Dir: C:\as\jboss-5.1.0.GA\server\web 13:11:25,080 INFO [ServerImpl] Server Home URL: file:/C:/as/jboss-5.1.0.GA/server/web/ 13:11:25,080 INFO [ServerImpl] Server Data Dir: C:\as\jboss-5.1.0.GA\server\web\data ...

    Read the article

  • jQuery/JavaScript Date form validation

    - by Victor Jackson
    I am using the jQuery date picker calendar in a form. Once submitted the form passes params along via the url to a third party site. Everything works fine, except for one thing. If the value inserted into the date field by the datepicker calendar is subsequently deleted, or if the default date, that is in the form on page load, is deleted and the form is submitted I get the following error: "Conversion from string "" to type 'Date' is not valid." The solution to my problem is really simple, I want to validate the text field where the date is submitted and send out a default date (current date) if the field is empty for any reason. The problem is I am terrible at Javascript and cannot figure out how to do this. Here is the form code for my date field. [var('default_date' = date)] <input type="text" id="datepicker" name="txtdate" value="[$default_date]" onfocus="if (this.value == '[$default_date]') this.value = '';" onchange="form.BeginDate.value = this.value; form.EndDate.value = this.value;" /> <input type="hidden" name="BeginDate" value="[$default_date]"/> <input type="hidden" name="EndDate" value="[$default_date]"/>

    Read the article

  • Invalid quantifer error using Regular Expression (UK Telephone numbers)

    - by Matt
    HI all, as per the title I am getting the error "Invalid Quantifier" Trying to match this reg ex:- ^(((+44\s?\d{4}|(?0\d{4})?)\s?\d{3}\s?\d{3})|((+44\s?\d{3}|(?0\d{3})?)\s?\d{3}\s?\d{4})|((+44\s?\d{2}|(?0\d{2})?)\s?\d{4}\s?\d{4}))(\s?#(\d{4}|\d{3}))?$ Infact ive tried a few UK telephone number regex's from the regex librairy but im getting the same error all the time. If anyone can help id be much appreciative! Just for info, im using the jQuery form validation librairy, and here is my code: - $(document).ready(function(){ //Set Fields to be validated $("#EventForm").validate(); $( "#StartDate" ).datepicker(); $( "#EndDate" ).datepicker(); //Add Postcode Regex Method to Validator Function $.validator.addMethod( "postcode", function(value, element, regexp) { var check = false; var re = new RegExp(regexp); return this.optional(element) || re.test(value); }, "Please enter a valid postcode." ); //Add UK Telephone number Regex Method to Validator Function $.validator.addMethod( "telephone", function(value, element, regexp) { var check = false; var re = new RegExp(regexp); return this.optional(element) || re.test(value); }, "Please enter a valid UK telephone number in the format - 01856 666666." ); //Add Postcode Regular Expression Rule to Postcode Field $("#EventPostcode").rules("add", { postcode: "^([a-zA-Z]){1}([0-9][0-9]|[0-9]|[a-zA-Z][0-9][a-zA-Z]|[a-zA-Z][0-9][0-9]|[a-zA-Z][0-9]){1}([ ])([0-9][a-zA-z][a-zA-z]){1}$"}); $("#EventTelephoneNo").rules("add", { telephone: "^(((\+44\s?\d{4}|\(?0\d{4}\)?)\s?\d{3}\s?\d{3})|((\+44\s?\d{3}|\(?0\d{3}\)?)\s?\d{3}\s?\d{4})|((\+44\s?\d{2}|\(?0\d{2}\)?)\s?\d{4}\s?\d{4}))(\s?\#(\d{4}|\d{3}))?$"}); }); Many thanks

    Read the article

  • JSDoc with AngularJS

    - by Nick White
    Currently within my Project we are using JSDoc, we have recently started to implement Angular and I want to continue using JSDoc to ensure that all the documentation is within the same place. I have taken a look at people mainly just saying to use ngDoc but this isn't really a viable option as we will always have separate JavaScript and I ideally would have everything together. /** * @author Example <[email protected]> * @copyright 2014 Example Ltd. All rights reserved. */ (function () { window.example = window.example || {}; /** * Example Namespace * @memberOf example * @namespace example.angular */ window.example.angular = window.example.angular || {}; var exAngular = window.example.angular; /** * A Example Angular Bootstrap Module * @module exampleAngularBootstrap */ exAngular.bootstrap = angular.module('exampleAngularBootstrap', [ 'ngRoute', 'ngResource', 'ngCookies' ]) .run(function ($http, $cookies) { $http.defaults.headers.post['X-CSRFToken'] = $cookies.csrftoken; $http.defaults.headers.common['X-CSRFToken'] = $cookies.csrftoken; }); })(); Currently this is what I have but am unable to put documentation for the run() any ideas? Thank you in advanced!

    Read the article

  • Appropriate use of die()?

    - by letseatfood
    I create pages in my current PHP project by using the following template: <?php include 'bootstrap.php'; head(); ?> <!-- Page content here --> <?php foot(); ?> Is the following example an appropriate use of die()? Also, what sort of problems might this cause for me, if any? <?php include 'bootstrap.php'; head(); try { //Simulate throwing an exception from some class throw new Exception('Something went wrong!'); } catch(Exception $e) { ?> <p>Please fix the following errors:</p> <p><?php echo $e->getMessage(); ?></p> <?php foot(); die(); } //If no exception is thrown above, continue script doSomething(); doSomeOtherThing(); foot(); ?> ?> <?php foot(); ?> Basically, I have a script with multiple tasks on it and I am trying to set up a graceful way to notify the user of input errors while preventing the remaining portion of the script from executing. Thanks!

    Read the article

  • Rails 3) Delete, Destory, and Routing

    - by Maximus S
    The problem is the code below <%= button_to t('.delete'), @post, :method => :delete, :class => :destroy %> My Post model has many relations that are dependent on delete. However, the code above will only remove the post, leaving its relations intact. The problem is that methods delete and destroy are different in that method delete doesn't instantiate the object. So I need to use "destroy" instead of "delete" my post. <%= button_to t('.delete'), @post, :method => :destroy %> gives me routing error. No route matches [POST] "/posts/2" <%= button_to t('.delete'), @post, Post.destroy(@post) %> deletes the post without clicking the button. Could anyone help me with this? UPDATE: application.js //= require jquery //= require jquery-ui //= require jquery_ujs //= require bootstrap-modal //= require bootstrap-typeahead //= require_tree . rake routes DELETE (/:locale)/posts/:id(.:format) posts#destroy Post model has_many :tag_links, :dependent => :destroy has_many :tags, :through => :tag_links Tag model has_many :tag_links, :dependent => :destroy has_many :posts, :through => :tag_links Problem: When I delete a post, all the tag_links are destroyed but tags still exist.

    Read the article

  • End-date greater than start-date validation javascript not working properly

    - by ianco slovak
    I am trying to make a validation for my dates so that enddate to be greater than start date but is not working.What am i doing wrong? <head> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-ui-1.8.19.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery-ui.unobtrusive.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery-ui.unobtrusive-0.5.0.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/gen_validatorv4.js")" type="text/javascript"></script> </head> @using (Html.BeginForm("SearchFree", "Reservation", FormMethod.Get,new {id = "form" })) { <h7>Introduceti perioada Rezervarii</h7> <div class="editor-label"> <label id="cautare" for="StartDate">Data Intrare: </label>@(Html.JQueryUI().Datepicker("StartDate").DateFormat("mm-dd-yy").MinDate(DateTime.Today).ShowButtonPanel(true).ChangeYear(true).ChangeMonth(true).NumberOfMonths(2)) </div> <div class="editor-label"> <label id="cautare" for="EndDate">Data Iesire:</label>@(Html.JQueryUI().Datepicker("EndDate").DateFormat("mm-dd-yy").MinDate(DateTime.Today).ShowButtonPanel(true).ChangeYear(true).ChangeMonth(true).NumberOfMonths(2)) </div> <p> <input id="buton1" type="submit" value="Cauta camere libere" /> </p> } <script type="text/javascript"> $(document).ready(function () { $.validator.addMethod("EndDate", function (value, element) { var startDate = $('.StartDate').val(); return Date.parse(startDate) <= Date.parse(value); } , "* End date must be after start date"); $('.form').validate(); }); </script>

    Read the article

  • How to format JSON Date?

    - by Mark Struzinski
    I'm taking my first crack at AJAX with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON that is returned for Date data types. Basically, I'm getting a string back that looks like this: /Date(1224043200000)/ From a total newbie at JSON - How do I format this to a short date format? Should this be handled somewhere in the jQuery code? I've tried the jQuery.UI.datepicker plugin using $.datepicker.formatDate() wiuth no success. FYI: Here's the solution I came up with using a combination of the answers here: function getMismatch(id) { $.getJSON("Main.aspx?Callback=GetMismatch", { MismatchId: id }, function(result) { $("#AuthMerchId").text(result.AuthorizationMerchantId); $("#SttlMerchId").text(result.SettlementMerchantId); $("#CreateDate").text(formatJSONDate(Date(result.AppendDts))); $("#ExpireDate").text(formatJSONDate(Date(result.ExpiresDts))); $("#LastUpdate").text(formatJSONDate(Date(result.LastUpdateDts))); $("#LastUpdatedBy").text(result.LastUpdateNt); $("#ProcessIn").text(result.ProcessIn); } ); return false; } function formatJSONDate(jsonDate){ var newDate = dateFormat(jsonDate, "mm/dd/yyyy"); return newDate; } This solution got my object from the callback method and displayed the dates on the page properly using the date format library.

    Read the article

  • How to set up site specific configuration vs application configuration in Zend Framework?

    - by rbruhn
    Being fairly new to Zend Framework, I've been reading and trying out various tutorials on the web and books I've purchased. One thing all the tutorials do is hard code certain values into into the bootstrap or other code. For example, setting the title: $this-_view-headTitle('MySite'); I realize this can be set in the application.ini file, but I don't think that is appropriate either if you are distributing the application to other sites. I would be interested in hearing ideas where application specific settings are set in the application.ini file and loaded: $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH.'/configs/application.ini' ); Then somewhere in the bootstrap, checking for a config.ini file and adding these to currently existing application config array, and if config.ini does not exist, retrieving such site specific configs from a database and writing the config.ini file (Obviously the file deleted and rewritten if a value is changed in the database). I don't need to see how the file is written or what not... just a general idea of how others are handling such things. Or provide different ideas of doing this? I would rather end up using something like this when setting various site specific configurations: $this->_view->headTitle($config->site->title); Hope this makes sense :-)

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >