Create object name using a String variable

Hi,
I�m making a jsp page and I need to add several objects to a vector. The vector's name is arrayGrupo, and the object is Grupo. The problem is that when I create the instance of the object, I cant �give him different names, so the add in the Vector will always be of the same object instance. Is there anyway to create an object name using a variable?
Something like this:
<% if (request.getParameter("grupoNome") != null ) {
                                   nomeG=request.getParameter("grupoNome");
                                   descG=request.getParameter("grupoDesc");
                                   int nG=arrayGrupo.getTamanho(); //size of the array
                                   String xpto=String.valueOf(nG);
                                   Grupo "xpto"= new Grupo(); //here is the problem
                                   xpto.setNomeGrupo(nomeG);
                                   xpto.setDescricao(descG);
                                   xpto.setIdgrupo(arrayGrupo.getTamanho()+1);
                                   arrayGrupo.addGrupo(xpto);
}%>
Thanks
Rui Gon�alves

I want to show a list of objects that are stored in a vector. But I also want to add objects to that vector. If I just want to add one object, I can use this code:
<% if (request.getParameter("grupoNome") != null ) {
                                   nomeG=request.getParameter("grupoNome");
                                   descG=request.getParameter("grupoDesc");
                                   Grupo newGrupo = new Grupo(nomeG,descG,arrayGrupo.getTamanho()+1);
                                   arrayGrupo.addGrupo(newGrupo);
%>
What should I do if I want to add more than one object to the vector?
I don�t know if I made myself clear but is quite hard to explain my problem.
Thanks

Similar Messages

  • Setting Prompt Directory path using a string variable?

    So when you define a Prompt you get the form P[promptname.wav] and all is good.  What we want to do is have that prompt name be retrieved from a prompt directory which is defined by a string.   So assume all your prompts have the same numbers like 1001.wav but the actual file is customized based on things like Sales/1001.wav and Marketing/1001.wav   and you want to have a StringValue DirectoryName set the Directory to Sales or Marketing.   The Script does not seem to support setting P["DirectoryName"/1001.wav] where Directory Name is a string variable.    Is there a solution to this other than changing the entire prompt to a string type and dropping the P[] data type entirely?   

    I am working with a similar issue.   It is simple enought to set the Prompt Directory but when it is a variable it seems to have different results.  The attached simple script is used to demonstrate Sam's recommendation.  The XML document is embedded in the script variable, so you dont need to create it.   So the script reaches into the XML document and pulls up the variable strDirectoryName and then adds "/" to it and then sets the strPromptDirectory.   I have done it three ways:  Hard coded, string value for prompt' and prompt data type resolved from string.  As you single step through the script you will find that all values populate appropriately, but only the hard coded play prompt actually plays the prompt.  The other two assemblies fail.  (Clearly it assumes the prompt 10001.wav is in the directory Generic/ if you want to try it).    Written in  Version 8.5 editor.  

  • [solved] JBO-25005: Object name 1 for type Variable is invalid

    Hi All
    When Deploying our Application to Oracle Application server we got this Exception on the Application log after while
    JBO-30003: The application pool (model.setup.SetupAppModuleLocal) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.InvalidObjNameException, msg=JBO-25005: Object name 1 for type Variable is invalid
    at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)
    at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:233)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)
    at oracle.adf.model.bc4j.DCJboDataControl.rebuildApplicationModule(DCJboDataControl.java:1543)
    at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1404)
    at oracle.adf.model.BindingContext.beginRequest(BindingContext.java:683)
    at oracle.adf.model.BindingRequestHandler.invokeBeginRequest(BindingRequestHandler.java:346)
    at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:166)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:161)
    ## Detail 0 ##
    oracle.jbo.InvalidObjNameException: JBO-25005: Object name 1 for type Variable is invalid
    at oracle.jbo.common.VariableImpl.validateName(VariableImpl.java:234)
    at oracle.jbo.common.VariableImpl.setVariableKind(VariableImpl.java:301)
    at oracle.jbo.server.ViewObjectImpl.activateParams(ViewObjectImpl.java:13306)
    at oracle.jbo.server.ViewObjectImpl.doActivateSettings(ViewObjectImpl.java:13368)
    at oracle.jbo.server.ViewObjectImpl.doActivateSettings(ViewObjectImpl.java:13217)
    at oracle.jbo.server.ApplicationModuleImpl.activateVOs(ApplicationModuleImpl.java:7173)
    at oracle.jbo.server.ApplicationModuleImpl.doActivateState(ApplicationModuleImpl.java:6996)
    at oracle.jbo.server.ApplicationModuleImpl.doActivateAMState(ApplicationModuleImpl.java:6961)
    What does this mean ??

    Hi Mahmoud,
    from the stack trace, it appears the error occurs at AM activation.
    Check your application is activation-safe by setting the parameter jbo.ampool.doampooling=false in your development environment.
    See "Set jbo.ampool.doampooling=false to Reproduce Problems Related to AM Passivation / Activation"
    URL: http://blogs.oracle.com/Didier/2006/11/12
    Does the error reproduces there ?
    You will then be able to diagnose the issue further, f.ex. by switching on the BC4J diagnostics, with the java option -Djbo.debugoutput=console:
    in your Project properties , in the Run/Debug panel, select a run configuration and click Edit to edit it.
    Then add the string -Djbo.debugoutput=console to the Java Options field.
    Then run your application and reproduce the error.
    You'll then probably know the VO that has the problem.
    At activation, ADF BC has to reset the bind variables, and it seems there is a problem at that time.
    What kind of bind variables do you use ?
    Positional bind variables or named bind variables ?
    Regards,
    Didier.

  • Runtime error 429, activeX component cant create object while using netbet pro on windows 7 & 8.1 HELP!!!

    runtime error 429, activeX component cant create object while using netbet pro
    does anyone know what I could do to fix this problem??? netbet pro was't available for a while then it's back but has yet to run

    What's netbet pro?
    I'd recommend asking questions about third party applications in the vendor's forum, not a Microsoft forum meant for admin scripting.
    EDIT: Ah, some gambling website...
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • JBO-25005: Object name 1 for type Variable is invalid(help please)

    Hi Guys,
    when i connect my application to the DB locally, everything works fine. however, once i deploy my application to the server by connecting to the same DB, i tried 10 users which i already tested loaclly and work fine,
    i got the following problem:
    all of 10 users are able to access to any pages on the web application, except when one of the users tries can not access one specific page, i got the following error:
    500 Internal Server Error
    JBO-30003: The application pool (ca.bluecross.ab.eca.model.services.ECAServiceLocal) failed to checkout an application module due to the following exceptionracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.InvalidObjNameException, msg=JBO-25005: Object name 1 for type Variable is invalid at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002) at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1998) at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793) at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453) at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:233) at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424) at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419) at oracle.adf.model.bc4j.DCJboDataControl.rebuildApplicationModule(DCJboDataControl.java:1517) at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1381) at oracle.adf.model.BindingContext.beginRequest(BindingContext.java:683) at oracle.adf.model.BindingRequestHandler.invokeBeginRequest(BindingRequestHandler.java:349) at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:166) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:161) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:313) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:199) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)## Detail 0 ##oracle.jbo.InvalidObjNameException: JBO-25005: Object name 1 for type Variable is invalid at oracle.jbo.common.VariableImpl.validateName(VariableImpl.java:234) at oracle.jbo.common.VariableImpl.setVariableKind(VariableImpl.java:301) at oracle.jbo.server.ViewObjectImpl.activateParams(ViewObjectImpl.java:13417) at oracle.jbo.server.ViewObjectImpl.doActivateSettings(ViewObjectImpl.java:13479) at oracle.jbo.server.ViewObjectImpl.doActivateSettings(ViewObjectImpl.java:13328) at oracle.jbo.server.ApplicationModuleImpl.activateVOs(ApplicationModuleImpl.java:7181) at oracle.jbo.server.ApplicationModuleImpl.doActivateState(ApplicationModuleImpl.java:6981) at oracle.jbo.server.ApplicationModuleImpl.doActivateAMState(ApplicationModuleImpl.java:6960) at oracle.jbo.server.Serializer.activate(Serializer.java:274) at oracle.jbo.server.DBSerializer.activateRootAM(DBSerializer.java:330) at oracle.jbo.server.ApplicationModuleImpl.activateState(ApplicationModuleImpl.java:5549) at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:178) at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:7777) at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4074) at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2161) at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1961) at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1998) at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793) at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453) at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:233) at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424) at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419) at oracle.adf.model.bc4j.DCJboDataControl.rebuildApplicationModule(DCJboDataControl.java:1517) at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1381) at oracle.adf.model.BindingContext.beginRequest(BindingContext.java:683) at oracle.adf.model.BindingRequestHandler.invokeBeginRequest(BindingRequestHandler.java:349) at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:166) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:161) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:313) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:199) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
    please help, i am stuck for days.
    Thank you

    "Let me understand more about this.
    Does this happen always only with one user or username?
    Does this happen only when he/she accesses a particular page?"
    it happens only with one user when she/he accesses a particular page

  • JBO-25005: Object name 1 for type Variable is invalid

    Facing the error as below when clicking on messagedownload field on an OAF search page.
    below are the properties set
    ID : Attachment
    Item Style : messageDownload
    file MiIME type : text/HTML
    Data Type : BLOB
    ViewInstance : SerchReqVO1
    ViewAttribute : FileName
    File ViewAttribute : Filedata
    Please let me know if any other properties are to be changed to prevent this error.
    Error Page
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidObjNameException: JBO-25005: Object name 1 for type Variable is invalid
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)

    Hi,
    If the primary key of the table is checked as Key attribute by clicking Edit VO->Attributes->Primary key field
    this issue can be prevented.

  • Using a string variable to create an object

    Hi, I just have a quick question. It is probably very simple but I can not seem to find an asnwer anywhere.
    I have a class called Receive, from this class I derrive 12 difference other classes.
    I also have a hashtable with a bunch of Object objects. At run time I get one of these objects according to some hastable key. So once I have this object I need to cast it to the right type (one of the above mentioned 12).
    So I know I can find out which type this object is by doing this: object.getClass()
    This returns a Class object. I then need to somehow use this class object to perform the cast. I tried everything and it doesnt seem to work. Then I thought well I can get the string name of the class : object.getClass().getName()
    So I'm wandering if there is a way to use this string to cast my object. Or maybe there is another way.
    I did see the cast() method in the Class api but I can't figure out the point of it since is returns an Object class object and not my class's object.

    I took your advice and re factored the Receive class so it had all the functionality I needed except two methods which would then be overridden in the derived classes. What I had a hard time understanding is once an object of class say SpecialReceive extends Receive it can be referred to as Receive yet still maintain that it's a SpecialReceive.
    What I mean is if I give a Receive object to some method and this method has no idea that this object is actually SpecialReceive and it calls a method say run() which gets overridden by the SpecialReceive. I thought that since this method has no idea what type of Receive this object is it will execute Receive's run(). But it actually does know what type of class it is and it executes the right run() method (the one that SpecialReceive overrides).
    After I realized this there is no more need for casting.
    Thanks everyone for your contributions.

  • How to reference the Instance name using Substitution string or SQL

    All:
    We have an Application that will be replicated in multiple Apex instances and would like to display the current Oracle Apex Instance name ( Similar to the &APP_USER. on the Welcome portion of the page ) .
    Is there a substitution string for this ?
    We plan on using a Show/Hide region on the splash page titled [About], that when clicked displays an HTML region with the subsitution strings.
    If no substitution strings, can someone help with an SQL that returns the Instance name ?
    Thanks for all the help.
    Aubrey Fernandes

    Aubrey Fernandes wrote:
    I currently have 3 URLs to get to my Development, QA and Production servers & will have many more production servers with different Application Ids.
    Development = http://canqa101:7777/pls/ngcrmd01/apex
    QA = http://canqa101:7777/pls/ngcrmq01/f?p=100:1
    Production = http://cancs105:7777/pls/ngcrmp01/f?p=100:1
    What I need are the portions before the final forward slash ( canqa101:7777/pls/ngcrmd01 ) which I assumed is the Oracle Apex instance.That information is determined by the web server configuration (e.g. the DADs when using OHS) rather than through APEX itself. There are no built-in substitution strings for this. Create an application item and an On New Instance (new session) computation to set the value using the function<tt>owa_util.get_cgi_env</tt> function to get the CGI environment variables <tt> HTTP_HOST</tt> and <tt>SCRIPT_NAME</tt>. You can then reference the value in the region using substitution string syntax.

  • Using a string variable as a query SQL statement

    I want to construct a custom SQL statement in a string var, then use that var in the cfquery statement.  What is the proper syntax?  Here is my feeble attempt:
      <cffunction ...>
      <cfset var sql_txt="">
            <cfquery name="qSBJs" datasource="cfBAA_odbc">
                "#sql_txt#"
            </cfquery>
        <cfreturn qSBJs>
    I've tried using no " or # or just # or just " but nothing works.
    what about:
            <cfquery name="qSBJs" datasource="cfBAA_odbc" sql="#sql_txt#">
            </cfquery>
    nope.  I wish there was a sql property I could fill *before* the execution of the query.  Any suggestions?

    Hi Adam, and/or anyone who may have a few minutes to check this... I got the following code to work.  It calls the getSBJs function from Flash Builder 4.  I get the correct result set back.  Long table names are replaced with short abreviations.  Note that some local vars are declared but not used in the following example. I will use them in the future versions of this same code.  Since I will in the future, like a donkey, mindlessly use this same method for all my queries, it would be much appreciated if I could get a guru to check this code for:
    -Pure idiocy
    -Mild insanity
    -SQL injection vulnerability
    -Memory leakage
    -Scope dangers
    (ignore emoticons, see the underlying text)
        <cffunction name="AbrvTblNms" output="false" returntype="string" >
            <cfargument name="txt" type="string" required="true" />
            <cfset var qAbrvs="">
            <cfset var output_str="#ARGUMENTS.txt#">
            <cfquery name="qAbrvs" datasource="cfBAA_odbc" result="rsltAbrvs">
                SELECT TBL_NM, ABRV FROM BAA_TBL_ABRV ORDER BY 1
            </cfquery>
        <cfloop query="qAbrvs">
                <cfset output_str = Replace(output_str, '[' & qAbrvs.TBL_NM & ']', qAbrvs.ABRV, "ALL")>
        </cfloop>
            <cfreturn output_str>
        </cffunction>
        <!--- Fetch a list photo subjects whose records contain the given search word(s) --->
        <cffunction name="getSBJs" output="false" access="remote" returntype="any" >
            <cfargument name="srch_val" type="string" required="true" />
            <cfset var qSBJs="">
            <cfset var sql_txt="">
            <cfset var whr=""> 
            <cfset var b=False>
            <cfset var in_txt="">
            <cfset var fm_dt="">
            <cfset var to_dt="">
            <cfset var on_dt="">
            <cfset var pht="">
            <cfset var srch_str="">
            <cfset var srch_trm="">
            <!--- Transfer the srch_val to a local variable for further manipulation --->
            <cfset srch_str = "#ARGUMENTS.srch_val#">
            <!---
                An empty search term argument is handled by the BAA FlashBuilder front end.  We test for it again here,
                and substitute a dummy value, in case this function is called by something other than the intended
                FlashBuilder front end, and that front end doesn't protect us from an empty search term argument.
                Remember that we must still "hand back" a valid query structure to avoid causing a data type error
                in the calling function, so we search for a dummy value that will allow the query to proceed but is
                guaranteed to return an empty result set.  If the srch_val argument is not empty, transfer the value of
                the srch_str local variable to the srch_trm local variable.
            --->
            <cfif Not (Len(srch_str))>
                <cfset srch_str = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX">
            </cfif>
            <cfset srch_trm = "#srch_str#">
            <cfset sql_txt =
                "SELECT DISTINCT
                  [BAA_SBJ].SRC_SYS_NM, [BAA_SBJ].SRC_SYS_GUID, [BAA_SBJ].OBJ_GUID, [BAA_SBJ].SBJ_NM, [BAA_SBJ].SBJ_DOB, [BAA_SBJ].SBJ_ID, [BAA_SBJ].NOTE, [BAA_SBJ].CDT, [BAA_SBJ].CTM, [BAA_SBJ].CBY, [BAA_SBJ].MDT, [BAA_SBJ].MTM, [BAA_SBJ].MBY
                FROM
                  BAA_SBJ [BAA_SBJ]
                  LEFT JOIN BAA_SES [BAA_SES] ON [BAA_SES].PAR_GUID = [BAA_SBJ].OBJ_GUID
                  LEFT JOIN BAA_IMG [BAA_IMG] ON [BAA_IMG].PAR_GUID = [BAA_SES].OBJ_GUID
                WHERE [WHERE_CLAUSE] ORDER BY [BAA_SBJ].SBJ_NM">
            <cfset whr = "([BAA_SBJ].SBJ_NM CONTAINING TRIM( rm_srch_trm1 ) OR " &
                    "[BAA_SBJ].NOTE CONTAINING TRIM(:prm_srch_trm2 ) OR " &
                    "[BAA_SBJ].SBJ_DOB CONTAINING TRIM(:prm_srch_trm3 ) OR " &
                    "[BAA_SES].SES_TYP CONTAINING TRIM(:prm_srch_trm4 ) OR " &
                    "[BAA_SES].NOTE CONTAINING TRIM(:prm_srch_trm5 ) OR " &
                    "[BAA_IMG].NOTE CONTAINING TRIM(:prm_srch_trm6 ))">
            <cfset sql_txt = Replace(sql_txt,"[WHERE_CLAUSE]", "#whr#", "ALL")>
            <cfset sql_txt = AbrvTblNms(sql_txt)>
        <!--- Through experimentation, I learned that each occurance of a param must be uniquely named.
                  It would be very handy, if the param value was applied to *all* occurances of the param.
                        That way, I could get away with using one .addParam line instead of 6 --->
            <cfscript>
            queryService = new query();
            queryService.setDatasource("cfBAA_odbc");
            queryService.setName("qSBJs");
            queryService.setAttributes(sql="#sql_txt#");
            queryService.addParam(name="prm_srch_trm1", value="#srch_trm#", cfsqltype="VARCHAR");
            queryService.addParam(name="prm_srch_trm2", value="#srch_trm#", cfsqltype="VARCHAR");
            queryService.addParam(name="prm_srch_trm3", value="#srch_trm#", cfsqltype="VARCHAR");
            queryService.addParam(name="prm_srch_trm4", value="#srch_trm#", cfsqltype="VARCHAR");
            queryService.addParam(name="prm_srch_trm5", value="#srch_trm#", cfsqltype="VARCHAR");
            queryService.addParam(name="prm_srch_trm6", value="#srch_trm#", cfsqltype="VARCHAR");
            result = queryService.execute();
            qSBJs = result.getResult();
            </cfscript>       
            <!--- <cfquery name="qSBJs" datasource="cfBAA_odbc">
            </cffunction>
            </cfquery> --->
            <cfreturn qSBJs>
        </cffunction>
    THANKS TO ADAM AND DAN FOR HELPIMG ME GET THIS FAR!  Now, don't let me embarass you by doing something dum and giving you "credit", if you see me doing something dum above.  Thanks!

  • Setting SharePoint 2010 Form Fields Using Query String Variables

    Hi All,
    I have a requirement to populate sharepoint form field value with query string while uploading document to document library.
    While uploading the document to document library, I want to populate claim number available from query string in a pop up page i.e in my case EditForm.aspx, Located at
    http://servername:port/sitename/documentlibraryname/forms/EditForm.aspx.
    Additional Information:
    Created document library and added custom columns like claim number etc..
    Created a view to filter uploaded documents as per claim number.
    Server Details:
    Windows Server 2008 R2
    SharePoint 2010
    SQL Server 2008 R2
    I have written javascript for the same, but not sure where exactly to add the code in EditForm.aspx page.
    Any help on this would be greatly appreciated.
    Thanking you in advacne.
    Regards
    Seva

    if the NewForm.aspx contain a "New Item Form" or "Edit Item Form" you can populate the form field by doing the following:
    First for the data view create a parameter from query string and give it the claim_number query string name.
    now for the field Claim Number Convert it to normal ASP.NET TextBox example below for this
    Normal Field will be like this
    <SharePoint:formfield runat="server" id="ff5{$Pos}" ControlMode="Edit" FieldName="ClaimNumber" ItemId="{@ID}" __designer:bind="{ddwrt:DataBind('u',concat('ff5',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@ClaimNumber')}" />
    you will change it to
    <asp:TextBox runat="server" id="ff5{$Pos}" __designer:bind="{ddwrt:DataBind('i',concat('ff5',$Pos),'Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@ClaimNumber')}" />
    Now in the asp:TextBox you can add the "Text" Attribute and assign the created data view parameter to it example below
    <asp:TextBox runat="server" id="ff5{$Pos}" Text="{$Claim_Number}" __designer:bind="{ddwrt:DataBind('i',concat('ff5',$Pos),'Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@ClaimNumber')}" />
    Where {$Claim_Number} is your Query String Parameter.
    Now if you send the query string NewForm.aspx?Claim_Number=1232
    you should see the field populated
    This what I do usually to populate the fields
    How I Bought a Brand New $1.2 Million Home Using ONLY Affiliate Commissions
    I'm having the same problem.... allmost
    I have a querystring I wan't to parse into a form. But on editform, not newform. then the field gets populated, but on save, nothing happens.... It's just blank.... any ideas.?
    /Ulrich

  • Creating Object views using XSU PL/SQL.Please SEE.

    Hi,
    I am presently using XSU PL/SQL utility with Oracle 9i and using the
    DBMS_XMLQuery.newContext(<My Select clause goes here>,and the
    DBMS_XMLQuery.getXML()which generates an XML document.
    My query is:
    I have 2 tables (One master and the other detail table.).
    Table : DI_Master
    di_num
    00001
    Table: DI_Details
    di_num di_act
    00001 ABCD
    00001 ANCF
    00001 IOPP
    Now the XML I'd like is :
    <di_num>00001</di_num>
    <di_act>
    <val>ABCD</val>
    <val>ANCF</val>
    <val>IOPP</val>
    </di_act>
    Do I need to create object tables for this,insert data into object tables
    and then read this table? It will become an extremely tedious process
    I guess an OBJECT view can do what I want.Can anyone please tell me how
    to write an object view for the 2 tables please and the get the output as
    desired.?

    Supposing you have further
    nesting of the tables.Then how will you go about doing that.You can have multiple levels of CURSOR expressions (see an example below, not a real-life example, but illustrates the point).
    SQL> set long 4000
    SQL> select dbms_xmlquery.getXML('select deptno,' ||
      2  'cursor(select empno, cursor(select losal, hisal from salgrade) salgrades '||
      3   'from emp e where e.deptno = d.deptno and rownum < 3) EMPLOYEES ' ||
      4  'from dept d where d.deptno = 10')
      5  FROM DUAL;
    DBMS_XMLQUERY.GETXML('SELECTDEPTNO,'||'CURSOR(SELECTEMPNO,CURSOR(SELECTLOSAL,HIS
    <?xml version = '1.0'?>
    <ROWSET>
       <ROW num="1">
          <DEPTNO>10</DEPTNO>
          <EMPLOYEES>
             <EMPLOYEES_ROW num="1">
                <EMPNO>7782</EMPNO>
                <SALGRADES>
                   <SALGRADES_ROW num="1">
                      <LOSAL>700</LOSAL>
                      <HISAL>1200</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="2">
                      <LOSAL>1201</LOSAL>
                      <HISAL>1400</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="3">
                      <LOSAL>1401</LOSAL>
                      <HISAL>2000</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="4">
                      <LOSAL>2001</LOSAL>
                      <HISAL>3000</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="5">
                      <LOSAL>3001</LOSAL>
                      <HISAL>9999</HISAL>
                   </SALGRADES_ROW>
                </SALGRADES>
             </EMPLOYEES_ROW>
             <EMPLOYEES_ROW num="2">
                <EMPNO>7839</EMPNO>
                <SALGRADES>
                   <SALGRADES_ROW num="1">
                      <LOSAL>700</LOSAL>
                      <HISAL>1200</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="2">
                      <LOSAL>1201</LOSAL>
                      <HISAL>1400</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="3">
                      <LOSAL>1401</LOSAL>
                      <HISAL>2000</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="4">
                      <LOSAL>2001</LOSAL>
                      <HISAL>3000</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="5">
                      <LOSAL>3001</LOSAL>
                      <HISAL>9999</HISAL>
                   </SALGRADES_ROW>
                </SALGRADES>
             </EMPLOYEES_ROW>
          </EMPLOYEES>
       </ROW>
    </ROWSET>
    1 row selected.
    SQL>
    Also,isnt it a better option to create a VIEW of the
    Select clause and pass a view to the select clause? At the end of the day, you could use whatever you feel comfortable with, provided that it produces your expected output and looks clean. We are just giving you the ideas, how you implement it actually in your situation, depends upon a lot of factors, that only you know about.

  • Create object given by a string

    Hi,
    I have a small problem again. Does anybody know how to instantiate an object only knowing the class name? This class name is given at runtime by a String. Does there exist a possibility without reflection?
    Greetings.

    Class.forName()I think this is reflection... I do not want
    reflection :-)Then you can't do what you want for the general case. You'll have to use a series of if statements, or a Map to select from a hardcoded list of classes.
    Also, note that, to do it this way, the class must have a public no-arg constructor. You can invoke other ctors using java.lang.reflect.Constructor, but that's reflection too.

  • Using variable names for object names

    Is there any way you can use a String variable to name an object? I.e., something like:
    String name = "objectName";
    \\ create an Image object named objectName
    Image (name.valueOf()) = new Image();
    This code obviously does not work, but I'm working on a map applet which uses a map composed of thousands of tiles, and then shows only a portion of the map by drawing the appropriate tiles into the window using the x/y coordinates and a nested for loop to determine which tiles to draw. However, unless I want to manually declare and then call each of these Image objects, I need to have a way to have the actual name of each image object be a reference to a variable, which I will then initalize according to the name of the tile I'm using. Does that make sense at all? Anyway, I was just wondering if anyone knows of any way to do this. Thanks.
    -Ari

    Typically this is done using a Collection, for example:
    Image[] img = new Image[100];
    for (int i=0; i<img.length;i++)
      img[i] = new Image();... Sort of thing.

  • Can I Execute a function whose name is stored in a string variable?

    Can I execute a function whose name is stored in a string variable?
    Like
    Depending on the condition I will stroed the name of the function in a string variable. Then using that string variable i want to execute the function.
    String str=��
    iVal an int can take ne value
    Switch(iVal)
    Case 1:
    str=�test1()�;
    Case 2:
    str=�test2()�;
    I want whatever function name is in str to be executed.
    ----------------------------------------------------------------------------------

    For just executing a method or two, reflection might be easier than beanshell (or it might not). For executing entire scripts, beanshell will be preferable over reflection.
    (I assume beanshell uses reflection under the hood, but I've never bothered to peek.)

  • No mapping at the fault address error while accessing the string variable

    Hi
    we have a application which runs fine on AIX and HP but is throwing error on SOLARIS.
    the application runs well (and use of string variables are also working fine ) till it hits Zone.cpp file
    where the string variable is not getting initialized and throws no mapping at the fault address
    the code snippet is as follows
    #include <string>
    #include <vector>
    const string ZONE_ATTR_TYPE_ZN("ZN");
    const string ZONE_ATTR_TYPE_FC("FC");
    const string ZONE_ATTR_TYPE_ST("ST");
    void Zone::AddAttributeValueAndCountryCode(const string &attributeValue,
                                                      Int attribSeq,
                                                      const string &countryCode,
                                                      ZoneSearchLocMap& zoneSearchLocMap)
         string key = "";
         if ((_attributeType == ZONE_ATTR_TYPE_FC) ||
              (_attributeType == ZONE_ATTR_TYPE_CT))
              key = _attributeType+DELIM+attributeValue;
    we are running it on
    CC: Sun C++ 5.9 SunOS_sparc Patch 124863-04 2008/04/16
    compiled with these option
    -g0 -xspace -KPIC -D_XPG5 -m32 -xarch=sparcvis -mt -DNCURSES -DEXC_HANDLING -DRW_NO_BOOL
    and the created the execuatble with these option
    -i -z rescan -g0 -xspace -mt -D_XPG5 -m32 -xarch=sparcvis -mt -DNCURSES -DEXC_HANDLING -DRW_NO_BOOL -lpthread -lsocket -lnsl -ldl -lposix4 -lCrun -lCstd -lc -lm -lnsl -lsocket
    the dbx output
    t@1 (l@1) program terminated by signal SEGV (no mapping at the fault address)
    where -h
    Current function is Zone::AddAttributeValueAndCountryCode
    56 if ((_attributeType == ZONE_ATTR_TYPE_FC) ||
    (dbx) where -h
    current thread: t@1
    =>[1] Zone::AddAttributeValueAndCountryCode(this = 0x194c088, attributeValue = CLASS, attribSeq = 1, countryCode = CLASS, zoneSearchLocMap = CLASS), line 56 in "Zone.cpp"
    [2] ZoneLoader::Load(trans = CLASS, zoneList = CLASS, prZoneList = CLASS, zoneSearchLocMap = STRUCT, planningCompany = 0x1890f20), line 90 in "ZoneLoader.cpp"
    [3] ZoneManager::ZoneManager(this = 0x1933e28, shipperId = 1000, consDBConnection = CLASS), line 24 in "ZoneManager.cpp"

    I see you are compiling with -KPIC. Is the code going into a shared library?
    Run "ldd" on all the C++ shared libraries you create, and on the main program. You should see a dependency on /usr/lib/libCrun.so.1 and /usr/lib/libCstd.so.1, and no dependency on any other libCrun or libCstd.
    Do you have a particular reason for using -D_XPG5? Changing the Unix version presented by the system headers in /usr/include can sometimes create incompatibilities with the C++ headers and runtime libraries that are intended for the default Unix version.
    Are all of the object files created with the same options, especially the -mt option?
    If none of the above considerations raise any red flags, you might have run into a bug in the compiler or the C++ runtime libraries, or you might have a bug in your code that by accident does not show up in other environments.
    There is no way to evaluate whether you have a compiler or runtime library bug without a test case that demonstrates the problem.
    You might have heap or other data corruption in your program due to invalid pointer use, use of an uninitialized variable, reading or writing outside the bounds of an object, double deletion of an object, use of an object after it has been deleted. You might also have an MT programming error where a critical region is not properly guarded, or where a shared variable is not declared volatile.
    By accident, data can be read or written incorrectly, or a data-race condition can exist, but without causing program failure. A program containing these errors can appear to run successfully on one platform and fail on another, or on the same platform under other conditions.
    Running the program under dbx with Run-Time Checking enabled will show many of these errors.
    The Thread Analyzer can find data race conditions.
    If you think you have found a problem with the compiler or libraries, please file a bug report at
    [http://bugs.sun.com]
    with a test case that can be compiled and run to show the problem.

Maybe you are looking for

  • Remove Header text from a sales order, created with reference to quotation

    Hi all, I have a sales order(in VA01) which is created with reference to quotation (in VA21). If header text (Notes for logistics, Note for responsible person, Header text Doc & Declaration) in texts tab is maintained in the quotation they are gettin

  • List price for Products

    Hi All, is anyone aware of the List price table which is maintained for products? Regards Sidd

  • ORA-02063: preceding line error while using dblink

    CREATE OR REPLACE PROCEDURE TEST AS BEGIN DECLARE v_circle VARCHAR(10); CURSOR c1 IS SELECT file_number,SUBSTR(file_name,INSTR(file_name,'.',1,2)+1,LENGTH(file_name)) AS ftm_id FROM TABLE1 WHERE trim(a.start_TIME) = trim(SYSDATE-1); BEGIN FOR r1 IN c

  • How to pull last record

    hi how to pull last record of a db table. i want to replace this. Pull out last record of the period   SELECT mblnr mjahr cpudt cputm    INTO (gw_act_mkpf-mblnr,gw_act_mkpf-mjahr,          gw_act_mkpf-cpudt,gw_act_mkpf-cputm)    FROM mkpf WHERE budat

  • Looking for a tiny MTA

    Hi guys. I'am looking for a tiny MTA only to forward my user mails to my real mailbox. Perhaps there is a smarter solution than using a MTA daemon. A script using msmtp/ssmtp or so... Thanks in advance Andreas Last edited by echasslau (2010-08-30 21: