Search Results

Search found 6055 results on 243 pages for 'forms'.

Page 174/243 | < Previous Page | 170 171 172 173 174 175 176 177 178 179 180 181  | Next Page >

  • Rails and MongoDB with MongoMapper

    - by FCastellanos
    I'm new to Rails development and I'm starting with MongoDB also. I have been following this Railscast tutorial about complex forms with Rails but I'm using MongoDB as my database. I'm having no problems inserting documents with it's childs and retrieving the data to the edit form, but when I try to update it I get this error undefined method `assert_valid_keys' for false:FalseClass this is my entity class class Project include MongoMapper::Document key :name, String, :required => true key :priority, Integer many :tasks after_update :save_tasks def task_attributes=(task_attributes) task_attributes.each do |attributes| if attributes[:id].blank? tasks.build(attributes) else task = tasks.detect { |t| t.id.to_s == attributes[:id].to_s } task.attributes = attributes end end end def save_tasks tasks.each do |t| t.save(false) end end end Does anyone knows whats happening here? Thanks

    Read the article

  • App with MVC Virtual application shared AuthCookie.

    - by Razcer
    I have a 3.5 ASP.Net WebForm parent application. The parent uses forms authentication. I have a MVC child virtual application, I would like to make it so the user logs in to the parent application, user then navigates to the virtual application by pressing a link on the parent. However every time I do this it goes to the login screen for the virtual application. Is there a web setting I should double check in Parent? Or Child? Is there an IIS setting that I should check? Should I be using a virtual directory instead of virtual application? I want the child to be able to access the Session[] from the parent. I would like the child app to use the same authCookie as the parent app.

    Read the article

  • How to align MDIChild on left?

    - by lyborko
    Hi, I am trying hard to align MDIChild form to the left of the parent MDIForm setting Align:=alLeft at design time. Aparently aligned MDIChild is higher than parents client area (I do not know why), thats why vertical scrollbar appears on parent form. The problem is, that I want this form create dynamicaly; putting vertical Splitter between these MDIchild forms, in order to size them by mouse. But when I create Splitter it aligns itself totaly on the left, as if MDIChild form was not aligned (alLeft) at all. I set MDIChild parameters to: Align:=alLeft; Windowstate:=wsNormal; Borderstyle:=bsSizable; Does anybody solved this problem before? thanx a lot P.S Delphi 7, Win XP

    Read the article

  • Django - transactions in the model?

    - by orokusaki
    Models (disregard typos / minor syntax issues. It's just pseudo-code): class SecretModel(models.Model): some_unique_field = models.CharField(max_length=25, unique=True) # Notice this is unique. class MyModel(models.Model): secret_model = models.OneToOneField(SecretModel, editable=False) # Not in the form spam = models.CharField(max_length=15) foo = models.IntegerField() def clean(self): SecretModel.objects.create(some_unique_field=self.spam) Now if I go do this: MyModel.objects.create(spam='john', foo='OOPS') # Obviously foo won't take "OOPS" as it's an IntegerField. #.... ERROR HERE MyModel.objects.create(spam='john', foo=5) # So I try again here. #... IntegrityError because SecretModel with some_unique_field = 'john' already exists. I understand that I could put this into a view with a request transaction around it, but I want this to work in the Admin, and via an API, etc. Not just with forms, or views. How is it possible?

    Read the article

  • .net Components ... a Custom Form

    - by carlos
    Hi, I've been working in the creation of some custom components adding functionalites to the basic components such as a Datagridview. Now I want to create a custom Form ... I mean, when I choose add new item in the VS menu, there is a Windows form and some varians of it like an about box, or Dialog, that are simple Forms with a custom controls already on it. I want to have a login form for my set of applications, so this login is avialable for all the development team to use it in the different modules. How can I develop the form and then add it to the "Add New Item" screen? Thanks !!!

    Read the article

  • Is using GET with a tokenID for security a good idea?

    - by acidzombie24
    I was thinking about this and it appears POST only a little less vulnerable and somewhat harder (do to requiring the user to click something). I read about token ids and double submitted cookies and i am not sure what the difference is http://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29_Prevention_Cheat_Sheet#Disclosure_of_Token_in_URL http://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29_Prevention_Cheat_Sheet#Double_Submit_Cookies Right now i have the user id (PK in my table) and a session id so you cant simply change your cookie ID and act like someone else. Now it seems like i put the session id as a token in each of my forms and check them bc attackers cant guess these tokens. However i dislike the idea of putting the session id into the page for ppl to see. But really, is there a problem with that? short of having the user copy/pasting the html is there any attacks that can happen due to the session id being in plain view in html?

    Read the article

  • iframe form not submitting in IE7

    - by Lauren
    For some reason I can submit the form data on this Review and Submit page here in Chrome and FF but not IE7: https://checkout.netsuite.com/s.nl?c=659197&n=1&sc=4&category=confirm Email:[email protected] Pass:test03 Click on "here" where it says "Your Third Party Shipper Numbers (To enter one, click here.)" I removed my javascript that automatically refreshes the page to make sure that wasn't refreshing before anything was submitted somehow. Could the difference in IE7 have to do with the fact that the domain of the form (forms.netsuite.com) is different than the domain of the parent page(checkout.netsuite.com) and it's being submitted over HTTPS?

    Read the article

  • UI form component for ASP NET MVC

    - by Bugeo
    Hi I'd like to find a component that help me to build input forms in asp MVC. I find that ther are many components (grid, tree, tab...) but not a "Form component". I know that i can use the HTML HELPER (.labelfor(.. .inputTextFor(... ) ..but i don't like to write the html tags around the fields and labels ( ... ) I want that all the form in my application look similar and, if a change is needed i want to make it in one place ( ex in the "FormComponentFactory()" for example ) I created my own FormComponent but i find myself reinvent the wheel..

    Read the article

  • filter search results with another form

    - by Ygam
    so here's the problem I have one form, it outputs search results after submit, with this URL http://localhost/thi/search/results?keyword=barma&search=1&minprice=nomin&maxprice=nomax&minroom=nomin&maxroom=nomax&minyear=nomin&maxyear=2010 Now I have another form, which is supposed to filter the results from the previous form by getting the current url of the search results and appending to it the GET variables submitted by this form. I tried filtering before, but that is with anchor links. How am I supposed to do it with forms? Anny approaches?

    Read the article

  • .NET CF on Windows CE - problem with filtering system messages

    - by mack369
    Hello, I'm trying to get every windows message that tells that the user has touched the screen. It works everywhere, except the button, when it is disabled. It seems that the application doesn't get any message when clicked on disabled control. I'm using OpenNetCF Application2 class for filtering messages: Application2.AddMessageFilter(Device.PowerManager); Application2.Run(new MainForm()); PowerManager class contains a following method (as required by IMessageFilter interface): public bool PreFilterMessage(ref Microsoft.WindowsCE.Forms.Message m) { log.DebugFormat("windows message {0} - 0x{0:X}", m.Msg); if (m.Msg == 0x0201 || m.Msg == 0x8001 || m.Msg == 0x0005) { return this.ResetPowerManager(); } return false; } in the log file there is no indication of a windows message when clicking on disabled button. I'm wondering how is it possible and how can I get this message.

    Read the article

  • Custom control in DataViewGrid

    - by Winston
    I'm trying to embed a custom control in a Datagridview. I've looked at the Calendar (http://msdn.microsoft.com/en-us/library/7tas5c80.aspx) example but i just cant get it working for a custom control. I need the control to show for each object in the grid. Not just when the user edits the content. I need to do this so that i can bind my dataviewgrid to a datasource and have it create the required forms in the grid for each my object list. So that the user can do inline editing in the grid without having to double click the row and have a new dialog pop up. Any help would be greatly appreciated.

    Read the article

  • Using Application Settings and reading defaults from app.config

    - by Peter Goras
    Hi, I need to deploy a Windows Forms application using ClickOnce deployment. (VS2008, .NET 3.5) And I need to provide a configuration file for this app that any user can modify. For this reason, I am using Application Settings instead of standard appSetttings in app.config so I can separate the the user config from app config. see http://msdn.microsoft.com/en-us/library/ms228995(VS.80).aspx Creating a Settings.settings file using VS generated a class with hard-coded default values like this: [global::System.Configuration.DefaultSettingValueAttribute("blahblah")] public string MyProperty ... WTF? I want to read the default values from the app.config! So I created my own class deriving from ApplicationSettingsBase but I cannot get this to read values from the app.config. Any ideas?

    Read the article

  • Adding valut to Input field on click

    - by Wazdesign
    I have this structure on form, <input type="test" value="" id="username" /> <span class="input-value">John Smith</span> <a href="#" class="fill-input">Fill Input</a> when user click on the Fill Input , the data from span which has class input-value will be added to value, after clicking a tag the code should be look like this, <input type="test" value="john Smith" id="username" /> <span class="input-value">John Smith</span> <a href="#" class="fill-input">Fill Input</a> there are many forms element/input on the single page. thanks!

    Read the article

  • Custom roles in ASP.NET

    - by MainMa
    Hi, I am working on an ASP.NET website which uses forms authentication with a custom authentication mechanism (which sets e.Authenticated programmatically on protected void Login_Authenticate(object sender, AuthenticateEventArgs e)). I have an ASP.NET sitemap. Some elements must be displayed only to logged in users. Others must be displayed only to one, unique user (ie. administrator, identified by a user name which will never change). What I want to avoid: Set a custom role provider: too much code to write for a such basic thing, Transform the existing code, for example by removing sitemap and replacing it by a code-behind solution. What I want to do: A pure code-behind solution which will let me assign roles on authenticate event. Is it possible? How? If not, is there an easy-to-do workaround?

    Read the article

  • DataBinding and ErrorProvider - How to provide custom error messages?

    - by BeowulfOF
    We use BusinessObjects, implementing IDataErrorInfo and IEditableObject. BindingLists with those Objects are added to BindingSources, those are used to bind UserControls and DataGrids on the forms (WinForms). The BindingSource is additionally set as DataSource to the ErrorProvider of the form. We do use currently TextBoxes for Properties of Type int and short. They are validated inside the BusinessObjects with custom validation, like min/max values, etc. That works fine, since error message form our custom validations show up nicely next to the TextBox. However, if the input is greater than the value of an int (e.g. "9999999999") the BindingSource doesn't even try to enter that Value into the BusinesObject but instead gives the errormessage to the errorprovider like "The value for Int32 was too big.". We do not want to bother our users with "Int32" but want a custom errormessage for that. It is nice, that the BindingSource does provide this feature, but is it possible to provide custom error messages for this?

    Read the article

  • How do i deploy UAT and Development SharePoint solution on the same server ?

    - by Nikhil Vaghela
    I am working on a SharePoint 2010 Server and i have following items in my SharePoint solution Couple of web parts State Machine Work flow (which will be integrated to an Infopath form library) Infopath task edit forms Lets say this solutions is deployed to http://[SharePoint201Server]:[PortNumber-x]/ This is the only server i have (No extra server for UAT), and what ever has been done so far needs to be given for user acceptance testing (UAT). I may create one more site at http://[SharePoint201Server]:[PortNumber-y]/ for it. My problme is that how do i maintain two copies of my source code ? I will have to continue development on the same set of source code for next UAT release. I simply can not create simple copies of the source code as it will have same Assembly name and feature id, etc..As if i do so, any changes on under Development source code would affect UAT assemblies. One thing i can do is to create seperate projects for UAT and Development with different Features and Assembly names, but is not that too much of an unneccesory work ? What can be the best approach in such situation ?

    Read the article

  • How do I "Fire and forget" a WinForms Form?

    - by Neil Barnwell
    What's a good technique to create a WinForms Form instance, display it (non-modally) but not have to keep a reference around to it? Normally, as soon as the variable goes out of scope, the form is closed: var form = new SuperDuperForm(); form.Show(); // Form has probably been closed instantly I don't want to have to keep track of instances of the form, I want it so that when the user closes the form, it is disposed. One idea I've had that I'm going to implement is a kind of controller that I use to open and display forms, that will keep track of them and monitor when they are closed via callbacks. I'm just wondering if there are any neat tricks to get away without that. Any ideas?

    Read the article

  • MSIL code problem

    - by Thomas
    Hi all, I am trying to modiate an assembly (mine) just by ildassembling it and by modifying the MSIL code. I just want to pop a MessageBox. Here is my code : .module extern Fusion.dll .module extern kernel32.dll .module extern advapi32.dll .module extern aspnet_state.exe .module extern webengine.dll .module extern aspnet_wp.exe .module extern mscorwks.dll .module extern ole32.dll .module extern mscoree.dll .module extern Netapi32.dll .assembly extern mscorlib { ... ... IL_0052: ldstr "ahahahahahah" IL_0057: callvirt instance [mscorlib]System.Windows.Forms.MessageBox::Show(string) IL_005c: ldloc.0 IL_005d: ret } // end of method ... I have no error, but the MessageBox does not appear :\ Thanks for helping !

    Read the article

  • Ajax, Multiple Attachments and Paperclip question.

    - by dustmoo
    Alright everyone this is a bit of a complicated setup so if I need to clarify the question just let me know. I have a model: class IconSet < ActiveRecord::Base has_many :icon_graphics end This Model has many icongraphics: class IconGraphic < ActiveRecord::Base belongs_to :icon_set has_attached_file :icon has_attached_file :flagged end As you can see, IconGraphic has two attached files, basically two different versions of the icon that I want to load. Now, this setup is working okay if I edit the icongraphic's individually, however, for ease of use, I have all the icon graphics editable under the IconSet. When you edit the icon set the form loads a partial for the icongraphics: <% form_for @icon_set, :html => {:class => 'nice', :multipart => true} do |f| %> <fieldset> <%= f.error_messages %> <p> <%= f.label :name %> <%= f.text_field :name, :class => "text_input" %> </p> <!-- Loaded Partial for icongraphics --> <div id="icon_graphics"> <%= render :partial => 'icon_graphic', :collection => @icon_set.icon_graphics %> </div> <div class="add_link"> <%= link_to_function "Add an Icon" do |page| page.insert_html :bottom, :icon_graphics, :partial => 'icon_graphic', :object => IconGraphic.new end %> </div> <p><%= f.submit "Submit" %></p> </fieldset> <% end %> This is based largely off of Ryan's Complex Forms Railscast. The partial loads the file_field forms: <div class="icon_graphic"> <% fields_for "icon_set[icon_graphic_attributes][]", icon_graphic do |icon_form|-%> <%- if icon_graphic.new_record? -%> <strong>Upload Icon: </strong><%= icon_form.file_field :icon, :index => nil %><br/> <strong>Upload Flagged Icon: </strong><%= icon_form.file_field :flagged, :index => nil %> <%= link_to_function image_tag('remove_16.png'), "this.up('.icon_graphic').remove()"%><br/> <% else -%> <%= image_tag icon_graphic.icon.url %><br/> <strong>Replace <%= icon_graphic.icon_file_name %>: </strong><%= icon_form.file_field :icon, :index => nil %><br /> <% if icon_graphic.flagged_file_name.blank? -%> <strong>Upload Flagged Icon: </strong><%= icon_form.file_field :flagged, :index => nil %> <% else -%> <strong>Replace <%= icon_graphic.flagged_file_name %>: </strong><%= icon_form.file_field :flagged, :index => nil %> <%= icon_form.hidden_field :flagged, :index => nil %> <% end -%> <%= link_to_function image_tag('remove_16.png'), "mark_for_destroy(this, '.icon_graphic')"%><br/> <%= icon_form.hidden_field :id, :index => nil %> <%= icon_form.hidden_field :icon, :index => nil %> <%= icon_form.hidden_field :should_destroy, :index => nil, :class => 'should_destroy' %> <br/><br/> <%- end -%> <% end -%> </div> Now, this is looking fine when I add new icons, and fill both fields. However, if I edit the IconSet after the fact, and perhaps try to replace the icon with a new one, or if I uploaded only one of the set and try to add the second attachment, paperclip doesn't put the attachments with the right IconGraphic Model. It seems that even though I have the IconGraphic ID in each partial, <%= icon_form.hidden_field :id, :index => nil %> it seems that paperclip either creates a new IconGraphic or attaches it to the wrong one. This all happens when you save the IconSet, which is setup to save the IconGraphic attributes. I know this is complicated.. I may just have to go to editing each icon individually, but if anyone can help, I would appreciate it.

    Read the article

  • Locked DataGridView. Linq is a problem ?

    - by phenevo
    Hi, I get the collection from webservice: var allPlaceHolders = (from ph in new MyService().GetPlaceHolders() select ph).Select(l => new { Code = l.Code, Name = l.Name, Related = false }).ToList(); dgPlaceHoldersAdd.DataSource = allPlaceHolders; Designer.cs: this.dgPlaceHoldersAdd.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgPlaceHoldersAdd.Location = new System.Drawing.Point(3, 54); this.dgPlaceHoldersAdd.Name = "dgPlaceHoldersAdd"; this.dgPlaceHoldersAdd.RowHeadersVisible = false; this.dgPlaceHoldersAdd.Size = new System.Drawing.Size(286, 151); this.dgPlaceHoldersAdd.TabIndex = 15; The problem is, that I can't changing value of checkBox column. I has enabled AutoGeneratedColumns (In datagridview at start there is not any column)

    Read the article

  • Embedded web server and gui framework for .NET applications

    - by Toad
    Hi, I'm looking for a framework which allows me to manage my application through a webbased GUI (using an embedded webserver) instead of winforms. Something like this: http://www.webtoolkit.eu/wt but then for .NET In my code I should be able to instantiate classes (like buttons, forms etc), and when a user browses to a given port, the app should render it as javascript/ajax etc etc. preferably, when buttons are pushed, a notification in my code should be called. this is a less specific question than another one I posted about extjs. I hope this will attract more viewers since it is more generic Thanks. Update: cassini like solutions don't fit the bill. Since the webbrowser is embedded in my application, there is no need for ASP.NET server side scripts. I would rather have the framework, call functions inside my application when things happen on the page. onButtonClicked() for instance.

    Read the article

  • Customizing the behavior of ControlDesigners for Controls derived from native .NET controls.

    - by Eric
    My question is related to this question: http://stackoverflow.com/questions/93541/baseline-snaplines-in-custom-winforms-controls However, in my case, I have created a new control that derives from TextBox rather than containing a TextBox. I would like to have a custom ControlDesigner, but I would like to modify the behavior of the TextBox's designer rather than having to write a complete designer myself. In particular, I'd like to be able to return the TextBox's SnapLines while providing some custom verbs. Is there a good way to do this? EDIT: To clarify, this is for Windows Forms in .NET 2.0.

    Read the article

  • javascript too much recursion?

    - by Ken
    Hi, I'm trying to make a script that automatically starts uploading after the data has been enter in the database(I need the autoId that the database makes to upload the file). When I run the javascript the scripts runs the php file but it fails calling the other php to upload the file. too much recursion setTimeout(testIfToegevoegd(),500); the script that gives the error send("/projects/backend/nieuwDeeltaak.php",'deeltaakNaam='+f.deeltaaknaam.value+'&beschrijving='+ f.beschrijving.value+'&startDatum='+f.startDatum.value+'&eindDatum='+f.eindDatum.value +'&deeltaakLeider='+f.leiderID.value+'&projectID='+f.projectID.value,id); function testIfToegevoegd(){ if(document.getElementById('resultaat').innerHTML == "<b>De deeltaak werd toegevoegd</b>"){ //stop met testen + upload file document.getElementById('nieuwDeeltaak').target = 'upload_target'; document.forms["nieuwDeeltaak"].submit() }else{ setTimeout(testIfToegevoegd(),500); } } testIfToegevoegd(); sorry for the dutch names we have to use them it is a school project. when I click the button that calls all this for a second time (after the error) it works fine.

    Read the article

  • Securing WinForms Application suggestions

    - by Sarah Fordington
    I've been looking for a simple key/license system for our users. Its partly to stop piracy (avoid users from sharing the application around) and the other half to track the number of 'licensed users' we have. I have already read a few good suggestions on SO but I'm curious as to how people have implemented the 30 day evaluation criteria. Do you generate a key that stores the date somewhere and do a comparison each time or is it a little more complicated - deleting the file/removing the registry shouldn't deactivate. Are there any example implementations out there that can give me a head start? The irony is that our PM doesn't want to license a third-party system to do it for us. This is for a Windows Forms application.

    Read the article

  • Displaying untrusted HTML using PHP

    - by esryl
    I have a read a number of excellent questions and answers today about dealing with user input. I am now using htmlspecialchars() to display user data in the create/edit forms (but accepting the raw input via prepared PDO statements into my database). The main question I know have is, what do you do when you are allowing the user to submit HTML which will then be displayed to the public. Obviously htmlspecialchars() is no longer suitable as it just encodes the tags and renders the content useless for purpose. My application is currently accepting HTML from an admin for product descriptions. This would allow a malicious admin to inject potentially unsafe data into public facing pages. How do people cope with this?

    Read the article

< Previous Page | 170 171 172 173 174 175 176 177 178 179 180 181  | Next Page >