-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for client action listeners
- Loading branch information
1 parent
36d1cc0
commit 30d8261
Showing
6 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/org/javarosa/core/model/actions/recordaudio/XFormsActionListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.javarosa.core.model.actions.recordaudio; | ||
|
||
import org.javarosa.core.model.instance.TreeReference; | ||
|
||
public interface XFormsActionListener { | ||
void actionTriggered(String actionName, TreeReference absoluteTargetRef); | ||
} |
23 changes: 23 additions & 0 deletions
23
src/test/java/org/javarosa/core/model/actions/CapturingXFormsActionListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.javarosa.core.model.actions; | ||
|
||
import org.javarosa.core.model.actions.recordaudio.XFormsActionListener; | ||
import org.javarosa.core.model.instance.TreeReference; | ||
|
||
public class CapturingXFormsActionListener implements XFormsActionListener { | ||
public String actionName; | ||
public TreeReference absoluteTargetRef; | ||
|
||
@Override | ||
public void actionTriggered(String actionName, TreeReference absoluteTargetRef) { | ||
this.actionName = actionName; | ||
this.absoluteTargetRef = absoluteTargetRef; | ||
} | ||
|
||
public String getActionName() { | ||
return actionName; | ||
} | ||
|
||
public TreeReference getAbsoluteTargetRef() { | ||
return absoluteTargetRef; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters