cm:select - want to set query param at run time

Hi,
I've just started using the personalization server and have a question
regarding the content manager tag.
The JSP that runs generates some value that I want to use in the query
parameter. In the following example, I would like to replace the 02 with a
dynamic value:
<cm:select contentHome="com.beasys.commerce.axiom.document.Document"
query="parentId = '02'" sortBy="ibioObjType ASC" id="objList" />
So if the JSP had a String variable myVal, essentially, I want to do this
<cm:select contentHome="com.beasys.commerce.axiom.document.Document"
query="parentId = '<theValueOfMyValInHere>'" sortBy="ibioObjType ASC"
id="objList" />
Any ideas would be gratefully received - thanks in advance,
Peter Villiers

Peter -
Simply use a JSP Scriptlet to generate the query and put it in the tag. For
example:
<% String query = "parentId = '" + myVal + "'"; %>
<cm:select contentHome="com.beasys.commerce.axiom.document.DocumentManager"
query="<%=query%>" sortBy="ibioObjType ASC"
id="objList" />
Just make sure that myVal doesn't contain any single or double quotes, or use
com.beasys.commerce.util.ExpressionHelper.toStringLiteral() to quote the
quotes.
It is also recommended that you use the DocumentManager as the contentHome,
rather than the Document (see the WLPS 2.0.1sp1 releaste notes on
http://e-docs.bea.com).
Hope that helps,
Greg
Peter Villiers wrote:
Hi,
I've just started using the personalization server and have a question
regarding the content manager tag.
The JSP that runs generates some value that I want to use in the query
parameter. In the following example, I would like to replace the 02 with a
dynamic value:
<cm:select contentHome="com.beasys.commerce.axiom.document.Document"
query="parentId = '02'" sortBy="ibioObjType ASC" id="objList" />
So if the JSP had a String variable myVal, essentially, I want to do this
<cm:select contentHome="com.beasys.commerce.axiom.document.Document"
query="parentId = '<theValueOfMyValInHere>'" sortBy="ibioObjType ASC"
id="objList" />
Any ideas would be gratefully received - thanks in advance,
Peter Villiers[greg.smith.vcf]

Similar Messages

  • HT201250 I run time machine on my iMac using an external hard drive.  I just bought a MacBook Pro and want to know if i can run time machine on it using my wireless network on to the iMac external hard drive

    I run time machine on my iMac using an external hard drive.  I just bought a MacBook Pro and want to know if i can run time machine on it using my wireless network on to the iMac external hard drive

    How do I set up Time Machine to a shared drive on another Mac?

  • How can i set print mode at run time in smartforms???

    Hi expert,
    In smartforms how can I  set print mode at run time.
    I have one screen.In this screen one check box is there.If user select that check box then print should be come double side otherwise it is coming single side.
    If it is possible then plz give me answer asap.

    Hi,
    Set These settings
    While calling smartform, paas control_parameters and output_options as mentioned below and set
    user_settings = ' '.
    It will send the smartform output to spool.
    DATA: wa_output_options TYPE ssfcompop,
    wa_ctrl TYPE ssfctrlop.
    wa_output_options-tdimmed = 'X'.
    wa_output_options-tddelete = 'X'.
    wa_output_options-tdimmed = ' '.
    wa_output_options-tddest = 'LOCL'.
    wa_ctrl-no_dialog = 'X'.
    CALL FUNCTION lv_fm_name
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = wa_ctrl
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = wa_output_options
    user_settings = ' '
    x_adrp = x_adrp
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Kumar(Reward if helpful).

  • Can you set an image at run time?  Does it really work?

    I have read that others have been able to set an image at run time, but I cannot seem to get it to work (the image I set does not load).
    What I do is have a page, call it page2, that has two image components on it. In the constructor for page2 I do this:
    // Additional user provided initialization code
    image1.setValue("bike1.JPG");
    image2.setValue("bike2.JPG");
    The jpg files are in the build directory:
    C:\Documents and Settings\Darrin\My Documents\Creator\Projects\ImageTest\build\images
    The odd thing is that for the first image component(image1), I set a default jpg file (nogo.JPG that is in the same directory as the other two), and that does load.
    In fact, when I I check the value of image1 in afterRenderResponse by calling image1.getValue() it still has the default image (nogo.JPG) instead of the one I set it to (bike1.JPG) in the constructor by calling image1.setValue("bike1.JPG");
    So, either the image1.setValue() has no effect, or something is overwriting it.
    What is the trick to getting an image to load at run time like this?
    THANKS!

    Well after several more hours of banging myh ead against the wall, I still cannot get this to work.<br><br>
    I read in the constructor comments that whatever is in the jsp file will override the backing bean's constructor, so that might be part of the problem, but others I thought got this to work using a similar method.<br><br>
    Here is what I tried last which still does not work, but mimics what others have said did work for them:<br><br>
    //See if the default jpg file can even be copied over
    <br> image3.setHeight(image1.getHeight());
    <br> image3.setUrl(image1.getUrl());
    <br> image3.setValue(image1.getValue());
    <br>
    <br> Integer aiw = new Integer("1");
    <br> float aar = 0;
    <br> float ar = 0;
    <br>
    <br> ImageIcon ii = new ImageIcon("C:/Documents and Settings/Darrin/My Documents/Creator/Projects/ImageTest/build/images/bike1.JPG");
    <br> ar = (float)ii.getIconHeight()/(float)ii.getIconWidth();
    <br> aiw = new Integer(ii.getIconHeight());
    <br> aar = ar*aiw.intValue();
    <br> image1.setHeight(""+(int)aar);
    <br> image1.setUrl("images/bike1.JPG");
    <br> image2.setValue("C:/Documents and Settings/Darrin/My Documents/Creator/Projects/ImageTest/build/images\\bike2.JPG");
    <br> image2.setUrl("C:/Documents and Settings/Darrin/My Documents/Creator/Projects/ImageTest/build/images\\bike2.JPG");
    <br><br>Note that when I run this and look at the log that I write out to in afterRenderRepsponse, it shows that image1 (which shows up as the default image I set at design time) and image3 (which does not show up which I set at run time using image1's value) both show the nogo.JPG image from the <b>resource</b> directory while image2 (that I set at run time to be bike2.JPG) is showing up as <b>empty</b>
    <br><br>
    This is really getting frustrating, and I would greatly appreciate a small tutorial from the JSC staff on just how you need to go about doing this. given that this is so common a need, a tutorial is warranted. Heck, just clue me in on how it is done and I will write one!
    <br><br>
    THANKS!

  • Want to remove Characterstics Structure on run time ( Query Designer )

    Dear Friends,
    I have a query where i defined one Characterstics Structure. Its working fine.
    When i run the report this structure is comming by default.
    If i want to remove means drag and drop this structure like other characterstics and key figures its not working.
    How can i achieve this scanrio.
    Regards
    Naeem

    Hi,
    i want to put structre in free charachterstics on run time.
    It is not possible. You can include only navigational attributes in Free Char section of the Query.
    You can have Structures only in Rows and Columns. You can have only two structures per Query.
    Regards,
    Suman

  • Dynamic Query and default run-time values

    I am trying to build a dynamic query within dreamweaver and
    retain access from the bindings panel.
    here is a simple pseudo-query I want to expand on.
    "SELECT object FROM objects_table WHERE widget_number =
    widgets"
    widgets is set up as a variable with a run-time value that
    relates to $_GET['widgets']
    this works fine but now i want to expand on this so the query
    returns all results if $_GET['widgets'] is undefined. I was hoping
    I could set the default value for widgets to equal widget_number so
    I would get....
    "SELECT object FROM objects_table WHERE widget_number =
    widget_number" but the runtime query is actually
    "SELECT object FROM objects_table WHERE widget_number =
    'widget_number' " which obviously doesn't work.
    I can alter the query manually from the code view but then I
    lose access to the bindings panel as dreamweaver doesn't parse the
    query properly.
    Any pointers?
    Thanks in advance
    - Andrew

    Andy Millne wrote:
    > That will work fine server-side yeah but dreamweaver
    cannot parse the code at
    > design time so by altering the code in this way you lose
    access to the bindings
    > panel and all the server behaviours that depend on the
    recordset have
    > exclamation marks alongside.
    This is simply a question of organizing your workflow. As you
    have
    discovered, Dreamweaver no longer recognizes a recordset if
    you make
    changes to the basic structure of the code. The answer is to
    use
    Dreamweaver to construct your page using an unaltered
    recordset. Once
    the design stage is complete, make the changes required by
    inserting
    your conditional statement. Yes, the fieldnames disappear
    from the
    Bindings panel, and you get exclamation marks in the Server
    Behaviors
    panel, but that's not important. If you need to restore them
    for any
    reason, just wrap the changes in /* */ comments. Remove the
    comments
    when you have finished.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Setting FLVPlayback parameters at run time

    Hello,
    Is there a way to change the parameters on the FLVPlayback at
    run time? For example, I create a swf file to play the video
    "my_video", and I set the parameter "autoPlay" to false. I then
    embed the following code into a web page:
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
    width="326" height="266" id="my_video" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="my_video.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#666666" />
    <embed src="my_video.swf" quality="high" bgcolor="#666666"
    width="326" height="266" name="my_video" align="middle"
    allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer">
    </embed>
    </object>
    The video is embedded in the page, and the user can click the
    controls to play the video.
    What I'm wondering is ... can I change the parameters at run
    time by using the above code somehow? For example, can I change the
    autoStart parameter to true, so now the video would start
    automatically when the page is loaded. Or, could I change the
    contentPath parameter so the code would now play a different flv
    file?
    Thanks for any help.
    Bob

    Hi,
    Thanks for the quick response. Your suggestion works almost
    perfectly. I can now change the flv to any flv I want, and it plays
    the video I want. However, even though I am specifying
    autoPlay=false, it still plays automatically when the page loads.
    Here is my actionscript:
    flvPlayback.playPauseButton = myplayPause;
    flvPlayback.seekBar = mySeek;
    flvPlayback.muteButton = myMute;
    flvPlayback.contentPath = newPath;
    flvPlayback.autoPlay = autoStart;
    and here is my html:
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
    width="326" height="266" id="xxx" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="pokflvplayer.swf">
    <param name="FlashVars"
    value="autoStart=false&newPath=holiday_message_2007.flv" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#666666" />
    <embed src="pokflvplayer.swf"
    FlashVars="newPath=holiday_message_2007.flv&autoStart=false"
    quality="high" bgcolor="#666666" width="326" height="266"
    name="medical_imaging" align="middle"
    allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer">
    </embed>
    </object>
    Any idea why it will not recognize the autoStart paramenter?
    By the way, I had to change your myFLV.autoStart - autoS to
    flvPlayback.autoPlay=autoStart. The actual name of the parmameter
    is autoPlay, not autoStart. My guess is that was just a typo on
    your part. Thanks again for your help.
    Bob

  • To set Initial value at run time

    Hi all,
    i am working in forms.There is a poplist with 3 elements.Forms will be open for two different user. 1st user able to see only one element from the list, So I used Delete_list_element. Now I want to set this value as a default value without select that value because there is a only one element. Is it possible if yes please help me.
    Thanx in advance
    Sanjit

    I think, setting property required=Yes will do the job ...
    It is also possible to directly initialize a list item with a value (which should be then content of the actual list).
    :BLOCK.LIST_ITEM := VALUE;
    or you try something like (after your delete_list, to keep it dynamic) :
    :BLOCK.LIST_ITEM := GET_LIST_ELEMENT_VALUE('BLOCK.LIST_ITEM',1);
    Message was edited by:
    user434854

  • Setting bind references at run-time

    Hi,
    I am working on a dynamic form,which will instantiate questions based on some instructions specified in XML when the form loads up, much like John Brinkman's example
    http://blogs.adobe.com/formfeed/2009/03/a_form_to_design_a_form.html
    At design time, it is not know which node in the data dom the field should be bound to, so I would like to be able to simulate a match="dataRef" ref="$.myNode" statement at run-time.
    However, my recollection is that the binding reference can't be changed at run time. Does anyone know if it can be done, and how to do it?
    John

    Hi,
    Thanks for the quick response. Your suggestion works almost
    perfectly. I can now change the flv to any flv I want, and it plays
    the video I want. However, even though I am specifying
    autoPlay=false, it still plays automatically when the page loads.
    Here is my actionscript:
    flvPlayback.playPauseButton = myplayPause;
    flvPlayback.seekBar = mySeek;
    flvPlayback.muteButton = myMute;
    flvPlayback.contentPath = newPath;
    flvPlayback.autoPlay = autoStart;
    and here is my html:
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
    width="326" height="266" id="xxx" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="pokflvplayer.swf">
    <param name="FlashVars"
    value="autoStart=false&newPath=holiday_message_2007.flv" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#666666" />
    <embed src="pokflvplayer.swf"
    FlashVars="newPath=holiday_message_2007.flv&autoStart=false"
    quality="high" bgcolor="#666666" width="326" height="266"
    name="medical_imaging" align="middle"
    allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer">
    </embed>
    </object>
    Any idea why it will not recognize the autoStart paramenter?
    By the way, I had to change your myFLV.autoStart - autoS to
    flvPlayback.autoPlay=autoStart. The actual name of the parmameter
    is autoPlay, not autoStart. My guess is that was just a typo on
    your part. Thanks again for your help.
    Bob

  • Set value Field in run time

    hello guys!!!
    it's called the process where
    on my screen I have two fields
    Field 1: enabled for editing
    Field 2: disabled for editing
    when i fill the value in a field 1 I want to play the same value for the field 2 in run time. that´s possible?What can I study?

    So, you want the user to be allowed to enter a value in field 1, then after tabbing out to the next field, display that same value in a non-editable field underneath?
    You can definitely implement this using Partial Page Rendering (PPR).
    Go to your help section within JDeveloper. Type in "Partial Page Rendering Exercise". A tutorial will pop up showing you how to implement this sort of thing.

  • I want to set up 5 iMacs (running 10.9) to access the same iPhoto library on a MacPro server (running 10.9)?

    Is it possible to set this up?
    How do I set this up?
    Will the computers be able to access the library simultaneously?
    Thanks

    The following is from this Apple document: iCloud: System requirements
    * Note: Although you can use iOS 5 and OS X Lion as noted above, you will not be able to take advantage of some iCloud features, such as Shared Photo Streams, iCloud Tabs, Find My iPhone Lost Mode, Documents in the Cloud for iWork, and Find My Friends location-based alerts.

  • Is it possible to set valid values at run time?

    Hi,
    I'am using a BPM Presentation and I want to know if it is possible to set the values of a combo box depending of the value of other field in the same presentation ando if so how to do it? I tried to do somethin like:
    var = fiedlValidValues()
    I tried to use refreshValidValues but it says that cannot execute the action in a presentation, I don&acute;t know wath else to do
    but it doesn&acute;t works, any idea??
    Thanks in advance
    Marig
    Edited by: user646988 on 05-feb-2009 19:30

    Hi, thanks Anup
    I followed your advise but i didn&acute;t success. I have question, if I'm getting the default values of a field with a method using a query. The type field is String and I'm using it into a combo box so the method I'm using returns a String[], is something like this:
    for each row in SELECT column
    FROM DataBase.SYSBPM.TABLE
    where var1 = var2
    do
    clases[] = row.clase
    end
    return clases
    But if I use a method for the onChange property if the field how to set the default values?
    I tried with
    for each row in SELECT column
    FROM DataBase.SYSBPM.TABLE
    where var1 = field1
    do
    clases[] = row.clase
    end
    clases = claseValidValues()
    But this is not working, do you have any ideas??
    Thanks
    Edited by: user646988 on 15-feb-2009 19:36

  • Crystal 8.5! Set table locations at run time to queries

    Hopefully some people still remember version 8.5...
    I have a number of reports which all work from a single database, this can be either Access or SQL Server, I'm currently testing on Access. I would like to use the same reports but print them for multiple databases, all of which have the same schema. To do this I'm creating UNION queries in one of the databases and I now want to change the location of the tables in the report to use these union queries instead.
    For example, say the report uses table "Customer" in db1 but I have also have db2 and db3 with the same table, I'm enumerating all fields used in the report and creating a union in db1 something like:
    SELECT field1, field2 FROM Customer IN 'db1.mdb'
    UNION SELECT field1, field2 FROM Customer IN 'db2.mdb'
    UNION SELECT field1, field2 FROM Customer IN 'db3.mdb'
    Now I've tested this in Crystal Reports itself, i.e. setting the location to the new tables, and it works OK. I'm having to use an OLEDB connection otherwise the links get removed. When I try to set the location in code I just get no data on the report even though there is data available.
    In code I'm going through all tables (and all tables in all sub reports) and I've tried setting the Location property to the name of the union, I've tried SetTableLocation "<path to db>", "<union name>" and I've tried both using SetLogOnInfo "<path to db>" as well.
    I'm thinking perhaps converting the report to active data and plugging in an ADO recordset could be a solution but I'm not sure how feasible that is from code (i.e. converting the database driver from either pdsoledb.dll or pdbdao.dll to pdsmon.dll and creating a ttx on the fly...).
    Any help much appreciated.

    Hi,
    SetTableLocation should work but you need to make sure you call it for each of the tables in the report or in this case the Union. 
    Just like in the report designer when you set the location you need to point to the table you want to change.  Even though you get the prompt asking to set the same location for all the tables, it's doing the same thing for you. 
    Hope this helps,
    Brian

  • SET PRINTER TRAY AT RUN TIME

    HELO EVERY BODY
    I HAVE TWO REPORTS I WANT TO PRINT FIRST REPORT FROM UPPER TRAY AND SECOND REPORT FROM LOWER TRAY HO CAN I DO THIS?
    SECOND PROBLUM IS I CREATE A REPORT ON LEGAL PAPER WHEN I RUN THIS REPORT IT WILL TAKE DEFAUT PAPER SIZE OF PRINTER WHICH IS LETTER HOW CAN I SET PAPER LEGAL BY WHICH I NOT CHAND PAPER EVERY TIME
    THANKS IN ADVANCE
    KHUDA HAFIZ

    Faiz,
    Pl see my response, and reply in your other thread:
    set printer tray and page size
    Navneet.

  • I want to connect oracle 10g developer run time forms to oractle data base

    Hey,
    Would any body want to tell me, how come i can connect oracle dev 10g from its forms with oracle 10g data bases
    I am waiting
    bye

    Try asking this on the Oracle Forms forum:
    http://forums.oracle.com/forums/category.jspa?categoryID=19
    In any case you need to set-up a sqlnet connection from your client to your server. Use the Network Configuration Utility that comes with the Oracle Forms installation.

Maybe you are looking for

  • How to Convert a HEX value to CHAR value...Unicode Issue...

    Hi, How can I convert HEX value to CHAR value. The Code in <b>non Unicode</b> system is: DATA: t_text LIKE tline OCCURS 0 WITH HEADER LINE. constants:   c_hex_20a5(2) TYPE x            VALUE '20A5'. t_text-tdline = 'seller of the item so listed.  A l

  • Living with the HDMI Logo Freeze

    As many of you using HDMI know, switching to the AppleTV sometimes causes a Logo freeze. For me this has been happening since upgrading to 2.x software. I use an HDMI switcher box (not ONKYO related) and have the ATV set to 1080p. I sometimes use the

  • Ora-03113 with Java Procedure On 10g Enterprise Edition Release 10.1.0.3.1

    Hi All, I am getting Ora-03113 (End-of-Communication) while executing Java Stored procedure. Java Stored Procedure executes Sqlldr on server. Server OS is Linux 86x. Database is -- Oracle with Infrastructure. Oracle Database 10g Enterprise Edition Re

  • Installing LaTeX Packages

    Hello, I'm trying to install LaTeX packages. I downloaded the packages, unpacked them, then moved the resulting folders to this location: Library/TeX/Root/texmf/tex/letex However, TeXshop can't find the sty files to use them. Can anyone tell me where

  • What video files does iPod Touch use?

    Ok I had a episode of gossip girl on my ipod touch and it's an mp4 file so I got a simpsons episode converted it to mp4 and tryed to sync it and it didn't work so what file type does iPod Touch use because I like to watch alot of video on my iPod Tou