action

Passing parameters on button action:@selector

Hi, I want to pass the movie url from my dynamically generated button to MediaPlayer: [button addTarget:self action:@selector(buttonPressed:) withObject:[speakers_mp4 objectAtIndex:[indexPath row]] forControlEvents:UIControlEventTouchUpInside]; but action:@selector() withObject: does not work? Is there any other solution? Thanks f...

Identify which action is being called inside a model. Ruby on Rails

How do I come to know whether a create or any other action has been called from inside a model. Basically I am doing database logging and want to track whether a create or other actions are being performed. For doing the logging part I am using the concept of ActiveRecord::Observer. But there I am not able to find out whether the user i...

Importance of Direction of Control-Drag Operation while Setting Actions in Interface Builder

I have a question regarding the importance of choosing the correct starting and ending points of a control-drag operation while setting actions using Interface Builder (3.2.3). This issue came up while working through an example in an introductory text. In the example project there is a very simple graphical window with a three NSTextF...

C# execute action after X seconds

I want to develop a windows console application which executes an action periodically after a given time. I've read somewhere that a timer class is only available for windows forms applications, so what is the best way to accomplish what I want? ...

In Ruby on Rails, cannot render :controller => 'generic', :action => 'top_pages' but need to use :template => 'generic/top_pages'?

it seems that the :controller option doesn't do anything? Won't specifying the whole path be a little bit lower level than specifying using :controller? ...

What is use of getting button name as one of the parameter for Action control in following code ?

Hi I am a beginner in MVC 2 and I was going through the ScottGu's blog for deleting a record from database using entity framework. I don't understand the use of string confirmButton(name of button tag in View template) as one of the parameter for Delete action method in the following code. Can any one tell me why it is used ? // // HTTP...

Struts2 - if result type json and method defined then all methods get invoked

Idefined my struts xml as follows: "<"action name="index" method="execute" class="hr.credo.web.struts2.action.Index"> <"result name="success" >/index.jsp <"/action> <"action name="hello" class="hr.credo.web.struts2.action.Index" method="JSON"> <"result name="success" type="json" > <"/action> and in my action class i have an execute...

How to get the referred string of an Action<string> delegate?

I have a method that expects an Action<string> I call the method as follows: commandProcessor.ProcessCommand(s=> ShowReceipt("MyStringValue")) ProccessCommand(Action<string> action) { action.Invoke(...); // How do I get the reffered string? } Do I have to use Expression<Action<string>> ? If so, how do I get the parameter values? ...

Seam Page Action Not Being Called

I've got a page that displays an entity, but before rendering the page I need to perform a lookup of the entity based on a parameter that is passed in. To do this, I'm trying to use a Seam Page Action declared in my pages.xml file to call the lookup action before rendering the page. My setup looks like this: pages.xml: <page view-id=...

Remove duplicated code - using Action

Hi I have the following code which obviously has some duplication. I'm sure this could be removed using a delegate or Action but can't quite grasp it. anyone got any ideas? public void DealStartingCards() { for (int i = 0; i < 3; i++) { foreach (var player in Players) { ...

Lambda and VB.NET

Hello, I have found this example on StackOverflow: var people = new List<Person> { new Person{Name="aaa", Salary=15000, isHip=false} ,new Person{Name="aaa", Salary=15000, isHip=false} ,new Person{Name="bbb", Salary=20000, isHip=false} ,new Person{Name="ccc", Salary=25000, isHip=false} ,new Person{Name="ddd", Salary=...

Siebel CSSBCActivity.SetGridBeginEndDate or how to get all instances of a repeating action in eScript?

Hi, I would like to get all instances of a repeating action via a eScript bcAction query. What I already found out about repeating actions: I create an repeating action, repeat interval = daily I can see multiple instances for this action in Siebel calendar applet. If I query all actions by eScript, I get a single row for the repeat...

How do i make Android app which do something every X second

Hello i wanna do apliacation which every 1 second call function or do something else. I have this code which is not working can you tell what is wrong? public class App5_Thread extends Activity implements Runnable { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInsta...

how to get form action response without ajax in a good way?

I know how to get an AJAX response: $.post( '/action', { actiontodo: 'insert' } function (data) { alert(data); } ); Int the action.php (server side): <?php if ($_POST['actiontodo'] == 'insert') { doInsertAction(); echo "inserted"; } ?> Finally the output of this cod...

How can i tell if a radiobutton is checked in action ? (MVC)

I would really like to be able to do this if myRB.Checked = true then return redirecttorout("SomeRoute") else someother route i am used to web forms, in which i could do this in the code behind ...

JSF 1.2 difference between exception in action and actionListener

I've noticed that JSF 1.2. does not return error page when an exception was thrown in actionListener method but does return error page when an exception was thrown in action method. Why is that? Can it return error page in both cases? ...

Submitting form via ajax, one way or two ways?

What's better of this two options: 1. $.post( '/ajax/action', function(data) { doResult(); } ); *This option has to receptors: ajax.php and action.php* or 2. $.post( '/action', { typerequest: 'ajax' }, function (data) { doResult(); } *This option has only 1 receptor: action.php (if typerequest exists, returns ajax result)* Form ...

Can an HTML form action attribute be repeated ?

I have an application that generates a element with an 'action' attribute. I need to change the value of the action attribute, but it's not possible to do that. However it is possible to add another 'action' attribute before the generated one thusly: This seems to work for IE. I'd like to know if this behavior is defined in the w3c ...

Differences between action and actionListener

What is the difference between action and actionListener. When sould I use action and/or actionListener? My question is related JSF 2.0. ...

How can I invoke multiple actions from a single form?

I have a jsp file in which I have a form. It shows data about an "account" data structure we have. There's a button to remove the data from that data structure. <form action="removeThisData.html" method="post"> ... blah blah blah ... <input type="submit" value="Remove"/> </form> Now, there's a component that I want to be editabl...