similar to: Dynamic fields creation and accessing data

Displaying 20 results from an estimated 200 matches similar to: "Dynamic fields creation and accessing data"

2005 Dec 23
0
adding items to a particular invoice on the same page
Hi, I have been building a invoice generator(in ruby on rails) for the past some days and been stuck on the final page .This page will have fields for entering the invoice details and also I have added a AJAX effect so that fields for invoice items get created dynamically . its all design well but the issue comes when I am trying to save the page .That is adding ivoice details to invoices
2005 Dec 15
12
Adding multiple invoice items to an invoice on the same form
Hi Friends , Got a unique requirement .I am designing a invoice printing system .So right now I have the NEW page for adding the invoice details to the table .Now I have the requirement of adding Invoice Items In the same form .I have added multiple text boxes to enter the values of the Items using <%= text_field ''invoiceitems[]'', ''item_price''
2005 Dec 23
1
key value pairs working
Hi, can anyone tell me how is the following lines in ruby works on rails .how is the key value pairs accessed by rails . params[:invoiceitem].each do |key, val| @invoice.invoiceitems << InvoiceItem.new(val) end Thanx and regards, Naroor Rathish, www.naroor.blogspot.com -- Posted via http://www.ruby-forum.com/.
2005 Dec 16
4
Adding extra value to an object
Hello friends , I have a clear method here :: def create @invoiceitems = Invoiceitems.new(params[:invoiceitems]) @invoiceitems["invoice_id"] = params[:id] if @invoiceitems.save flash[:notice] = ''Invoiceitems was successfully created.'' redirect_to :action => ''new'',:id => params[:id] else render :action =>
2005 Dec 16
2
Is this possible?
Hello Friends, def new @invoiceitems = Invoiceitems.new @oldinvoiceitems = Invoiceitems.find(:all, :conditions =>[''invoice_id = :invoiceid'', { :invoiceid => params[:id] } ] end Error is being shown in the line number with ''end''. This is for initialising a new invoiceItems object and also finding and storing all the invoice items for a
2005 Dec 16
3
Not able to put into a object variable
hello friends , I was trying to select all the invoice items from the table invoiceitems with a condition.But I am getting a NULL array .Please help me in fixing this :: @oldinvoiceitems = Invoiceitems.find(:all, :conditions => [''invoice_id = :invoiceid'', { :invoiceid => ''params[:id]'' } ] ) Thanx and regards, Naroor Rathish,
2013 Aug 14
1
local variable assignment: first copies from higher frame?
hi all -- this might not be the correct list for this question/discussion, though R-help didn't seem like the correct venue, either, so... i'm looking for just some extra clarification of how local variables are defined/bound, beyond the simple cases given in the Language document. the particular instance is when there is variable assignment inside a function. normally, this creates a
2011 Sep 27
2
Matrix and list indices
Hi guys, I am trying to replace all elements of earth that are equal to zero with their corresponding elements in mars. I can do the replace with a bunch of for-loops, but I don't think this is the R way of doing things. my_list <- list( earth=array(c(0,0,45,0,0,45,0,45),dim=c(2,2,2)), mars=array(c(8:1),dim=c(2,2,2))) my_list for (i in c(1:2)) { for (j in c(1:2)) {
2013 Feb 14
3
list of matrices --> array
i'm somehow embarrassed to even ask this, but is there any built-in method for doing this: my_list <- list() my_list[[1]] <- matrix(1:20, ncol = 5) my_list[[2]] <- matrix(20:1, ncol = 5) now, knowing that these matrices are identical in dimension, i'd like to unfold the list to a 2x4x5 (or some other permutation of the dim sizes) array. i know i can initialize the array, then
2008 Jan 08
1
storing matrices in a list or vector and preserve dimensions
Hi all, As an R newbie, I wonder how I can store multiple matrices in a list() or vector() object without losing their structure. I should be able to retrieve the matrix from the list later on. If I just append() the matrices to a list() object, they automatically lose their dimensions, whereas I would like to preserve the dimensions of the matrices. Is there any function in R which allows
2012 Feb 29
2
Using a FOR LOOP to name objects
Hello, I am trying to use a for loop to name objects in each iteraction. As in the following example (which doesn't work quite well) my_list<-c("A","B","C","D","E","F") for(i in c(1:length(my_list))){ url<- "http://finance.yahoo.com" doc = htmlTreeParse(url, useInternalNodes = T) tab_nodes = xpathApply(doc,
2013 Nov 26
1
dynamic lists at C level
Dear R-devel, I am trying to do something similar to dynamic length lists in R, but at C level. In R, that would be rather trivial: - determine the length of the list - create the list object - store the values for each component - access value components by using "[[" At C level, for a single component where I need to store a vector of length 5, I do: int *p_result; SEXP my_list =
2005 Dec 20
12
How to model "Expense Report" in Rails MVC
1st: I am a newbie to Rails & to pure OO. Q: I want to use rails for creating a "master-detail" form. page layout will allow users to type in an "expense report header" and as many "expense report lines" as they need to. I understand how to wrap the final submit action using "transaction" to ensure the inserts to the database happen within the same
2006 Apr 07
3
RJS removing content of div, but not div itself
Hi, I''m creating a list of ingredients on a page. When the user clicks the ''Add Ingredient'' button a record gets added to the db and the ingredient gets added to the page. On the page, each record is represented by a <div> with three <span>s inside. One of the <span>s has a link_to_remote to ''delete'' the ingredient. When the link
2011 Jul 17
1
function design: multiple imput names
dear all, a simple question, I need to write a function in which I retrive an undetermined number of vector in the function. I solved the problem thanks to this link http://stackoverflow.com/questions/2540232/how-to-allow-multiple-inputs-from-user-using-r so my function will look alike this my_fun <- function(...){ my_list <- lapply(..., function(x){x}) } I need just one more
2007 Sep 20
7
Troubles with ListBox and CheckListBox events
Hi all, Here is an excerpt of code (with the new syntax from upcoming wxRuby 1.9.2) : evt_checklistbox(my_checklist, :on_checklistbox) evt_listbox(my_checklist, :on_listbox) evt_listbox(my_list, :on_listbox) def on_checklistbox(event) checklist = event.event_object # puts "listbox - event : item[#{event.int}] checked : #{event.checked?}" puts "listbox -
2012 Feb 21
0
nil can't be coerced into BigDecimal Options
hi guys im playing with RoR with the environment of rails 3 ruby 1.9 i got stuck in nil can''t be coerced into BigDecimal error i need to get the total cost of the products inside the cart i know where the problem is(i think) but i almost did every thing cart/show.html.rb <div class="cart_title" >Your Cart</div> <table> <% for item in
2011 Aug 02
1
NoMethodError in Store#index
Thanks in advance I want to know how to solve No method errors Agile Rails 4th ed Great book But second time I get this type of error I would like to know how to troubleshoot and resolve Please see below thanks once again NoMethodError in Store#index Showing C:/rails/shop9/app/views/line_items/_line_item.html.erb where line #9 raised: undefined method `title'' for nil:NilClass
2009 Jun 28
1
applying a function to a pair of components for each row of a list
Hi, I have a set of (x,y) coordinate pairs that are stored as a list > my_list $x [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 $y [1] -8.0866819 -7.3876052 -6.6849311 -5.9837693 -5.2967432 -4.6525466 [7] -4.0999453 -3.6556190 -3.3076102 -3.0360780 -2.8220465 -2.6532085 [13] -2.5192816 -2.4086241 -2.3072977 -2.1969611 -2.0574250 -1.8737694 [19] -1.6357864
2005 Dec 16
0
Master-Detail Updation
Hi All, I want to create an invoice where I want to fill in the header data and dynamically add line items in one page. It should update the invoice and invoice_items table from one page. I looked around and was not able to find a solution for this. Has anybody here done something similar to this before? Please help.. Thanks Binu -- Posted via http://www.ruby-forum.com/.