Problem with render_component

Hi,
Friends, I am working on ruby on rails,

  1. I have created a login form
<%=flash[:notice].to_s%>
<legend>
  Please Log In
</legend>
<% form_tag do %>
<p>
  <label for="name">Name:</label><br/><br/><br/>
  <%= text_field_tag :name, params[:name]%>
</p>
<p>
  <label for="password">Password:</label><br/><br/>
  <%= password_field_tag :password, params[:password]%>
</p>
<p>
  <%= submit_tag "login"%>

</p>
<%end%>

<%#= button_to “Back”, :controller=>:main, :action=>:unreg_disp_data%>

</fieldset>
  1. Then rendered this form in view using render_component but after
    rendering this way i was unable to get the passed arguments

3)If i am creating a link instead of render_component e.g.

<%= link_to_remote “Sign In”,{
:update=>“account”,:url => {:controller => :account,:action => :login}
}-%>

it works fine

Can anyone suggest a solution for this, I will be thankful for the same

Regards,
Kiran P.

  1. Then rendered this form in view using render_component but after
    rendering this way i was unable to get the passed arguments

Is there any particular reason you are using render_component?
render_component is mostly dead (IIRC it’s because components are big
and heavy, because they are actually separate controller instances
under the hood (which is probably why accessing params from the
‘other’ instance of ActionController doesn’t work)

Fred

Frederick C. wrote:

Is there any particular reason you are using render_component?
render_component is mostly dead …why accessing params from the
‘other’ instance of ActionController doesn’t work)

Fred

(Note: this problem is earlier posted by “Pedro C.” but there is
no solution given.)
Thanks for the help, But I think I require some solution for this
problem,I have created a home page and for a/c management I have created
some .rhtml files, at the home page I want to render the login
form.Please give me some solution…

Kiran

On 2 Oct 2007, at 10:20, Kiran P. wrote:

(Note: this problem is earlier posted by “Pedro C.” but there is
no solution given.)
Thanks for the help, But I think I require some solution for this
problem,I have created a home page and for a/c management I have
created
some .rhtml files, at the home page I want to render the login
form.Please give me some solution…

components are dead. don’t use components. I’ve never used components
(because of the former) and so I’m not well aquaintent with their
intricacies. You probably could get something together using
the :locals option of render, but like I said, components are dead.
Use a partial.

Fred

Frederick C. wrote:

On 2 Oct 2007, at 10:20, Kiran P. wrote:

components are dead. don’t use components. I’ve never used components
(because of the former) and so I’m not well aquaintent with their
intricacies. You probably could get something together using
the :locals option of render, but like I said, components are dead.
Use a partial.

Fred

Thank you very much… :slight_smile: it really works. I have used partials to do
the same thing along with passing the arguments…

Kiran P.

Kiran P. wrote:

Frederick C. wrote:

On 2 Oct 2007, at 10:20, Kiran P. wrote:

components are dead. don’t use components. I’ve never used components
(because of the former) and so I’m not well aquaintent with their
intricacies. You probably could get something together using
the :locals option of render, but like I said, components are dead.
Use a partial.

Fred

I have one more problem regarding using ajax, I want to show and hide
div on mouseover and mouseout events of another div, but it doesn’t
work, it continuously does same thing I am expecting some code or
solution for it… :slight_smile: Have a nice time… Fred