Is it possible to pass parameters through eventlisteners?
Hello everyone!
Inside a .fla file I have some buttons and each button will tween a different image to the stage. All the images are outside the stage in the same x and y position and I just need to tween the x coordinate.
Now I'm working with an external document class where I'm trying to hold all my functions and I'm stucked with the Tweens. I'm willing to stay away from the flash tween engine and I'm trying to work with tweenLite.
My question is: Is it possible to pass parameters through eventListeners so I can use something like this inside my docClass?
public function animeThis (e:MouseEvent, mc:MovieClip, ep:int):void { //ep stands for endPoint.
TweenLite.to(mc, 2, {x:ep});
If this is possible, how am I supposed to write the listeners so it will pass the event to be listened for AND those parameters? And how to build the function so it will receive those parameters and the event?
If this is not possible, what's the best approach to do this?
Thanks again!
So, I understand you need to match buttons with corresponding visuals.
Here is a suggested approach.
Since SimpleButton is not a dynamic class, I suggest you have an enhanced base class for these buttons that extends SimpleButton. What is enhanced is that button has reference to the target.
I wrote code off the top of my head and it may be buggy. But concept is clear:
This is base class for all the buttons:
package
import flash.display.DisplayObject;
import flash.display.SimpleButton;
public class NavButton extends SimpleButton
public var targetObject:DisplayObject
public function NavButton()
Now, this is your doc class that utilizes this new buttons:
package
import flash.display.DisplayObject;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
public class DocClass extends Sprite
private var btnArray:Array;
private var visuals:Array;
// references to objects being swapped
private var visualIn:MovieClip;
private var visualOut:MovieClip;
public function DocClass()
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
private function init(e:Event = null):void
removeEventListener(Event.ADDED_TO_STAGE, init);
// buttons and MCs shouldn't be in the same array - otherwise it is counterintuitive
// assuming all the objects are on stage
btnArray = [price_btn, pack_btn, brand_btn, position_btn];
visuals = [g19_mc, g16_mc, g09_mc, g04_mc];
configObjects();
private function configObjects():void
var currentVisual:MovieClip;
var currentButton:NavButton;
for (var i:int = 0; i < btnArray.length; i++)
currentVisual = visuals[i];
// hold original positioin
currentVisual.hiddenPosition = currentVisual.x;
currentButton = btnArray[i];
// set target MC
currentButton.targetObject = currentVisual;
currentVisual.addEventListener(MouseEvent.CLICK, placeObject);
currentButton.addEventListener(MouseEvent.CLICK, placeObject);
private function placeObject(e:MouseEvent):void
// if NavButton is clicked - make new visual targeted for moving in and currently visible object subject for moving out
if (e.currentTarget is NavButton) {
visualOut = visualIn;
visualIn = NavButton(e.currentTarget).targetObject;
else {
// otherwise - move visual out
visualOut = visualIn;
swapVisuals();
* Accompishes visuals swapping
private function swapVisuals():void {
if (visualIn) TweenLite.to(visualIn, .3, { x:0 } );
if (visualOut) TweenLite.to(visualOut, .3, { x:visualOut.hiddenPosition } );
Similar Messages
-
Is it possible to pass parameters to custom search portlet?
Hello!
I use custom search to display automatically results.
But I need to dynamically add some conditions or change sort order based on user selection in another portlet.
So, is it possible to pass parameters to custom search portlet?
Boris
P.S. I am use Portal 9.0.4Hello!
Ok, I find how to hack it and find out parameters (p_mainsearch, p_order_by_attribute...), but is there any documentation or notes about it?
And is it possible to change order by list & add there my attributes?
Kind regards,
Boris -
Is it possible to pass parameters for the action in the confirmation dialog
I tried it but a null pointer exception is occuring. Is it possible to pass parameters ,if s give the solution....
Thanks and regards.
Karthik.Hi Karthi,
Directly it is not possible. You can achieve it by this way.
1> Create 2 Event Handlers say OK and OKTest.
public void OK(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin OK(ServerEvent)
String param = "abc";
wdThis.OKTest(wdEvent,param);
//@@end
public void OKTest(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String paramtest )
//@@begin OKTest(ServerEvent)
wdComponentAPI.getMessageManager().reportSuccess("Param : "+paramtest);
//@@end
2> Code for popup.
String dialog = "No of Rows : ";
IWDConfirmationDialog confDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialog,wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("OK"),"OK");
confDialog.setTitle("Test Window");
confDialog.show();
/thread/66776 [original link is broken]
Regards,
Mithu -
Issue with passing parameters through Java-JSP in a report with cross tab
Can anyone tell me, if there's a bug in Java SDK in passing the parameters to a report (rpt file) that has a cross tab in it ?
I hava report that works perfectly fine
with ODBC through IDE and also through browser (JSP page)
(ii) with JDBC in CR 2011 IDE
the rpt file has a cross tab and accpts two parameters.
When I run the JDBC report through JSP the parameters are never considered. The same report works fine when I remove the cross tab and make it a simple report.
I have posted this to CR SDK forum and have not received any reply. This have become a blocker and because of this our delivery has been postponed. We are left with two choices,
Re-Write the rpt files not to have cross-tabs - This would take significant effort
OR
(ii) Abandon the crystal solution and try out any other java based solutions available.
I have given the code here in this forum posting..
CR 2011 - JDBC Report Issue in passing parameters
TIA
DRG
TIA
DRGMr.James,
Thank you for the reply.
As I stated earlier, we have been using the latest service pack (12) when I generated the log file that is uploaded earlier.
To confirm this further, I downloaded the complete eclipse bundle from sdn site and reran the rpt files. No change in the behaviour and the bug is reproducible.
You are right about the parameters, we are using {?@Direction} is: n(1.0)
{?@BDate} is: dt(d(1973-01-01),t(00:00:00.453000000)) as parameters in JSP and we get 146 records when we directly execute the stored procedure. The date and the direction parameter values stored in design time are different. '1965-01-01' and Direction 1.
When we run the JSP page, The parameter that is passed through the JSP page, is displayed correctly on the right top of the report view. But the data that is displayed in cross tab is not corresponding to the date and direction parameter. It corresponds to 1965-01-01 and direction 1 which are saved at design time.
You can test this by modifying the parameter values in the JSP page that I sent earlier. You will see the displayed data will remain same irrespective of the parameter.
Further to note, Before each trial run, I modify the parameters in JSP page, build them and redeploy so that caching does not affect the end result.
This behaviour, we observe on all the reports that have cross-tabs. These reports work perfectly fine when rendered through ODBC-ActiveX viewer and the bug is observable only when ran through Java runtime library. We get this bug on view, export and print functionalities as well.
Additionally we tested the same in
With CR version 2008 instead of CR 2011.
(ii) Different browsers ranging from IE 7 through 9 and FF 7.
The complete environment and various softwares that we used for this testing are,
OS : XP Latest updates as on Oct 2011.
App Server: GlassFish Version 3 with Java version 1.6 and build 21
Database server ; SQL Server 2005. SP 3 - Dev Ed.
JTds JDBC type 4 driver version - 1.2.5 from source forge.
Eclipse : Helios along with crystal libraries directly downloaded from SDN site.
I am uploading the log file that is generated when rendering the rpt for view in IE 8
Regards
DRG -
Passing Parameters through a URL to a Report..
I have noticed a lot of message about similar situations where people have had problems sending certain parameters through a URL.. so this is maybe something that's not possible.. but you if you dont ask then you dont know.
so..
We have a form that has search options in it
(its a customized form that replaces the customization bit that you get with a report -> .show_parms - just so we could do different things with it)
and one of the fields is a combobox populated by an LOV
- it has usernames in it
so when you search using a value in the combobox it will show all the records that that person has entered into the table..
however we are currently getting an error
Error: An unexpected error occurred: ORA-06502: PL/SQL: numeric or value error (WWV-16016)
this is the URL with the parameters
http://portal.somewhere.com/pls/portal30/foldername.RPT_Edit_Request_Old.show?p_arg_names=Request.RID&p_arg_values='||nRID||'&p_arg_names=Request.CID&p_arg_values='||nCID||'&p_arg_names=Request.ATID&p_arg_values='||nATID||'&p_arg_names=Request.REQUEST_NAME&p_arg_values='||nREQNM||'%&p_arg_names=_request_rid_cond&p_arg_values=%3D&p_arg_names=_request_cid_cond&p_arg_values=%3D&p_arg_names=_request_atid_cond&p_arg_values=%3D&p_arg_names=_request_request_name_cond&p_arg_values=LIKE';
when you remove the condition at the end
the report is displayed (but not customized obviously)
however you can see the value has been picked up from the combobox as it's in the URL in the address bar..
so that bit works fine
any thoughts/ideas/or even solutions! :) would be much appreciated
thanks
Richardactually
nevermind
i got it to work without even knowing :)
the condition was causing the error
and adding a % after the value makes it work -
Is it possible to pass parameters from a html to webforms ?
i4m looking for a possiblity to pass (user-defined) parameters from a html page (which includes the applet call + the standart parameters etc.) to the webform.
after passing how to find them inside my webforms ...
thx in advance
regards
nulli found a solution.... :-)
just create a parameter inside the form and pass the value together with the formcall in the "module" parameter....
null -
UNIX script invocation by passing parameters through OIM
According to our requirement, we need to pass parameters (say userid) through OIM 11g R2 to a script and then execute the script for user deprovisioning/deletion in a target m/c
Please let us know how much feasible is it to use UNIX OOTB connectors to pass parameters and execute the scripts ?
Any idea is appreciated.
ThanksYes, you put a line in the script that looks like this:java classname parameter1 parameter2 parameter3 ...Then the JVM will call the static main(String[] args) method of "classname" and put those parameters into the "args" array.
If you are asking how to generate such a script, or how to call it from your COBOL program, sorry, I don't know how to do that. -
Passing parameters through URL in ADF Application with UIShell
Hi,
JDeveloper Studio Edition Version 11.1.1.6.0
The UI in our application is developed with UIShell pageTemplate.
We have a Home page created with PageTemplace "UIShell.jspx" and this page is placed as a view in adfc-config.xml (the Unbounded Task Flow).
The other pages for our application are created using Page Fragments and these pages are called from Home_taskmenu.xml through Bounded task flows.
With this setting, the URL(after SignIn) will look like,
http://localhost:7101/OperationalPlanning/faces/Home?_afrWindowMode=0&_adf.no-new-window-redirect=true&_afrLoop=6811862222491857&_adf.ctrl-state=29wus7giw_19
We have a requirement to build the URL which should open a Page Fragment directly after Signing In to the application. And we have a id to be passed as a parameter, so it should open the page fragment with the details based on the id value that we pass.
The parameters are already registered in the Bounded Task Flow(which has the page fragment) and I could open in the "localArea" using a link in the Home Page.
Now, I want to directly launch the Bounded task flow by passing a parameter, so that it opens the Page Fragment as a tab once we signIn.
Let me know if there is any solution for this requirement.
If there is any document to follow for this kind of requirement in an application which is created using the UIShell, please let me know.
Thanks,
Tamilhi Frank,
Thanks for the response. We followed your suggestion and managed to capture URL parameters in afterPhase(LifeCycle.PREPARE_MODEL) and save parameters to ViewScope.
Then in beforePhase(LifeCycle.PREPARE_RENDER), we retrieve parameters back and invoke FndUIController.openMainTask method to launch the correponding taskflow but nothing happens.
public static void openTaskflowOnNewTab(String taskflowId) {
try {
FacesContext fc = FacesContext.getCurrentInstance();
ELContext elc = fc.getELContext();
ExpressionFactory ef = fc.getApplication().getExpressionFactory();
ValueExpression valExp = ef.createValueExpression(elc,"#{bindings.openMainTask}",Object.class);
JUCtrlActionBinding methodBinding = (JUCtrlActionBinding)valExp.getValue(elc);
Map params = methodBinding.getParamsMap();
params.put("label", "Some Title");
params.put("taskFlowId", taskflowId);
params.put("reuseInstance", true);
methodBinding.invoke();
} catch (Exception e) {
e.printStackTrace();
To prove that this method works, we create a UI button on the page (which binds this method in PageDef.xml), and associate this method to onclick event. At runtime after page is opened, clicking on the button does launch the taskflow on new tab successfully.
Do you happen to know what I do wrong in the beforePhase() method?
Thanks
-Phi -
Select (query) details by passing parameters through a calender
Hi All,
I have a scenario like below;
i have a report and it returns 1000s of details which is not necessary @ all.
what i want to do is, place a calender in top of the report and select date range (probably 2 calenders)
and query the data accordingly by clicking a button or something.
I know i can do this using default filter... but initially i have to pass select * from table; query for that. it returns unnecessary data.
----scenario in brief----
user login to the page
nothing comes until enter data range
once he pick the date range.... after click on the button
then returns the related data according to the date range...
i think you got my question.
can anybody give me a hand to solve this problem.
It will be a great help.....
Thanks in advance
Max
------------------------------Hey Jeff,
I got a problem again. when i try to query the data using a db link... i cant fetch the data using this data time picker... when click the button.. it doesnt fetch the data.
but when i pass the query through the sql workshop. then i get the actual result... dont understand why the same thing does not apply in both places.....
if i hard coded the date... then it works....
here is my query...
SELECT
ATN.ATN_TRANSACTION_DATE RECEIPT_DATE,
--CD.CDL_CHEQUE_NUMBER CHEQUE_NUMBER,
ATN.ATN_VOUCHER_NUMBER RECEIPT_NO ,
ATN.ATN_RECEIPT_PAYMENT_MODE PAY_MODE,
ATN.ATN_JOURNAL_REFERENCE_NUMBER PROPOSAL_NUMBER,
ATN.ATN_TOTAL_AMOUNT ATN_AMOUNT,
CD.CDL_CHEQUE_AMOUNT CD_AMOUNT,
ACT.ACC_GL_CODE GL_CODE,
ATN.ATN_CREATED_BY USER_C,
DECODE(ATN.ATN_RECEIPT_PAYMENT_MODE,'C',ATN.ATN_TOTAL_AMOUNT) CASH,
DECODE(ATN.ATN_RECEIPT_PAYMENT_MODE,'B',ATN.ATN_TOTAL_AMOUNT) IBT,
DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000002','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) HNB_Green_path_1,
DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000005','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) HNB_Green_path_2,
DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000006','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) HNB_Green_path_3,
DECODE(ATN.ATN_RECEIPT_PAYMENT_MODE,'R',ATN.ATN_TOTAL_AMOUNT) Credit_Card,
DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000008','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) HNB_Kollupitiya,
DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000009','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) Commercial_Bank,
DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000010','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) HNB_Green_path_USD
FROM T_ACCOUNTING_TRANSACTION@racprod ATN
,T_ACCOUNTING_TRN_DETAIL@racprod ATD
,T_ACCOUNT@racprod ACT
,T_CHEQUE_DETAIL@racprod CD
WHERE ATN.ATN_ACCOUNTING_TRANSACTION_ID =ATD.ATD_ATN_ACCOUNTING_TRN_ID
AND ATD.ATD_ACC_ACCOUNT_ID=ACT.ACC_ACCOUNT_ID
AND ATN.ATN_ACCOUNTING_TRANSACTION_ID=CD.CDL_ATN_ACCOUNTING_TRN_ID
AND ATN.ATN_TRANSACTION_DATE >=to_date(:P4_FROM_DATE,'dd/mm/yyyy')
AND ATN.ATN_TRANSACTION_DATE <=to_date(:P4_TO_DATE,'dd/mm/yyyy')
AND ATN.ATN_VOUCHER_TYPE IN ('RV','SR')
AND ATN.ATN_ACCOUNTING_TRN_CODE IN ('L1000','S001','S002','S003','S004','S005','S006','S007','S008','S009','S010','S011','S012','S013','S014'
,'L1021','L1031','L1032','L1033','L1034','L1035','L1036','L1037','L1038','L1039','L1040')
AND substr(ATN.ATN_VOUCHER_NUMBER,9,3)=(select branch from user_login where username=:app_user)
AND ATD.ATD_DR_CR_INDICATOR='DR'
AND ATN.ATN_ATN_ACCOUNTING_TRN_ID IS NULL
ORDER BY ATN.ATN_VOUCHER_NUMBER
can u please suggest me a solution...???
Thanks again,
Max -
Passing parameters through Single JCo to different systems
I have created a web dynpro application and integrated into a portal, which access R/3 using a JCo destination and retrieves the data using a BAPI.
But I want to integrate the same application into another portal, which would access the different R/3 system having the same function module.
Is there any way for switching between two Jco destinations as the same application could be made to work for both the systems?
Please suggest me as I am stuck up with this issue.
Thanks for your response; the thing is the portals are sharing the same landscape.
Is there any other way to achieve switching of the JCO destinations even on the same landscape?
You have the same application but want to connect to different JCos.
I think you will be creating two WD iViews for the same application. In the application properties do the following:
Use the following url parameter to the application URI
sap-wd-arfc-useSys=<DEFAULT_SYSTEM>:<SUFFIX_OF_MAPPED_SYSTEM>
In the default system you can change your JCo destination name
Please suggest me .
Thanks
LohiHi Mani,
Thanks for your response.
And one more problem we are facing.
Now our application needs to be deployed on different systems with different JCo connection names, for this we have passed a parameter Sap-wd-arfc-useSys in the URL defining the new Jco Connection name .
for example we have created the application on Jco connection name ABC_DEST and we have passed the parameter value ans ABC_DESTLHP in the URL.
This ABC_DESTLHP JCO Connection is defined on the that particular system where we have deployed the application.
It was working fine When we were using one application and one component But it is not working with case of two applications and two components.
We are using inter applciation navigation to pass the parameters from first application to second application.
The parameters being passed are captured from the URL and that is creating the problem as the URL is being changed dynamically when capturing the parameters.
So Please let us know is there any way we could define the Jco Connection name in the program itself.
Or else if you could provide me your number that would be great help (If you are in US or India) .
Thanks in advance
Lohi -
Is it possible to pass parameters as query string to url iview of of sap tr
I have created sap transaction iview . and created url iview for this sap transaction iview. Now i want to pass the parameters to this url iview as query string? and this parameter values should populate in the sap transaction screen . Have any body worked on this?
pl. help.
thanksURL iview I think is not the right way to do this.
For this we have several templates calles application integrator.
BR, Oliver -
How to pass parameters through POST
Hi,
Can any one help me how to pass the parameters and read it using POST method in webdynpro java.Use the following code to read URL parameters inside WDJ
// Check for URL parameters
IWDProtocolAdapter protocolAdapter = WDProtocolAdapter.getProtocolAdapter();
IWDRequest request = protocolAdapter.getRequestObject();
String text = request.getParameter("url_parameter");
Hope this helps. -
Passing parameters in a html page using xwd_tmppg.create
We are in the initial stage of Developing a OLAP Web Application using
Oracle Express Web Agent 6.3.2,Oracle Express Administrator6.3.2.
Flow of our screens are:-
We have a login screen that authenticates user entry to access his assigned role screen.Based on the role the user selects we will be listing out the analysis in a screen that the user could access.
Express Programs are used to create Role and Analysis screen.
User logged information is passed from login to role screen and to
analysis screen using XWD_APPPG.CREATE that accepts parameters.
Moreover this function can only be used to create html page with out
data views.
Now let us come to our problem-
We need to take the user from analysis screen to detailed data view screen that shows the OLAP cube with a back & exit button.As explained earlier you need to use the function XWD_TMPPG.CREATE to create dataview.It is not possible to pass parameters through this function.This function accepts .html as the only parameter.But we need to pass the userid info to get back to analysis screen for the user to select the next analysis.I need the user logged info available in the template file.
Is there any solution for this problem or any other approach to capture the user logged info in the template file???Hi Aneel,
Thanks for your informative suggestion on how to receive data from
previous page on to the template page using LOCATION.SEARCH.SUBSTRING
function.
I could very successfully get the userid information by implementing
this method within the SCRIPT boundary.
I also want to pass this value to a express program embedded
within the <!--EXPRESS call foot(userid)--> so that it will enable the
user to go back to List of analysis page.her my footer program will
inturn call the Analysis Page with the userid information.That's my
whole idea.
I tried the following methods to acieve my end result-
1)Tried to store the value in a local variable in the template & passed
it to the express program -- Error thrown was "userid is not attached in
the database"
2)Directly specifed location.search.sunstring in the express program..
Still the same error was thrown
3)Thought of storing the value in the name of hidden object .Still this
will not work out because i need to declare the object in the FORM..
Moreover the value is avialable wihin the JAVA SCRIPT range.Out of this
range template is not able to identify this value.
Any idea Aneel form your end.
Can you let me know how to use hidden object in achieving the result.
I have been working very hard for quite sometime.
Advance thanks.
Nanda Kishore -
Hi,
Does anybody know how/if it's possible to pass parameters into a URL from LOV/comboboxes/tick-boxes etc...
I know this is possible through External Applications for the username and password, but what if the user wants to select multiple departments of a given report?
The idea being, that we are going to be passing parameters into Sales Analyser to fire off a specific report with given values.
These values are restricted, depending on which user you are and your level of access to the portal. This URL will then be used to open an SA report with the details required.
Thanks, Matt.Hi,
You will have to encode your parameter value. The problem is because of the spaces in the value. Whenever there any special
characters in the value it should be encoded.
example
select '<area shape="rect" coords="335,66,528,83" href="http://townland:7778/pls/portal30/PORTAL30.RPT_SUMKWH.show_parms?meter='||
<portal_schema>.wwutl_htf.url_encode('PMS 11BBA01')||'">pams</a>' url
from meters
The above is just an example. Please change the names to suit your requirements.
Thanks,
Sharmila -
Passing parameters from one channel to another
Hi,
I was wondering if it is possible to pass parameters or values from one channel to another, for ex. through JSP, etc.
Thanks, Pablotry these topics
http://swforum.sun.com/jive/thread.jspa?forumID=80&threadID=19222
http://swforum.sun.com/jive/thread.jspa?forumID=80&threadID=23051
and maybe
http://swforum.sun.com/jive/thread.jspa?forumID=80&threadID=19222
I use javaBeans or SSOToken to exchange parameters between portlets.
Maybe you are looking for
-
Backup management: how to update a Time Machine backup on a different Mac?
Hello everyone, I need some advice. I have a question, which I think is simple, but my situation is a bit complicated, so I am not sure about what to do. I will try to describe it as simply as possible. There are 3 macs: A: an old macbook (the white
-
Is there any collective way to have Lightroom 5 find lost files?
Though I have tried to move folders and files only with Lightroom, I note that a good number of my images shown in thumbnails in Library cannot be opened because Lightroom 5 cannot find the files. I assume I have moved files among drives accidentall
-
How to control the space between records in form layout
Hi , I need to display mutiple records (15-20) in a form , and have choosen FORM layout as I need to display each record in two lines (Can a record be displayed in two lines in TABULAR layout ? ) . Now There is lot of space between each record and I
-
Drag and drop in newly shared folders not working
Hello, Is can find some similar issues with GW8 Webaccess in the forum from some time back but not quite like what we are experiencing. We are unable to move message into newly shared folders for which we have all the rights. No problems with folders
-
My itunes wont convert acc to mp3
can anyone help ?? im trying to add music to my ipod from legitamate cds that i have bought it says they have to be converted from ACC to MP3.. fine its always comeup with that so i click convert... it gets through a few of the songs in the album the