Accessing Common functionality from multiple parts of my web app
I have a web app and one of the modules is getting used by other modules in the application.
This was ok when we had 2 modules accessing this module but now we are adding more and more.
The module consists of JSP and Servlets and Backend DAO's.
Right now I have special cases (if statements) that determine what module is accessing this module (each module passes in it id in the URL for example testId, correctionId.
Basically what this module creates can be assoicated with other modules, so the DAO will save and then check to see if certian module ids are present and then does a save based on that.
I dont think this solution is very elegent and I was wondering if anyone had any suggestions on a good way to design this module so it can be easily accessed from other modules in my application.
So to summerize:
All my modules are JSP/Servlet/DAO/Model Code
One of my Modules is accessed from many other modules.
When this module saves its data to the database, it has to take the id that the calling module passsed into it and determine what database bridge table it should save to.
I want to if anyone has any suggestions on how to design this so allowing more modules to access this module will not require anot of extra code in the module.
Thank you,
Al
Hello Al,
Use DAO Pattern.
Have a Factory Class which determines which DAO object it instantiates and hands it over to the Servlet.
Based on the ID, Create the instance object of the DAO and have an interface which has the contract method.
What I mean is :
For Example lets say u have a Interface "ModuleDAO". Have a method "persistData"...
Create 2 DAO Implementations which implement the same Interface and both will have their own "persistData" implementation going to the respective Tables. The reason why I am recommending multiple DAO implementation is to avoid If else / etc and complex coding.The implementations are independant of each other.
Have a DAO Factory [or you can use Spring Framework Bean Factory] infront and have your servlet request for the DAO Implemntation based on the ID.
Your servlet should have NO reference to the Internal Implementation which is being retuirned. It only need to know about the Interface. This way code is clean, decoupled from logic and easier if you want to move the logic out to EJB / External WebServices, etc...
Hope this helps.
By this way, you are exercising all "Factory, DAO and Bridge" Design Patterns.
Thanks,
Pazhanikanthan. P
Similar Messages
-
SharePoint 2013 Multiple authentication prompts for web apps
We have multiple web apps for MySite, collaboration portal and search centre. When users click on different URLs and access different portals non IE browsers prompt for credentials multiple times for
each Web app.
Is this some thing to do with
kerberos delegation set-up?
http://technet.microsoft.com/en-us/library/ee806870(v=office.15).aspx
sudesh withanageThis is basically the way its designed to work. Kerberos will help with authentication between different site collections on the same web app, but not different web apps. Since you have multiple web apps Kerberos Delegation of credentials does
not apply. It only happens on non-IE browsers because IE can be set to pass the OS credentials in the background by default. For other browsers you normally have to save a web site's credentials.
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem. -
Access Canon MX860 from multiple accounts on iMac over WiFi
I bought a Canon PIXMA MX860 yesterday and set it up using my account on our iMac running 10.5.6. The printer is connected over WiFi. I can print and scan from my account.
When I try to print from another account on the iMac (my wife as an account and we have a guest account) the printer queue says "Printer is currently off-line". I sent a message to Canon, they told me to set permissions for "Everyone" to Read & Write on the Library folder. I tried this for:
/Macintosh HD/Library/Printers/Canon
and all enclosed items. Still doesn't work.
Has anyone else set up the MX860 to print from multiple accounts on a computer? Did you have to do anything beyond the procedure specified by Canon?
Thanks!
MattHello Matt,
I don't understand why Canon support would have got you to change permissions on the Canon folder. This is not normally required.
I have the MP980 connected via wireless, and I can print to it from my Admin account and a standard account I made up just to check. What account type do you have set for the missus?
I also would have thought that the printer off-line message would have had more to do with her account not being able to access the network connection, rather than not being able to access the core Printers folder.
If using her account, you open the Print Queue and select the Utility icon, and then set the Canon IJ Printer Utility to network, does the MX860 display? And if you select it, can you peform any of the Maintenance functions?
Also, if you connect the MX860 directly to the Mac via USB, are you able to print to it using her account?
Pahu -
Accessing a function from a movieclip form a top level layer
Im having a dillema. my whole game rests on being able to
access functions from a movieclip inside a movieclip in a top level
layer called "Cards" to another layer called "Functions". I've used
this code:
play_modifier_card(this.num.text);
to access this function:
function play_modifier_card(card_num){
trace(card_num);
It works OK when the function is in the movieclip but not
when it is in a top level layer. I tried
"_root.play_modifier_card(this.num.text);" but it didn't work. Any
help appriciated. Thanks in advance._global.play_modifier_card(card_num) {
trace(card_num);
} -
Parallel run of the same function from multiple jobs
Hello, everyone!
I have a function which accepts a date range, reads invoices from a partitioned by date table and writes output to a partitioned by invoice table. Each invoice can have records only with one date, so both tables may have one invoice only in one partition, i.e. partitions do not overlap. Function commits after processing each date. The whole process was running about 6 hrs with 46 million records in source table.
We are expecting source table to grow over 150 million rows, so we decided to split it into 3 parallel jobs and each job will process 1/3 of dates, and, as a result, 1/3 of invoices.
So, we call this function from 3 concurrent UNIX jobs and each job passes its own range of dates.
What we noticed, is that even if we run 3 jobs concurrently, they do not run this way! When 1st job ends after 2 hrs of run, the number of commited rows in the target table is equal to the number of rows inserted by this job. When 2nd job ends after 4 hrs of run, the number of rows in the target table is equal the summary of two jobs. And the 3rd job ends only after 6 hrs.
So, instead of improving a process by splitting it into 3 parallel jobs we ended up having 3 jobs instead of one with the same 6 hrs until target table is loaded.
My question is - How to make it work? It looks like Oracle 11g is smart enough to recognize, that all 3 jobs are calling the same function and execute this function only once at the time. I.e. it looks like only one copy of the function is loaded into the memory at the same even if it called by 3 different sessions.
The function itself has a very complicated logic, does a lot of verifications by joining to another tables and we do not want to maintain 3 copies of the same code under different names. And beside this, the plan is that if with 150 mln rows we will have a performance problem, then split it to more concurrent jobs, for example 6 or 8 jobs. Obviously we do not want to maintain so many copies of the same code by copying this function into another names.
I was monitoring jobs by quering V$SESSION and V$SQLAREA ROWS_PROCESSED and EXECUTIONS and I can see, that each job has its own set of SID's (i.e. runs up to 8 parallel processes), but number of commited rows is always eqal to the number of rows from the 1st job, then 2nd+1st, etc. So, it looks like all processes of 2nd and 3rd jobs are waiting until 1st one is done.
Any ideas?OK, this is my SQL and results (some output columns are ommited as irrelevant)
SELECT
TRIM ( SESS.OSUSER ) "OSUser"
, TRIM ( SESS.USERNAME ) "OraUser"
, NVL(TRIM(SESS.SCHEMANAME),'------') "Schema"
, SESS.AUDSID "AudSID"
, SESS.SID "SID"
, TO_CHAR(SESS.LOGON_TIME,'HH24:MI:SS') "Sess Strt"
, SUBSTR(SQLAREA.FIRST_LOAD_TIME,12) "Tran Strt"
, NUMTODSINTERVAL((SYSDATE-TO_DATE(SQLAREA.FIRST_LOAD_TIME,'yyyy-mm-dd hh24:mi:ss')),'DAY') "Tran Time"
, SQLAREA.EXECUTIONS "Execs"
, TO_CHAR(SQLAREA.ROWS_PROCESSED,'999,999,999') "Rows"
, TO_CHAR(TRAN.USED_UREC,'999,999,999') "Undo Rec"
, TO_CHAR(TRAN.USED_UBLK,'999,999,999') "Undo Blks"
, SQLAREA.SORTS "Sorts"
, SQLAREA.FETCHES "Fetches"
, SQLAREA.LOADS "Loads"
, SQLAREA.PARSE_CALLS "Parse Calls"
, TRIM ( SESS.PROGRAM ) "Program"
, SESS.SERIAL# "Serial#"
, TRAN.STATUS "Status"
, SESS.STATE "State"
, SESS.EVENT "Event"
, SESS.P1TEXT||' '||SESS.P1 "P1"
, SESS.P2TEXT||' '||SESS.P2 "P2"
, SESS.P3TEXT||' '||SESS.P3 "P3"
, SESS.WAIT_CLASS "Wait Class"
, NUMTODSINTERVAL(SESS.WAIT_TIME_MICRO/1000000,'SECOND') "Wait Time"
, NUMTODSINTERVAL(SQLAREA.CONCURRENCY_WAIT_TIME/1000000,'SECOND') "Wait Concurr"
, NUMTODSINTERVAL(SQLAREA.CLUSTER_WAIT_TIME/1000000,'SECOND') "Wait Cluster"
, NUMTODSINTERVAL(SQLAREA.USER_IO_WAIT_TIME/1000000,'SECOND') "Wait I/O"
, SESS.ROW_WAIT_FILE# "Row Wait File"
, SESS.ROW_WAIT_OBJ# "Row Wait Obj"
, SESS.USER# "User#"
, SESS.OWNERID "OwnerID"
, SESS.SCHEMA# "Schema#"
, TRIM ( SESS.PROCESS ) "Process"
, NUMTODSINTERVAL(SQLAREA.CPU_TIME/1000000,'SECOND') "CPU Time"
, NUMTODSINTERVAL(SQLAREA.ELAPSED_TIME/1000000,'SECOND') "Elapsed Time"
, SQLAREA.DISK_READS "Disk Reads"
, SQLAREA.DIRECT_WRITES "Direct Writes"
, SQLAREA.BUFFER_GETS "Buffers"
, SQLAREA.SHARABLE_MEM "Sharable Memory"
, SQLAREA.PERSISTENT_MEM "Persistent Memory"
, SQLAREA.RUNTIME_MEM "RunTime Memory"
, TRIM ( SESS.MACHINE ) "Machine"
, TRIM ( SESS.TERMINAL ) "Terminal"
, TRIM ( SESS.TYPE ) "Type"
, SQLAREA.MODULE "Module"
, SESS.SERVICE_NAME "Service name"
FROM V$SESSION SESS
INNER JOIN V$SQLAREA SQLAREA
ON SESS.SQL_ADDRESS = SQLAREA.ADDRESS
and UPPER(SESS.STATUS) = 'ACTIVE'
LEFT JOIN V$TRANSACTION TRAN
ON TRAN.ADDR = SESS.TADDR
ORDER BY SESS.OSUSER
,SESS.USERNAME
,SESS.AUDSID
,NVL(SESS.SCHEMANAME,' ')
,SESS.SID
AudSID SID Sess Strt Tran Strt Tran Time Execs Rows Undo Rec Undo Blks Sorts Fetches Loads Parse Calls Status State Event P1 P2 P3 Wait Class Wait Time Wait Concurr Wait Cluster Wait I/O Row Wait File Row Wait Obj Process CPU Time Elapsed Time Disk Reads Direct Writes Buffers Sharable Memory Persistent Memory RunTime Memory
409585 272 22:15:36 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITED SHORT TIME PX Deq: Execute Reply sleeptime/senderid 200 passes 2 0 Idle 0 0:0:0.436000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 7 21777 22739 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 203 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.9674000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 25 124730 4180 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 210 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.11714000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 24 124730 22854 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 231 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.4623000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 46 21451 4178 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 243 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITED SHORT TIME PX qref latch function 154 sleeptime 13835058061074451432 qref 0 Other 0 0:0:0.4000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 35 21451 3550 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 252 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.19815000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 49 21451 22860 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 273 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.11621000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 22 124730 4182 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 277 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING db file parallel read files 20 blocks 125 requests 125 User I/O 0 0:0:0.242651000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 39 21451 4184 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 283 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.2781000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 42 21451 3552 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 295 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.24424000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 40 21451 22862 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 311 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.15788000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 31 21451 22856 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 242 22:15:36 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITED KNOWN TIME PX Deq: Execute Reply sleeptime/senderid 200 passes 1 0 Idle 0 0:0:0.522344000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 28 137723 22736 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 192 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.14334000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 31 21462 4202 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 222 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.16694000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 37 21462 4194 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 233 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.7731000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 44 21462 4198 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 253 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING db file parallel read files 21 blocks 125 requests 125 User I/O 0 0:0:0.792518000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 39 21462 4204 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 259 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.2961000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 35 21462 4196 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 291 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.9548000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 35 21462 4200 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 236 22:15:36 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq: Table Q Normal sleeptime/senderid 200 passes 2 0 Idle 0 0:0:0.91548000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 25 124870 22831 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 207 22:30:30 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq: Execution Msg sleeptime/senderid 268566527 passes 3 0 Idle 0 0:0:0.644662000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 43 21423 4208 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 241 22:30:30 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq: Execution Msg sleeptime/senderid 268566527 passes 3 0 Idle 0 0:0:0.644594000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 47 21423 4192 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 297 22:30:30 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING db file parallel read files 20 blocks 109 requests 109 User I/O 0 0:0:0.793261000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 12 21316 4206 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448Here I found one interesting query http://www.pythian.com/news/922/recent-spike-report-from-vactive_session_history-ash/
But it does not help me -
Multiple servlets in one web app?
Is this possible?
what I want is to have different servlets handling different parts of the app and control to be passed via <form> tag in embeded html.
If this is possible do I need to deploy each of them on their own or can I have multiple entries in the web.xml file.
Alternatively am I going about this the wrong way?
ThanksYou should have a look at web.xml documentation. You would find out a lot more features you could use and get a better understanding how this all works and what all could be done. If you have tomcat, have a look at it's documentation or even better get the free pdf at pdf.coreservlets.com!
-
How to hide "View in Browser" and "Edit in Browser" from ECB injected by Office Web Apps Feature
Hi,
i am currently using custom_AddDocLibMenuItems to implement a custom ECB menu for my document library. I need to activate Office Web Apps. My custom_AddDocLibMenuItems has two items
-> custom dialog
-> open in office web apps
After activating the Office Web Apps Feature at the SiteCollection Level, this Feature "injects" in my custom menu the following
additional menu items:
-> View in Browser
-> Edit in Browser
Its curious to see that, cause implementing the js function custom_AddDocLibMenuItems with
return true should be the way to impolement a custom ECB menu without having other features/solutions injecting things in this menu!? Or did i misunderstood something here?
My question is: How can i prevent this ...
a) without deactivating the Office Web Apps Feature
b) without modifying the core.js
I hope someone can help!
Best Regards
Bog
Developers Field Notes | www.bog1.deMay be this can help
http://extreme-sharepoint.com/2011/10/29/hide-menu-ecb/http://pholpar.wordpress.com/2011/07/24/hiding-ecb-custom-actions-based-on-specific-list-properties-using-the-client-object-model/Or tryhttp://stackoverflow.com/questions/13795858/how-to-hide-view-in-browser-in-document-library-in-sharepoint-2010-using-javascr $(document).ready(function(){
$('.ms-MenuUIPopupBody').live('blur', function() {
var elm = $("div.ms-MenuUIULItem a:contains('View in Browser')");
elm.remove();
$("div.ms-MenuUIULItem a:contains('Edit in Browser')").remove();
It is hiding menu only on focus or blur or mouseover
I wants it to be hide on load AS soon as i Click on "V" option on right side of document it should hide View in Browser and Edit in browser
When I click on V option ![I wants As soon as i Click on v option right side of test it should hide view in Browser and edit in browser][1]
If this helped you resolve your issue, please mark it Answered -
Unable to access protected function from the child object
Hi all ,
I have an abstract class having one protected method
package foo;
public abstract class A {
protected String getName(){
return "ABC';
package xyz;
public class B extends A {
public void print(){
*super.getName();//this will get called*
package abc;
public class Ex {
public static void main(String [] args){
B b = new B();
*b.getName(); //Im not able to calll this function*
}{code}
My question is why I m not able to call the protected method from child instance but inside the class ???
I have checked this link , it also didn't say about the instance access or access within class .
[http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html]
Thanks and regards
Anshuman
Edited by: techie_india on Aug 31, 2009 11:25 AMjossyvjose wrote:
Hi Winston,
Did you mean like this? But still same behaviour.
package abc;
public class Ex extends A {
public static void main(String [] args){
B b = new B();
b.getName(); //still i am not able to calll this function
}No. Class 'Ex' would have to extend B in order to call b.GetName(). And I would definitely not make Ex part of your hierarchy (it's the sort of thing you see in SCJP questions, but definitely a bad idea).
What you can do though is to override the method; and Java allows you to change the visibility of overriden methods, provided they are more open. Thus, the following would be allowed:
package foo;
public abstract class A {
protected String getName(){
return "ABC';
package xyz;
public class B extends A {
public void print(){
System.out.println(super.getName()); // your previous code does nothing...
public String getName() { // Note the "public" accessor
return super.getName();
package abc;
public class Ex {
public static void main(String [] args){
B b = new B();
b.getName(); // And NOW it'll work...
{code}Note that this is just example code. I wouldn't suggest it as general practise.
Also, when you write *public* methods, you should generally make them *final* as well (there are exceptions, but it's a good habit to get into; like making instance variables *private* - just do it).
HIH
Winston -
Accessing JavaScript function from an Applet?
Hi,
I've found how to access an applet's method from Jscript, but can we do the inverse? I'd like to refresh some frames in my web pages from my applet.
The refresh of several frames could be done with a Jscript function but how can I call it from my applet?
Thanks!
Stephaneactually look at this link to make more sense
http://www.woodger.ca/jv_jsint.htm -
Accessing iTunes music from multiple computers, platforms?
Please accept my apologies in advance if this is a dumb question, but I'm a newbie and I need help.
I have a PC that I have been using as a storage drive for a (33GB +) collection of iTunes (recently upgraded to iTunes 8.02.20). I play those tunes on a 1st generation 4GB Nano, as well as at home on the computer. That PC is one of several that runs on a peer-to-peer wired and and wireless network in my house, the wireless part through several different access points.
All of my music was loaded into iTunes from recordings I own, either on CD or digitized from vinyl. None was bought on the iTunes store or downloaded from the web, so I don't think there should be any DRM issues, but I don't know if there are any limitations imposed by iTunes as a default.
I have two questions:
1 - I recently got a MacBook Pro, and I'd like to be able to duplicate a portion of my music onto its hard drive (but nowhere near all, as it would clutter up the hard drive unacceptably).
2 - I'd also like to be able to get at the iTunes files from all of the machines on the network, without duplicating the files themselves, if that's possible (to be able to include them in creating slideshows, movies, etc.)
Is there any way to make this possible? Are there any DRM issues that attend doing something like this? Thanks in advance for any help you can provide.Here is the background article on that - if you look at the network share as the "publicly accessible music folder" while reading it.
http://support.apple.com/kb/HT1203
So basically you have the network share. All the users drag files from it into their itunes library, so the database ITL file knows where to go to play it.
http://support.apple.com/kb/HT1660
And make sure each user has the option for copying files turned OFF, or you'll get duplicate files on the share.
http://support.apple.com/kb/TA26579 -
How to access (call) variables from multiple components
I have what I think is a basic task, but I cant seem to get it to work. I have a Flex project with one application. In addition to the one application, I have many components that are used in the application. These components vary from simple (a ComboBox) to complex (many sub-components). What I need to do is define a viable in one component and access it in another component. I can't seem to do this. Below is an example of how I think it should be:
Component1
<mx:Script>
<![CDATA[
[Bindable]
private var userID:int=0;
]]>
</mx:Script>
Component2
<mx:TextInput text="{Component1.userID}"/>
Any help you can provide would be beneficial.
LeeHello,
You may also want to consider using the mx.core method.
In your main application script area define all of your public variables and functions. Then from your component, you can reference these absolutely with the following syntax.
<!-- Main App -->
[Bindable]
public var userID:int;
<!-- Component -->
private function init():void {
var com_UserID = mx.core.Application.application.userID;
Using this method ensures that you will have access to any Function or variable within the scope of the project.
Kind Regards,
Dr. Ivan Alexander, Ph.D.
Sr. Applications Engineer
FlexAppsStore.com
Sun Microsystems
MySQL Enterprise Ready Partner 2009 -
Accessing parent function from class
Hey guys
I have a .fla file with some code in the actions panel.
A bit of code calls a function in a class from the actions panel
The function in the class is run, but I want to be able to call a function in the main actions panel code from the function in that class
The class doesn't extend anything so (parent as MovieClip).function() does not work
Any ideas?
Thanks
Chrisif you're trying to reference code attached to a timeline, your class will need a displayobject reference. you can pass it a reference when instantiating a class object:
// on a timeline:
var c:YourClass=new YourClass(this); // code your constructor to accept this movieclip reference.
you can then use that reference to access code in any timeline (that exists when trying to reference):
private var tl:MovieClip; // import the mc class.
public funciton YourClass(mc:MovieClip){
tl=mc; -
Accessing iTunes account from multiple computers
I added iTunes gift cards to my account from one competer but cannot see the balance when logging in from another computer - any help appreciated
You can access your account, but the music will only be where you put it.
It doesn't just magically appear on any computer that you log into. You would have to copy the music and put it on the computer.
You can use home share, your backup copy, cds, dvds, external drives,etc to copy and move music if you like. -
Object not embedded error whenever i tried to access actionscript function from js
hi,
i badly need help in embedding my swf in html , because it keeps saying that my object is undefined.
object undefined error.
i am trying to pass values from js to actionscript and then i embedded it.
i tried to embed it using embed and object tags only, but the javascript functions are not working.
It keeps saying that object is expected.
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/" WIDTH="500" HEIGHT="500" id="flaMovie1">
<PARAM NAME=movie VALUE="dwpPlayer.swf">
<PARAM NAME="allowScriptAccess" value="always" />
<PARAM NAME=quality VALUE=high>
<EMBED src="dwpPlayer.swf"
quality=high bgcolor="#aaaaaa" WIDTH="400" HEIGHT="200"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
i am trying to embed it that way, the swf is showing but the javascripts and functions are not working..
please help. i already tried using the AC FL RunContent, yes it is showing but i can't postion my items using this
<table>
<td>
hoy!
</td>
</tr>
<tr>
<td>
<div visibility:visible>
<script language="JavaScript" type="text/javascript">
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
'width', '400',
'height', '400',
'src', 'dwpPlayer',
'quality', 'high',
'pluginspage', 'http://www.adobe.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'dwpPlayer',
'bgcolor', '#ffffff',
'name', 'dwpPlayer',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','always',
'movie', 'dwpPlayer',
'salign', ''
); //end AC code
</script>
</div>
</td>here's a sample of correct embedding html. you'll need AC_RunActiveContent.js, too:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Bday-flowers_Preview_NoMusic</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#cdb4a7">
<!--url's used in the movie-->
<!--text used in the movie-->
<!--
<p align="center"><font face="Arial" size="40" color="#2d3271" letterSpacing="0.000000" kerning="1">Preview Only</font></p><p align="center"></p><p align="center"><font face="Arial" size="40" color="#2d3271" letterSpacing="0.000000" kerning="1">(Your message will </font></p><p align="center"><font face="Arial" size="40" color="#2d3271" letterSpacing="0.000000" kerning="1">appear here.)</font></p><p align="center"></p><p align="center"></p><p align="center"></p><p align="center"></p><p align="center"></p><p align="center"></p>
-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '990',
'height', '680',
'src', 'Bday-flowers_Preview_NoMusic',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'Bday-flowers_Preview_NoMusic',
'bgcolor', '#cdb4a7',
'name', 'Bday-flowers_Preview_NoMusic',
'menu', 'true',
'allowFullScreen', 'true',
'allowScriptAccess','sameDomain',
'movie', 'Bday-flowers_Preview_NoMusic',
'salign', ''
); //end AC code
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="990" height="680" id="Bday-flowers_Preview_NoMusic" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="Bday-flowers_Preview_NoMusic.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#cdb4a7" /> <embed src="Bday-flowers_Preview_NoMusic.swf" quality="high" bgcolor="#cdb4a7" width="990" height="680" name="Bday-flowers_Preview_NoMusic" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
</body>
</html> -
Accessing iTunes Account from Multiple PC's
Am I able to access my iTunes account (and my entire library of music) from more than one PC? If yes, are there risks or important things to know before doing so? thanks WFGP
You can access your account, but the music will only be where you put it.
It doesn't just magically appear on any computer that you log into. You would have to copy the music and put it on the computer.
You can use home share, your backup copy, cds, dvds, external drives,etc to copy and move music if you like.
Maybe you are looking for
-
I've barely begun to use CS5 (evaluation copy) and have already found some issues I don't know how to solve. And I was so looking forward to content aware fill! 1) CS5 is losing focus after a resize. I do a lot of repetitive things where I use a ser
-
Copying programs from legacy system
Hi, I need to copy a function module existing in legacy system to current system. I have copied the function module but I'm not sure how to copy the includes. Some of the includes are standard SAP includes like MBDCONWF. Can anyone tell me how to go
-
How do I package a written program?
I finally got my first little fun program done -- now where do I find out how to package this so that people can use it? I would also like to find out how to set it up for use on a webpage. NOT an applet but through the Java Web Start. Can someone he
-
Adobe flash not working on internet explorer
i have installed and re-installed over and over again, adobe flash seems to download fine, but doesn't work...works on google chrome, but hate google chrome...the funny thing is that i've had adobe flash all along on internet explorer, and one day it
-
Function Module for syntax check on the repository objects
Hi Experts, Can anyone help me in finding out the function module used to do syntax check on Repository objects(PRograms/Smartforms/FUnction Modules...etc.,) Dr. Arif Shaik