Search Results

Search found 18749 results on 750 pages for 'komodo edit'.

Page 6/750 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • ASP.NET MVC Concurrency with RowVersion in Edit Action

    - by Jorin
    I'm wanting to do a simple edit form for our Issue Tracking app. For simplicity, the HttpGet Edit action looks something like this: // Issues/Edit/12 public ActionResult Edit(int id) { var thisIssue = edmx.Issues.First(i => i.IssueID == id); return View(thisIssue); } and then the HttpPost action looks something like this: [HttpPost] public ActionResult Edit(int id, FormCollection form) { // this is the dumb part where I grab the object before I update it. // concurrency is sidestepped here. var thisIssue = edmx.Issues.Single(c => c.IssueID == id); TryUpdateModel(thisIssue); if (ModelState.IsValid) { edmx.SaveChanges(); TempData["message"] = string.Format("Issue #{0} successfully modified.", id); return RedirectToAction("Index"); } return View(thisIssue); } Which works wonderfully. However, the concurrency check doesn't work because in the Post, I'm re-retreiving the current entity right before I attempt to update it. However, with EF, I don't know how to use the fanciness of SaveChanges() but attach my thisIssue to the context. I tried to call edmx.Issues.Attach(thisIssue) but I get The object cannot be attached because it is already in the object context. An object can only be reattached when it is in an unchanged state. How do I handle concurrency in MVC with EF and/or how do I properly Attach my edited object to the context? Thanks in advance

    Read the article

  • jeditable not updating browser display - leaves "click to edit..." after succesful edit

    - by Enoch
    I am using jeditable fairly simply and it all works fine, updates the database, etc. The only problem I have is after the user types the new value data and hits enter it doesn't update the field in the browser to show the new value - instead it puts "Click to edit..." in place of it. Am I missing something like a return value from my php file? the php fucntion just takes the args and updates the database - and it works fine. Enoch the jquery\jeditable code $('.edit').editable('update.php',{ id: 'field', name: 'val', indicator: 'Saving...', tooltip: 'Click to edit...', select : true, submitdata : { db : "pers", kn : "key", rec : "?php echo $rec; ?" } }); the div <div class="edit" id="svc_ad1"><?php echo $row-svc_ad1; ?>< /div> i also have a css class for pEdit edit{ float:left; width:200px; height:15px; margin-bottom:5px; border-bottom:1px solid #aaaaaa; }

    Read the article

  • Best way for programmers to edit XAML

    - by JessicaB
    I was wondering how programmers chose to edit XAML. Most of the programmers I speak to seem to edit the raw XML, but that seems nuts to me since it is such a natural thing for a more visual editor (of course you often have to get down to the raw code ultimately, but isn't there a better way to lay out a grid, or edit a template, or add non c# triggers or manage commands? The one that really set me off was editing a menu -- Visual Studio 1.0 had a better menu editor for C++ than the raw XAML editing experience.) When I edit .aspx files I use a visual editor much of the time, and then for the raw stuff I get into the html code. I am aware of Expression Blend, but that seems far more focused on artistic types and GUI experts rather than programmers. Does anyone have recommendations for a better editor for XAML than VS? Especially so since VS seems to have real nasty problems with XAML editing too, like bugginess and poor performance? Appreciate your helping this XAML newbie.

    Read the article

  • edit opencart header.tpl

    - by user1693350
    I'm trying to edit the header.tpl of an opencart website that uses vqmod - I need to add some more info (text) to each menu link, so basically edit the header file. I've looked into the vqmod manager and files but I can't seem to get it right. Unfortunately, whenever I try to edit the header file, the site breaks -I've tried editing the cached vqmod files as well, no luck with that. Is there a way to reset the vqmod / disable it, then edit the header.tpl and enable vqmod again? Do I need to install a new theme and start from scratch ? Thanks heaps!

    Read the article

  • Redirecting from an update action to the referrer of the edit

    - by Mark Westling
    My Rails 2.3 application has a User model and the usual controller actions. The edit form can be reached two ways: when a user edits his own profile from the home page, or when an admin user edits someone else's profile from users collection. What I'd like to do is have the update action redirect back to the referred of the edit action, not the update action. If I do a simple redirect_to(:back) within update, it goes back to the edit form -- not good. One solution is to forget entirely about referrers and redirect based on the current_user and the updated user: if they're the same, go back to the home page, else go to the users collection page. This will break if I ever add a third path to the edit form. It's doubtful I'll ever do this but I'd prefer a solution that's not so brittle. Another solution is to store the referrer of edit form in a hidden field and then redirect to this value from inside the update action. This doesn't feel quite right, though I can't explain why. Are there any better approaches? Or, should I stop worrying and go with one of the two I've mentioned?

    Read the article

  • No route matches when trying to edit

    - by mmichael
    Here's the scoop: I've created a test app that allows users to create ideas and then add "bubbles" to these ideas. Currently, a bubble is just text. I've successfully linked bubbles to ideas. Furthermore, when a user goes to view an idea it lists all of the bubbles attached to that idea. The user can even delete the bubble for any given idea. My problem lies in editing bubbles. When a user views an idea, he sees the idea's content as well as any bubbles for that idea. As a result, I've set all my bubble controls (editing and deleting) inside the ideas "show" view. My code for editing a bubble for an idea is <%= link_to 'Edit Bubble', edit_idea_bubble_path %>. I ran rake routes to find the correct path for editing bubbles and that is what was listed. Here's my error: No route matches {:action=>"edit", :controller=>"bubbles"} In my bubbles controller I have: def edit @idea = Idea.find(params[:idea_id]) @bubble = @idea.bubbles.find(params[:id]) end def update @idea = Idea.find(params[:idea_id]) @bubble = @idea.bubbles.find(params[:id]) respond_to do |format| if @bubble.update_attributes(params[:bubble]) format.html { redirect_to(@bubble, :notice => 'Bubble was successfully updated.') } format.xml { head :ok } else format.html { render :action => "Edit" } format.xml { render :xml => @bubble.errors, :status => :unprocessable_entity } end end end To go a step further, I have the following in my routes.rb file resources :ideas do resources :bubbles end So far everything seems to function except when I try to edit a bubble. I'd love some guidance. Thanks!

    Read the article

  • How to let users edit list<T> content?

    - by iTayb
    I'm making an aspx page that can edit books. A book is an complex class with lots of properties. I've made an edit page for most of them, however I'm having trouble with showing edit options for my Sellers Proprety. It is an list<Seller> object. Seller is as follows: public class Seller { private string sellerName; private double price; } How can I print a list to the screen, and let the clinet edit it, then load it back to the object? Thank you very much.

    Read the article

  • WPF Edit hours and minutes of a DateTime

    - by PaN1C_Showt1Me
    Hi ! I have 3 TextBoxes to edit a DateTime. One to edit the Date and 2 to edit hour and minutes. How would you do that? The code below doesn't reflect the DateTime changes when editing the hour or minute: <TextBox Text="{Binding MyDateTime}" /> <TextBox Text="{Binding MyDateTime, StringFormat=\{0:HH\}}}" /> <TextBox Text="{Binding MyDateTime}, StringFormat=\{0:mm\}}" />

    Read the article

  • asp.net mvc DataViewModel Problem no insert and edit

    - by mazhar
    using the code DataViewModel with one form for create and edit with partial view , in the code below In the create*I am not able to enter the values to the database*,In the edit Mode I am not able to display the value as well in the textboxes for edit public class OrganizationGroupFormViewModel { // Properties public OrganizationGroup OrganizationGroup { get; private set; } public OrganizationGroupFormViewModel(OrganizationGroup organizationGroup) { OrganizationGroup = organizationGroup; } } public class OrganizationGroupsController : Controller { // // GET: /OrganizationGroups/ OrganizationGroupsRepository OrganizationGroupRepository = new OrganizationGroupsRepository(); OrganizationUsersDataContext _db = new OrganizationUsersDataContext(); public ActionResult Create() { try { OrganizationGroup OrgGroup = new OrganizationGroup() { int_CreatedBy=1, dtm_CreatedDate=DateTime.Now }; return View(new OrganizationGroupFormViewModel(OrgGroup)); } catch { return View(); } } [HttpPost] public ActionResult Create(OrganizationGroup OrgGroup) { if (ModelState.IsValid) { OrgGroup.int_CreatedBy = 1; OrgGroup.dtm_CreatedDate = DateTime.Now; OrganizationGroupRepository.Add(OrgGroup); OrganizationGroupRepository.Save(); return RedirectToAction("Details", new { id = OrganizationGroupRepository.int_OrganizationGroupId }); } return View(new OrganizationGroupFormViewModel(OrgGroup)); } // // GET: /OrganizationGroups/Edit/5 public ActionResult Edit(int id) { try { var OrgGroup = _db.OrganizationGroups.First(m => m.int_OrganizationGroupId == id); if (ModelState.IsValid) { OrgGroup.int_ModifiedBy = 1; OrgGroup.dtm_ModifiedDate = DateTime.Now; } return View(new OrganizationGroupFormViewModel(OrgGroup)); } catch { return View(); } } // // POST: /OrganizationGroups/Edit/5 [HttpPost] public ActionResult Edit(int id, FormCollection collection) { try { var OrgGroup = _db.OrganizationGroups.First(m => m.int_OrganizationGroupId == id); if (ModelState.IsValid) { OrgGroup.int_ModifiedBy = 1; OrgGroup.dtm_ModifiedDate = DateTime.Now; TryUpdateModel(OrgGroup); OrganizationGroupRepository.Save(); } return RedirectToAction("Details", new { id = OrgGroup.int_OrganizationGroupId }); } catch { return View(); } } Create View; <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Egovst.Controllers.OrganizationGroupFormViewModel>" %> Create Organization Group <h2>Create</h2> <%= Html.ValidationSummary(true) %> <div> <% Html.RenderPartial("OrganizationGroup"); %> </div> Organization Group User Control <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Egovst.Controllers.OrganizationGroupFormViewModel>" %> <% using (Html.BeginForm()) {%> <%= Html.ValidationSummary(true) %> <fieldset> <legend>Fields</legend> <div class="editor-label"> Organization Group Name: </div> <div class="editor-field"> <%= Html.TextBoxFor(model => model.OrganizationGroup.vcr_OrganizationGroupName)%> <%= Html.ValidationMessageFor(model => model.OrganizationGroup.vcr_OrganizationGroupName)%> </div> <div class="editor-label"> Organization Group Description: </div> <div class="editor-field"> <%= Html.TextAreaFor(model => model.OrganizationGroup.vcr_OrganizationGroupDesc)%> <%= Html.ValidationMessageFor(model => model.OrganizationGroup.vcr_OrganizationGroupDesc)%> </div> <p> <input type="submit" value="Save" /> </p> </fieldset> <% } %>

    Read the article

  • Put specific tds from a table row into edit using jQuery (then update w/ ajax)

    - by bbqsauced
    I'm somewhat new to jQuery, so I could use some help here. This is my issue: I have a php script outputting a dynamic table. Each row has an "edit" button, plus some other fields. Only 3 of those need to be turned into an input box. The edit button should only put that specific row into "edit mode." I got as far as assigning each row a unique class by adding a number to the end of it. I have been able to use jQuery to change all of the rows into edit mode, but I need it to be specific to a row. An example row would have classes like name0, price0, and desc0. The next row would go on to classes name1, price1, and desc1 (for the fields that need changed). How can I reference these values and pass them to jQuery so it processes an event on just those elements?

    Read the article

  • Image edit and mysql

    - by Felicita
    I have a simple table for reference page: id name description image In reference.php, A form upload image to a folder and save image's name in image section. In reference.php?action=edit page I want to edit the image. What is correct way to edit? Uploading another image and update the table? Thanks

    Read the article

  • Drupal User Permissions, Only Allow Specific Users to Edit Specific Pages

    - by jordanstephens
    I know I can set up a role to allow user's to only edit their own pages, then go mark the appropriate pages to be authored by the appropriate user. But then I run into multiple users per page problems. Is there any way that you can explicitly only allow a user to edit certain (perhaps multiple) pages, while accounting for overlap in the case that more than one user may be allowed to edit the same page? Thank you

    Read the article

  • I can't able to edit my column name after saving

    - by Midhun M
    I create a new table of employee now I want to edit one of the column name in that table. I can edit but while saving a pop up window asks to save some text file. How may I resolve this? Is it possible to edit without creating a new table? The text file is /* Friday, August 22, 20144:32:53 PM User: Server: MIDHUN\SQLEXPRESS Database: LinQ Application: */ employee

    Read the article

  • EventKitUI view and edit problem!

    - by Alish
    I try to to find a solution to do View and Edit of a the item from a tablview. My application base on UITabBarController. Each of the Bar items contain a class with a a couple of UIViews. This is the first items of UITabBarController. I done Add event from Apple sample code: SimpleEKDemo. Add Event working without any problem. I tried to add View and Edit part to the code. I would able to select an items from tableView to edit the selected item. But after I tried to add code from SimpleEKDemo to my code, I realized I have to add UINavigationController to the implement. So I did. After I add that it's came to the items of UITabBarController. Also I even the Add Event didn't worked very well (I couldn't insert event name and location. but edit was working. So I need to know: 1- Is it possible to implement Edit/View without using UINavigationController. If yes please let me know a sample code. 2- If I must use UINavigationController. Because I don't need UINavigationController to become it the first page and I don't need any bar added to my application. Is it possible it's appear in the application when I choose a item of tableView but appear alike that! Snapshots: https://public.me.com/alish (pict.zip)

    Read the article

  • get the right id of a record in database in each click on the edit button

    - by kawtousse
    hi every one, i am facing a big problem right now. I have a html table in each row i have a button called edit allowing user to relod the form with parameter that he has selected. for this i define a hidden type to get the id of the record in database to access to various colonne and to refresh the form with those parameters. My challenge now is how to get the right id in every click on the edit button to let me after to get the right record and to update it in the data base. I am preceeding like the following: retour.append("<td style=border-right:#FFF bordercolor=#FFFFFF>"); retour.append("<input type=\"hidden\" id=\"id_"+nomTab+"_"+compteur+"\" value=\""+object.getIdDailyTimeSheet()+"\" name=\"hd"+compteur+"\" />"); retour.append("<button id=edit name=edit type=button onClick= editarow()>"); retour.append("<img src=edit.gif />"); retour.append("</button>"); retour.append("</td>"); i realise the submit in javascript and i want to get the idDailyTimesheet everyonce the user click the submit button. thanks for help.

    Read the article

  • How to fix GRUB after Windows breaks it, and how to edit the GRUB menu

    - by Rob Kam
    I had Windows XP and Ubuntu both installed. I could easily boot into either until Windows "fixed" the bootloader so that it now only boots into Windows. I guess there is no way to prevent Windows from doing this. So instead when it happens how do I quickly restore the GRUB bootloader? Also while I'm here: How do I edit the GRUB menu, to hide options I don't want and to change the default boot OS?

    Read the article

  • edit .avi movie cut

    - by c0mrade
    Hello everybody, how can I edit .avi file .. let say I want first 20 seconds to play and from 120th sec untill 150th sec .. and take that out of the entire movie, with which software I can do that ?

    Read the article

  • How can I edit/tweak Tomato firmware?

    - by HardwareMuch
    How do other people tweak or edit Tomato firmware? I'm interested in this because I do not need QoS. I have another router that does not have as much RAM and I want to have a micro Tomato firmware. I know there is DD-WRT micro but I like Tomato much more. What programming language is used in making Tomato firmware?

    Read the article

  • edit files in unix

    - by Niklas
    Hi, I started to work in unix for couple of weeks ago and can very little about unix. Everytime I edit a file, a temp file~ appears in the filesystem. What does this mean? Can I just remove all these files? What can I do for removing these files automaticaly everytime I close the original file? /Niklas

    Read the article

  • Edit subject line of received email in Thunderbird 3.0

    - by Erik
    Is there a way to edit the subject line of emails you've received in Thunderbird? I use email a lot for work and it would be a lot easier if I could change subjects to make things easier to find later. I found a plug-in but it only works for Thunderbird up to 2.0 and I'd rather not have to downgrade to get this feature.

    Read the article

  • Edit the command line path for an executable on OSX [closed]

    - by Stu
    Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? I have the default package of Ruby installed that shipped with the OS, which is an older version. I have recently installed MacPorts with the latest Ruby version which is installed in a seperate location:- /opt/local/bin/ But when I run which ruby I get /usr/bin/ruby Is there any way to edit the path of the command ruby so it would reference the new installation in the /opt/ directory? Thanks in advance.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >