Search Results

Search found 2654 results on 107 pages for 'partial'.

Page 1/107 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Use a partial in a partial?

    - by Greg Wallace
    I'm a Rails newbie, so bear with me. I have a few places, some pages, some partials that use: <%= link_to "delete", post, method: :delete, data: { confirm: "You sure?" }, title: post.content %> Would it make sense to make this a partial since it is used repeatedly, sometimes in other partials too? Is it o.k. to put partials in partials?

    Read the article

  • partial classes/partial class file

    - by Ravisha
    In C# .net there is a provision to have two different class files and make them a single class using the keyword partial keyword.this helps it to keep [for ex]UI and logic seperate. of course we can have two classes to achieve this one for UI and other for logic. Can this be achieved in java some how?

    Read the article

  • Partial upgrade on 12.04, how to stop nagging after locking to a working NVIDIA & xorg

    - by alsk
    How to stop the upgrade manager from offering updates and upgrades that potentially would harm my working 2D and 3D graphics? Finally, I got 12.04 working as it should: with nvidia-173 drivers by downgrading xorg and locking the version: On my 32-bit system on Athlon64, with (Albatron) NVIDIA GeForce FX5700XT, locked (/pinned) to xorg 1:7.6-7ubuntu7, xserver-xorg-core 2:11.1-0obuntu10.07, nvidia-173 173.14.35-0ubuntu0.2? An annoying thing left is that every time the updates are checked, I get warning of partial updates, and ambiguous options of "partial update" and "close". Ambiguous in that sense that if I click close, I will get option to update a few packages, which has been OK, while "partial update" would like to update my kernel to 3.2, alter xorg, remove nvidia-173 etc., and update mesa etc. This is not what I call appropriate, after locking XORG and NVIDIA drivers to working ones. One may say according to package management logic it may be correct, but to me as an user it makes little sense. Last Ubuntu that worked without big mess for me was 10.10, hence I will not put 12.10 to my "production" system, until I can be sure it will not trash the system again. P.S. Is there a recommended way to keep NVIDIA GeForce FX working with 3D on Ubuntu... in future?

    Read the article

  • Update Manager offers 900+ updates under partial upgrade mode

    - by TriforceLZG
    Today I checked for updates and got an error message telling me I must do a partial upgrade. I was shocked to see how many updates there were available. 900+ Updates! By using synaptic I found out that it wanted to remove core packages from my system, such as compiz and python, but also update some as well. I am very confused why package manager would want to do this all of a sudden, and why it wants to destroy my system. I really need an answer, because I now cannot update my system.

    Read the article

  • Continuously asking for partial upgrade

    - by udinnet
    I just upgraded my Ubuntu 11.10 to 12.04 after the announcement of the final release of Ubuntu 12.04. The upgrade process went fine. But now when I run the update manager it asks for a partial upgrade. But the funny thing is it installs 84 new packages in installation step, remove all the 84 packages in the cleaning step!!! This is happening recursively(Every time I launch the update manager). Please can you suggest something? Logs can be found in the launchpad bug page. https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/990449

    Read the article

  • Getting NLog Running in Partial Trust

    - by grant.barrington
    To get things working you will need to: Strong name sign the assembly Allow Partially Trusted Callers In the AssemblyInfo.cs file you will need to add the assembly attribute for “AllowPartiallyTrustedCallers” You should now be able to get NLog working as part of a partial trust installation, except that the File target won’t work. Other targets will still work (database for example)   Changing BaseFileAppender.cs to get file logging to work In the directory \Internal\FileAppenders there is a file called “BaseFileAppender.cs”. Make a change to the function call “TryCreateFileStream()”. The error occurs here: Change the function call to be: private FileStream TryCreateFileStream(bool allowConcurrentWrite) { FileShare fileShare = FileShare.Read; if (allowConcurrentWrite) fileShare = FileShare.ReadWrite; #if DOTNET_2_0 if (_createParameters.EnableFileDelete && PlatformDetector.GetCurrentRuntimeOS() != RuntimeOS.Windows) { fileShare |= FileShare.Delete; } #endif #if !NETCF try { if (PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.WindowsNT) || PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.Windows)) { return WindowsCreateFile(FileName, allowConcurrentWrite); } } catch (System.Security.SecurityException secExc) { InternalLogger.Error("Security Exception Caught in WindowsCreateFile. {0}", secExc.Message); } #endif return new FileStream(FileName, FileMode.Append, FileAccess.Write, fileShare, _createParameters.BufferSize); }   Basically we wrap the call in a try..catch. If we catch a SecurityException when trying to create the FileStream using WindowsCreateFile(), we just swallow the exception and use the native System.Io.FileStream instead.

    Read the article

  • asp.net MVC partial view

    - by DotnetSparrow
    Hi all: I have created a function for load event like this: $(function() { $('#dvGames').load( '<%= Url.Action("Partial3", "LiveGame") %>',{ gameDate: '2011-03-06' } ); }); and it works. Also, I have created a function for date change like this: $(function() { $('#datepicker').datepicker({ onSelect: function(dateText, inst) { $.ajax({ type: "POST", url: "/LiveGame/Partial3", data: "gameDate=" + dateText, success: function(result) { alert(result); var domElement = $(result); // create element from html $("#dvGames").append(domElement); // append to end of list } }); } }); }); but it doesnt work. neither it goes in controller action. My controller action is: public ActionResult Partial3(string gameDate) { return PartialView("Partial3"); } Please suggest me solution to this.

    Read the article

  • "partial views" best practices for 'container' divs?

    - by ropstah
    What is the 'best' way to handle the html markup for partial views? (which are also refreshed using AJAX) The biggest issue I run into is where to place the 'container' div... Consider having a masterpage and a partial view. (class="" could be interchanged with id="" depending if the partial is guaranteed to be unique, however this isn't really important to the issue i think) Masterpage: <div id="place1" class="placeholder"> <!-- render partial --> </div> Partial: <div id="partial1" class="partial"> <!-- content --> </div> I feel that something isn't being done right. However I cannot remove the div in the masterpage, because I need that to 'encapsulate' the response from AJAX partial updates. And also I cannot move the div in the partial to the masterpage, because that would require to move 'partial' info to the masterpage... How do you handle this?

    Read the article

  • multiple partial views mvc 2

    - by nik1
    Hello World! Hi guys, I have a master page with two partial viewson it both of which submit to the AccountController. When I click Submit on either of the partial views the following happens: If I declare the partial views like Html.BeginForm("PartialAction1","Account") it redirects to that partial view on clicking submit instead bringing back the default HomeContoller Index view with validation errors. If I declare the partial view forms as Html.BeginForm() then it returns to the default index view of the home controller. But it actually fires both partial view actions inside the AccountController and thus returns validation errors for both partial views simultaneously. What I want is version 2 above with only one action firing instead of two. Am I missing, hopefully, something very simple? I hoping someone can help me or point me in the right direction. Here's the code from my master page for the partial views Html.Action("Login1","Account") Html.Action("Login2", "Account") Many Thanks!

    Read the article

  • C# Sharp: Partial Classes

    - by dcolumbus
    This is quick confirmation question: In order to make partial classes work, I initially thought that there would be a main Class public class ManageDates and then you would create partial classes like public partial class ManageDates to extend the ManageDates class. But from some experiementing, I've come to find out that if you're going to use partial classes, each individual class must be declared public partial class [ClassName] ... Am I correct in this conclusion?

    Read the article

  • Working with partial views

    - by MrW
    Hi. I'm trying to create a page that contains a grid and searching. The issue is that I want to have a partial view for the grid and one for the searching. If doing a search, this should render the grid partial view with the new information. At the moment I need information, such as what column I'm sorting by and so on, from the grid (currently stored in viewdata), in order to do the search as I want to keep those settings. This information is only available in the grid partial though. What's the best approach of this to make it neat and nice in the code, but not a mess to work with? Where can I store information that I need in the other partial view? Partial View 1; <table> <%= Html.CreateGrid(Model, "Grid", "Grid", (int)ViewData["SortColumn"], (bool)ViewData["SortedASC"])%> </table> Partial View 2; <div class="searchControl"> <input type="text" class="SearchBox" href="<%= Url.Action("Grid", "Grid", new {page = 1, columnToSortBy=/* would like to access viewdata from partial view 1 here. */, sortASC = /* would like to access viewdata from partial view 1 here. */ } ) %>" /> <input type="submit" value="Search" class="SearchButton" /> </div> I know I might take the completely wrong approach on this, so feel free to point me in the right one! Thanks!

    Read the article

  • MVC Partial View to Call Display Pop-up window using jquery

    - by Gavin campbell
    Hi I have a index page the renders objects from my database as a treeview, each item has a link href="/MessageGroupType/Edit/1002 that makes an Ajax call to display a partial view in a DIV. Within the partial view there is a delete button which calls my controller to delete the item. However, i do a check to make sure the item can be deleted, if the item cant be deleted then i wish a pop-up to appear back on the edit form telling the user they cant delete this record. In my Edit partial view i have the following code " type="text/javascript" $(function() { $("#dialog").dialog(); }); <% if (Boolean.Parse(ViewData["DisplayWindow"].ToString())){% This Mesage group Type Cannot be deleted as is linked to other message group Types <% }% So my main questions are Can i make a reference to a javascript script within my Partial View (i dont want my master page to be called on the partial view) When i dynamically load the partial view data into my DIV - can i then after calling my controller insert another DIV into the first DIV. I am i doing this the wrong way - so any pointers is appreciated Cheers

    Read the article

  • Does Sandcastle support Entity Framework Partial Classes?

    - by ChrisHDog
    I am attempting to use Sandcastle (and Sandcastle Help File Builder) to do some "auto-documentation" of some classes I am using. The classes that are giving me trouble are some partial classes on Entity Framework items that add methods and properties to those Framework items. The triple slash comments don't appear to come through on the methods and properties created in the partial classes. I have out how to get xml documentation of the base properties using the short summary and long description fields on the .emdx editor, but that doesn't provide a solution for the items in the partial classes. Is this possible? Is it perhaps just settings that I'm not setting correctly to pick up the partial classes? Does Sandcastle do partial classes in non-Entity Framework settings? Is what I'm doing even possible (has anyone else successfully used the xml created from triple slash comments to create documentation on entity framework partial classes, and if so how did you do that)? Any assistance is appreciated

    Read the article

  • MVC Partial View Postback - Jquery validation lost

    - by user415394
    I have a partial view which uses Jquery Valiation. This works OK when initially loaded, however after I do a ajax postback and return the partial view from the server with an error showing, the jquery validation seems to be lost. In that, if I delete a required field and hit save the partial view gets submitted, when I would expect it to show an error message and not get submitted. Does Jquery validation need to be initialised somehow for the form in the partial view?

    Read the article

  • MVC2: Validate PartialView before Form Submit of Page containing Partial View

    - by Pascal
    I am using asp.net mvc2 and having a basic Page that includes a Partial View within a form <% using (Html.BeginForm()) { %> <% Html.RenderAction("partialViewActionName", "Controllername"); %> <input type="submit" value="Weiter" /> <% } %> When I submit the form, the httpPost Action of my Page is called, and AFTER that the httpPost Action of my Partial View is called [HttpPost] public virtual ActionResult PagePostMethod(myModel model) { // here I should know about the validation of my partial View // If partialView.ModelState is valid then // return View("success"); // else return View(model) } [HttpPost] public virtual ActionResult partialViewActionName(myModel model) { ModelState.AddModelError("Error"); return View(model); } But as I am doing the Validation in the httpPost Method of my Partial View (because I want to use my Partial View in several Places) I cant decide if my hole page is valid or not. Has anyone an Idea how I could do this? Isn´t it a common task to have several partial Views in a page but have the information about validation in the page action methods? Thanks very much for your help!!

    Read the article

  • Partial template specialization of free functions - best practices

    - by Poita_
    As most C++ programmers should know, partial template specialization of free functions is disallowed. For example, the following is illegal C++: template <class T, int N> T mul(const T& x) { return x * N; } template <class T> T mul<T, 0>(const T& x) { return T(0); } // error: function template partial specialization ‘mul<T, 0>’ is not allowed However, partial template specialization of classes/structs is allowed, and can be exploited to mimic the functionality of partial template specialization of free functions. For example, the target objective in the last example can be achieved by using: template <class T, int N> struct mul_impl { static T fun(const T& x) { return x * N; } }; template <class T> struct mul_impl<T, 0> { static T fun(const T& x) { return T(0); } }; template <class T, int N> T mul(const T& x) { return mul_impl<T, N>::fun(x); } It's more bulky and less concise, but it gets the job done -- and as far as users of mul are concerned, they get the desired partial specialization. My questions is: when writing templated free functions (that are intended to be used by others), should you automatically delegate the implementation to a static method function of a class, so that users of your library may implement partial specializations at will, or do you just write the templated function the normal way, and live with the fact that people won't be able to specialize them?

    Read the article

  • Partial Submit vs. Auto Submit

    - by Frank Nimphius
    Partial Submit ADF Faces adds the concept of partial form submit to JavaServer Faces 1.2 and beyond. A partial submit actually is a form submit that does not require a page refresh and only updates components in the view that are referenced from the command component PartialTriggers property. Another option for refreshing a component in response to a partial submit is call AdfContext.getCurrentInstance.addPartialTarget(component_instance_handle_goes_here)in a managed bean. If a form contains required fields that the user left empty invoking the partial submit, then errors are shown for each of the field as the full form gets submitted. Autosubmit An input component that has its autosubmit property set to true also performs a partial submit of the form. However, this time it doesn't submit the entire form but only the component that triggers the submit plus components referenced it in their PartialTriggers property. For example, consider a form that has three input fields inpA, inpB and inpC with autosubmit=true set on inpA and required=true set on inpB and inpC. use case 1: Running the view, entering data into inpA and then tabbing out of the field will submit the content for inpA but not for inpB and inpC. Further more, none of the required field settings on inpB and inpC causes an error. use case 2: You change the configuration of inpC and set its PartialTriggers property to point to the ID of component inpA. When rerunning the sample, entering a value into inpA and tabbing out of the field will now submit the inpA and inpC fields and thus show an error for the missing required value on inpC. Internally, using autosubmit=true on an input component sets the event root to just this field, which good to have in case of dependent field validation or behavior. The event root can extended to include other components by using the Partial Triggers property on these components to point to the input field that has autosubmit=true defined. PartialSubmit vs. AutoSubmit Partial submit set on a command component submits the whole form and leaves it to the developer to decide which UI component is refreshed in response. Client side required field validation (as well as the server side equivalent) is not disabled by executed in this scenario. Setting immediate=true on the command item to skip validation doesn't help as it would also skip the model update. Auto submit is a functionality on the input components and also performs a partial form submit. However, in addition an event root is defined that narrows the scope for the submitted data and thus the components that are validated on the request. To read more about this topic, see: http://docs.oracle.com/cd/E23943_01/web.1111/b31973/af_lifecycle.htm#CIAHCFJF

    Read the article

  • Refresh conent with JQuery/AJAX after using a MVC partial view

    - by Aaron Salazar
    Using the following JQuery/AJAX function I'm calling a partial view when an option is changed in a combobox named "ReportedIssue" that is also in the partial view. The is named "tableContent". <script type="text/javascript"> $(function() { $('#ReportedIssue') .change(function() { var styleValue = $(this).val(); $('#tableContent').load( '/CurReport/TableResults', { style: styleValue } ); }) .change(); }); </script> My problem is that after the jump to the partial view I lose the link to the javascript. I think I'm supposed to use the JQuery ".live()" but I'm unsure. In short, I want to re-establish the link between my JavaScript and my combobox and after the inclusion of the partial view's HTML. I hope I'm being clear enough, Aaron

    Read the article

  • Rails 3 - Category Filter Using Select - Load Partial Via Ajax

    - by fourfour
    Hey. I am trying to filter Client Comments by using a select and rendering it in a partial. Right now the partial loads @client.comments. I have a Category model with a Categorizations join. This all works, just need to know how to get the select to call the filter action and load the partial with ajax. Thanks for you help. Categories controller: def filter_category @categories = Category.all respond_to do |format| format.js # filter.rjs end end filter.js.erb: page.replace_html 'client-not-inner', :partial => 'comments', :locals => { :com => Category.first.comments } show.html.erb (clients) <% form_tag(filter_category_path(:id), :method => :put, :class => 'categories', :remote => true, :controller => 'categoires', :action => 'filter') do %> <label>Categories</label> <%= select_tag(:category, options_for_select(Category.all.map {|category| [category.name, category.id]}, @category_id)) %> <% end %> <div class="client-note-inner"> <%= render :partial => 'comments', :locals => { :com => @comments } %> </div><!--end client-note-inner--> Hope that makes sense. Cheers.

    Read the article

  • How to Render Partial View into an Object

    - by DaveDev
    Hi all, I have the following code: public ActionResult SomeAction() { return new JsonpResult { Data = new { Widget = "some partial html for the widget" } }; } I'd like to modify it so that I could have public ActionResult SomeAction() { // will render HTML that I can pass to the JSONP result to return. var partial = RenderPartial(viewModel); return new JsonpResult { Data = new { Widget = partial } }; } is this possible? Could somebody explain how?

    Read the article

  • Problem Using Partial View In for each loop

    - by leen3o
    I'm a little confused here, I am trying use a partial view in a for each loop like so <% foreach (var item in (IEnumerable<MVCLD.Models.Article>)ViewData["LatestWebsites"]){%> <% Html.RenderPartial("articlelisttemaple", item); %> <% } %> And my partial view looks like this <div class="listingholders"> <h4><%=Html.ActionLink(item.ArticleTitle, "details", "article", new { UrlID = item.UrlID, ArticleName = item.ArticleTitle.ToString().niceurl() }, null)%> </h4> <p><%= Html.Encode(item.ArticleSnippet) %></p> <div class="clearer">&nbsp;</div> </div> But when I run the project I get told the partial view doesn't understand what item is?? CS0103: The name 'item' does not exist in the current context I can't see why it would be doing this as I'm passing item into the partial view?

    Read the article

  • Adding DataAnnontations to Generated Partial Classes

    - by Naz
    Hi I have a Subsonic3 Active Record generated partial User class which I've extended on with some methods in a separate partial class. I would like to know if it is possible to add Data Annotations to the member properties on one partial class where it's declared on the other Subsonic Generated one I tried this. public partial class User { [DataType(DataType.EmailAddress, ErrorMessage = "Please enter an email address")] public string Email { get; set; } ... } That examples gives the "Member is already defined" error. I think I might have seen an example a while ago of what I'm trying to do with Dynamic Data and Linq2Sql.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >