This is kind of an academic question, so feel free to exit now. I've had a dig through Stack for threads pertaining to URL/Controller mapping in MVC frameworks - in particular this one:
http://stackoverflow.com/questions/125677/php-application-url-routing
So far, I can ascertain two practices:
1: dynamic mapping through parsing the URL string (exploded on '/')
2: pattern matching matching url to config file containing available routes
I wanted to get some feedback (or links to some other threads/articles) from folks regarding their views on how best to approach this task.
I've been using Scala 2.8RC1 and Scala Eclipse plugin for 2.8 RC1 happily for a few days. However, last night after adding a couple jar files to my environment (apache http client jars) the debugger just stopped stopping at breakpoints in scala code.
Java code stops fine at breakpoints. I tried creating a new mimimal scala app breakpoints don't stop. I've tried switching to sun-jre-1.6.0.20 from the openjdk-1.6.18 I had been using. I've switched to the scala 2.8 nightly and also eclipse plugin for scala nightly builds. No luck.
I would greatly appreciate ideas for fixes. Rather frustrating as the initial experience with 2.8 was really great.
Is there a way to pass data from a View to a Controller so that I can get the data and create a .xls file on the fly?
Any help or thoughts are greatly appreciated.
Greg
Could someone give few tips and/or examples how Controller Plugins and Action Helpers are different? Are there situations where particular task could be accomplished with one but not another? For me they both look more or less the same and I'm often having trouble having to decide when to use what... Are there any big differences?
i've been studying and using actionscript exclusively for too long, that i don't even know how to import a regular image into Flash and create a ready-made sprite that i can use in my APIs.
what are the steps to create a sprite from an image asset in the library?
Hello,
I'm trying to set up an in app purchase and once the purchase has been made I need to reset the app to its initial launch state. I'm wondering if there is a way to dealloc all the view controllers inside of each navigation controller and reload the initial view that is displayed when the app launches.
Thanks in advance!
Hi
I haved created a portlet through plugins SDK and wanted to import that into the eclipse ,but it did not imported as it is ,
But after creating the portlet if i give " ant setup-eclipse " then the project get imported into the eclipse .i have searched for this almost 2 days then i found the solution ..
How do i know what all the commands i have in ant . like in the API i will have all the methods where i can see there and get on with my coding work ,how with ant ?
how do i know wat all the commands i need to implement ?
Thanks
I'm using Rails with jQuery, and I'm working on a page for a simple site that prints each record to a table. The only editable field for each record is a checkbox. My goal is that every time a checkbox is changed, an ajax request updates that boolean attribute for the record (i.e., no submit button).
My view code:
<td>
<% form_remote_tag :url => admin_update_path, :html => { :id => "form#{lead.id}" } do %>
<%= hidden_field :lead, :id, :value => lead.id %>
<%= check_box :lead, :contacted, :id => "checkbox"+lead.id.to_s, :checked => lead.contacted, :onchange => "$('#form#{lead.id}').submit();" %>
<% end %>
</td>
In my routes.rb, admin_update_path is defined by
map.admin_update 'update', :controller => "admin", :action => "update", :method => :post
I also have an RJS template to render back an update. The contents of this file is currently just for testing (I just wanted to see if it worked, this will not be the ultimate functionality on a successful save)...
page << "$('#checkbox#{@lead.id}').hide();"
When clicked, the ajax request is successfully sent, with the correct params, and the action on the controller can retrieve the record and update it just fine. The problem is that it doesn't send back the JS; it changes the page in the browser and renders the generated Javascript as plain text rather than executing it in-place.
Rails does some behind-the-scenes stuff to figure out if the incoming request is an ajax call, and I can't figure out why it's interpreting the incoming request as a regular web request as opposed to an ajax request.
I may be missing something extremely simple here, but I've kind-of burned myself out looking so I thought I'd ask for another pair of eyes. Thanks in advance for any info!
I have looked for an answer for this nearly every where that I can think of, but there doesn't seem to be any way to actually SEE what Eclipse "runs" to compile the projects (as it does need the JDK installed and visible to actually build). I ask because I imported a few jars into my project, and even though I've looked through all the javac documentation, I can't seem to figure out how to mimic it quite like Eclipse does. I really, really need to be able to compile on the command line in this case - Eclipse or any other IDE just isn't what is needed.
I started to look through the Eclipse source, and although this sounds lazy, I just became overwhelmed and figured I would ask here first, hoping someone else had the same question at one point.
at the top of my controller, outside of any method, I have
@@javascript_is_disabled = false
and I have methods that that the view calls and invokes something like this
@@javascript_is_disabled = params[:javascript_disabled]
but when I need the @@javascript_is_disabled in completely different method.. it is always false.
I know it changes in the method with params args... cause those methods behave differently, and appropriately
And ideas?
Hello,
I am using rails 3:
I would like to render a portion of view which is build by a 'notification' method in message class
so I've add in my application.html.erb :
<li><%= render :action => "notification", :controller => "messages" %></li>
The goal of my file notification.html.erb is to display in a red circle the number of notifications in all my pages.
I don't think I am in the good way, any ideas ?
Thanks all :)
Is there a way to pass data from a View to a Controller so that I can get the data and create a .xls file on the fly?
Any help or thoughts are greatly appreciated.
Greg
Hi,
I've a file in the config directory, let's say my_policy.txt.
I want to use the content of that file in my controller like a simple string.
@policy = #content of /config/my_policy.txt
How to achieve that goal, does rails provide it's own way to do that?
Thanks
i am trying to use viewpager from android support library v4 in intelli j
currently
i have android sdk 4.1
I copied android-support-v4.jar to my intellij android project under 'libs'
in the project settings of intellij
I webt to "Modules" = "MyModuleName" = dependencies tab, and add the android-support-v4.jar, by navigating the path to the libs/ folder under my own project
I checked the 'export' besides this newly added jar file
but i still can't use viewpager in my application
i get a crash msg like
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxxx/com.xxxx.MyActivity}: android.view.InflateException: Binary XML file line #13: Error inflating class android.support.v4.view.ViewPager
Within my site I have controller specific CSS files in addition to my master css file. For example
CSS/
Prodcuts/
product.css
...
Blog/
blog.css
...
masterStyle.css
Where masterStyle.css is the master css file. What I want to do is when the user hits http://www.example.com/Products/ only mySite.css and all css files under Products get included. What is the best way to go about doing this?
I have made a navigation based application in my rootview controller i have put a text view when i run the app i am able to see that text view but when i navigate on other xib and comes back i am not able to see that text view if i do it programmatically by using view for header than i am able to c that text but why i am not able to do it in design time
any idea
hello,
I would create a view programitically , then Can i place the navigation controller upon a view by making the view as rootview? and then return the rootview to the window object in Objective-C for iPhone programming.
Is this possible?
i m suffering with Passing values from javascript function to controller in cakephp and get using $_POST.
i have tried it by different ways but didn't get success please suggest........
hi.
I have a multiple file upload form(html5) and want to update my view as soon one of the images is transfered to my image server.
Currently I upload the files with ajax and use response_to_parent to update my upload view when all images are transfered to the image server.
Is it possible to call a Javascript function from the controller more than once per action?
def upload
params[:images].each do |file|
upload_to_image_server(file)
#page << Update upload View
end
end
Thanks,
Michael
Hi
In my mode I am selecting a field as
$query1 = $this->db->query("SELECT dPassword
FROM tbl_login
WHERE dEmailID='[email protected]'");
How to return dpassword as a variable to my controller
I tried this way return dpassword;
Does anybody know of a reliable, well-made tool for creating standalone desktop applications complete with GUI, using just PHP, or primarily PHP? I enjoy the R.A.D. and many other aspects of PHP and would like to use it for some non server/client projects.