render

How rails render works in controller? Why something it doesn't use layout?

I tried to write render in an action, but layout behavior is different, why? def show # assuming we have a partial in app/views/shared/_panel_show.html.erb #render "shared/_panel_show" # have layout #render "/shared/_panel_show" # without layout #render "shared/panel_show" # Template is missing #render :partial => "share...

Rendering HTML files in Grails

Hi all, I've looked around but could not find a way of simply including or rendering *.html files in Grails. My application needs to g.render or <g:render> templates which are delivered as html files. For this, as we know, html files have to be converted to _foo.gsp files in order to get rendered. I am totally surprised as to why isn't ...

ASP.NET Server control emitting server side tags

I'm new to writing custom ASP.NET server controls, and I'm encountering the following issue: I have a control that inherits from System.Web.UI.HtmlControls.HtmlGenericControl. I override the control's Render method, use the HtmlTextWriter to emit some custom HTML (basically a TD tag with some custom attributes), and then call the case c...

Render hyperlink control in Repeater

Hey everyone, I've got a repeater and it is bound to a dictionary . Although I can access the HyperLink, I can't render one. I have this code: <%# DataBinder.Eval((System.Collections.Generic.KeyValuePair<string, HyperLink>)Container.DataItem, "Value.NavigateUrl") %> The Value.NavigateUrl was a test to see if I could access that prop...

Tidyest way to process generated view before returning

I have this in my controller. I need my view to generate some HTML, which I then convert to a pdf using Flying Saucer (Im using JRuby). This then gets returned to the client. def show @cs_agreement = CsAgreement.find(params[:id]) respond_to do |format| format.pdf do # TODO there must be a better way of getti...

Problem with YUI Calendar widget

I managed to get the YUI calendar widget working fine. But When it displays it doesn't "float" over the page, that is, it pushes content around out shape. I need it to float above the page and not affect other elements. There doesn't seem to be a property to force the calendar to float over the page. Does anyone know how to ensure that...

Zend Framework: how to remove rendered views in the controller?

i want to render one of these sets of views: head body-$id1 foot OR head body-$id2 foot which set exsists. i do it like this: try { $this->render("head"); $this->render("body-$id1"); $this->render("foot"); } catch (Exception $e) { $this->render("head"); $this->render("body-$id2"); $this->render("foot"); ...

How to force asp.net GridView control to wrap first row within <thead> </thead> tags

Hi, I want to use Christian Bach's tableSorter client-side table sorting jQuery plugin with my asp.Net GridView control. But the problem is, in the documentation it writes: tablesorter works on standard HTML tables. You must include THEAD and TBODY tags: And unfortunately asp.net renders my GridView only with tags and heade...

Modifying JSF Component Tree in PhaseListener

Hi all, I'm having an issue. I've implemented a PhaseListener, which is meant to add a style class to any UIInput components in the tree that have messages attached to them, and removes the style class if it doesn't have any messages attached to them. The PhaseListener runs in the RENDER_RESPONSE phase, and does it's work in both the...

render Url.Action in model

how can i do such thing in model or controller? <%= Url.Action("Home"); %> ...

Newline when using asp.net visible=false

Hi, when using asp.net´s visible=false e.g. for a htmlgenericcontrol asp.net renders a newline for a control that is set visible=false. How to prevent this behavior? I just have a <ul> and then <li runat="server" id="x"></li> <li runat="server" id="x"></li> <li runat="server" id="x"></li> So one <li> per line. If I set one o...

Zend: Why form elements are not rendered correctly in windows? It was working on ubuntu.

I was working with Zend on Ubuntu and it was working correctly. Now I moved to windows for same project. But now elements of my form are not rendered correctly and their code is appeared on brower's page like this: translate( $this->element->getElement("email")->getLabel() ) ?> Any idea that what is the problem? ...

strange problem with WriteBeginTag

i use such code, but it renders with error <li class="dd0"><div id="dt1"<a href="http://localhost:1675/Category/29-books.aspx"&gt;Books&lt;/a&gt;&lt;/div&gt;&lt;/li&gt; there is no > in opening tag div. what the problem? writer.WriteBeginTag("li"); //writer.WriteAttribute("class", this.CssClass); writer....

Rails Layout Rendering with controller condition

I don't know what's the best way to doing this. On my application.html.erb I define a header div. My default controller ( root ) is a homepage controller. And I wish that if I'm at index of the homepage the header is rendering with some content, but all other controllers render another content inside that header. How can I make a con...

An unspecified error occurred on the render thread. (NotifyPartitionIsZombie)

OK here's the problem, I have a ContentControl3D object from thriple in that im creating a LibraryStack with images it runs fine, until i run the function where the LibraryStack gets created and filled. when i click on any of the objects inside i get the following error An unspecified error occurred on the render thread. with stacktr...

How do I render a partial to a string from within a filter attached to a controller

I have some code I need to use in multiple controllers in a rails 1.0 application (I can't, for strange reasons upgrade to a newer rails). I've extracted the relevant code into a filer object, and I'm using the around_filter construct to execute it. Before the extract, I was using the method render_to_string() to get the contents of a ...

jQuery fullcalendar custom event

Hi, I was wondering how to apply a custom render to a event... I want to be able to prepend the "patient" name of a practice agenda... eventRender: function(event, element) { console.log(element[0]); } This currently shows the HTML output in the console, but I don't know how can I access it (in a pretty jQuery manner) i...

How to override a render to create a custom "render :my_format => argument" in rails 2.3(.5)?

Hey! I would like to create a custom render as specified in title. For instance, I have my controller: class MyController < ApplicationController def index respond_to do |format| format.html # index.html.erb format.xml { render :xml => @objs } end end end , but I would like something like this: class MyCont...

my flash site often doesn't render until I refresh

http://randomdorm.com Our client communicates with a Rails backend to get login details and then logs into an Adobe LCCS server. We have been cruising right along but around noon yesterday we developed a bug that causes the swf to not render until you refresh the page. On subsequent refreshes it pops up right away. The problem happen...

Local variable not being passed to partial template by render?

I don't seem to be able to pass a variable to my partial template in rails (2.3.5). My code is as follows; In the main view .html.erb file: <% f.fields_for :payments do |payment_form| %> <%= render 'payment', {:f => payment_form, :t => "test" } %> <% end %> and in the _payment.html.erb file: <%= t %> produces a wrong number of...