Questions tagged [renderpartial]

The concept of rendering only a specific part of any UI. May also refer to the .NET `RenderPartialExtensions.RenderPartial` method or the Ruby on Rails `PartialRenderer`

The concept of rendering only a specific part of any UI. May also refer to the .NET RenderPartialExtensions.RenderPartial method or the Ruby on Rails PartialRenderer

391 questions
3
votes
1 answer

.Net MVC UserControl - RenderPartial or EditorFor

I have a View that contains a usercontrol. The usercontrol is rendered using: <% Html.RenderPartial("GeneralStuff", Model.General, ViewData); %> My problem is that the usercontrol renders nicely with values from the model but when I post values…
Andreas
  • 659
  • 6
  • 17
3
votes
1 answer

Rails partial update ActionController::UnknownFormat

I'm trying to update a partial. Everything worked perfectşy in Rails 3 but now bumped to Rails 4.1 and I'm getting the ActionController::UnknownFormat error. I'm placing _form.html.haml into bootstrap 3 modal. aprs_controller.rb (** is the place…
Caner
  • 1,448
  • 23
  • 38
3
votes
1 answer

How to use js file within view folder

I am using ruby on rails and I would like to render a partial on click (using jquery) an example of this being: $('#submit').on('click', function(){ $('#lol').append("<%= escape_javascript(render :partial => 'myPartial' ) %>"); } I basically…
TacoMaster6000
  • 304
  • 3
  • 12
3
votes
2 answers

Render form partial on click, Rails

I can't seem to figure this out, and I've tried multiple forums. I would like to render a form when I click a link using javascript. Could someone show a basic example on how to do this?
user233527
  • 55
  • 1
  • 7
3
votes
4 answers

When Is It Appropriate to Use Html.RenderAction()?

I'm a little bit unsure about when it's appropriate to use Html.RenderAction() to render my Views and when not to. My understanding is that because it's not an 'official' component of ASP.NET MVC it's bad practice to use it, and its original…
DaveDev
  • 41,155
  • 72
  • 223
  • 385
3
votes
1 answer

Rails 3.2/4: Is there a way to easily render a template (partial, whatever...) from the console?

I've been looking for an easy way to render views (or templates). I've only seen complicated solutions all over the internet that involve getting the rendering engine, passing the context, which is normally an action view instance initialized with…
ChuckE
  • 5,610
  • 4
  • 31
  • 59
3
votes
1 answer

Rails: render partial with selected controller and action in view

I have a Rails app where on the home page home/index.html.erb, I show a partial for the model workorders. It currently defaults to the home_controleer.rb with the action index. Can I select the workorders_controller.rb and action index2? I tried…
Reddirt
  • 5,913
  • 9
  • 48
  • 126
3
votes
2 answers

Renderpartial conditionally on masterpage in asp.net mvc

Hi I have the following menus defined on my masterpage in a asp.net mvc web application <%Html.RenderPartial("AdminMenu"); %> <%Html.RenderPartial("ApproverMenu"); %> <%Html.RenderPartial("EditorMenu"); %> However I want to only display the right…
Rippo
  • 22,117
  • 14
  • 78
  • 117
3
votes
2 answers

How to render a partial with javascript in Rails 3

I am trying to use Javascript to render an .html.erb partial that itself contains safe Javascript. <%= render :partial => "tasks" %> fails to render anything. <%= escape_javascript( render :partial => "tasks" ) %> renders the HTML but the javascript…
sscirrus
  • 55,407
  • 41
  • 135
  • 228
3
votes
1 answer

Yii booster - renderPartial the data-content of a popover?

I'm using Yii with YiiBooster extension. I want to have a popover like this: array( 'header' => '', 'value' => function($data) { $this->widget('bootstrap.widgets.TbButton', array( 'label'=>'Inne', …
Joe
  • 2,551
  • 6
  • 38
  • 60
3
votes
1 answer

How to return Nested PartialViews (including their javascript) from an AJAX call in ASP.Net MVC

I have created a treeview of Categories using nested partial views: my Index page (that displays the treeview):
Category Menu:
user186266
3
votes
1 answer

Rendering partial views with ajax calls in rails 3.1

I'm starting now with rails, and i have simply question i think. I need to render two partials in one ajax call: I have the following controller: # GET /hosts/1 # GET /hosts/1.json def show @host = Host.find(params[:id]) respond_to do…
Orange
  • 187
  • 1
  • 5
  • 11
3
votes
1 answer

partial local only accessible using local_assigns, not exposed by name

I am passing two locals from a view ERB to a partial. Both locals are successfully passed in local_assigns. However, I am only able to use the FormBuilder via a local variable name in the partial. The other value is usable within my partial as…
kburke
  • 1,023
  • 7
  • 9
2
votes
2 answers

How do I render a content feed into multiple columns?

I am new to programming, just completed RailsTutorial and now am trying to build a Pinterest-type site using Rails. I'd like for the main site to display items through multiple columns and in an infinite loop like: 1 2 3 4 5 6 7 8 9 10 . . . .…
toandang
  • 109
  • 1
  • 3
  • 11
2
votes
1 answer

EGMaps doesn’t load on renderPartial

I’m triying to load an EGMap on a partial view. This is my code: This is the ajax button which calls the action loadmap: echo CHtml::ajaxsubmitButton ("Press for geolocation", …
Fran Hurtado
  • 154
  • 1
  • 10