Howto create an explorer-like rectangle selection??

Hi,
I created a more advanced Custom FileChooser, because I didn't like the standard JFileChooser. It works pretty good, but there's one thing I'd like it to have, but I have absolutely no clue on how to program this...
My FileChooser consists of 3 JLists. In one List, there are the files of one folder displayed. Now I would like to implement the ability to drag a rectangle-selection to select multiple files in the JList, just as we know it from the Windows Explorer.
Can you please help me creating that, I don't know how this can be realized, as I've never ever used the paint() and draw-Functions in Java. Also, I can't imagine how to let the rectangle realize, on what files it is drawn, to mark them as selected...
Thank you for help,
Ciao, AntiBit

Well, let's see... I would probably start by setting up a mouse listener as illustrated in the tutorial example referred to above. Use the mousePressed() method to get the first corner of your rectangle and store the x and y values in class variables. Then use the mouseDragged() method to get the next corner x and y values and store these.
At this point, I would have the mouseDragged() method also call repaint() on your glass pane component - the tutorial example provides an overridden paint method for the glass pane component, and you could do the same thing to draw your rectangle. This way, anytime you drag the mouse over it, the glass pane can redraw the rectangle in its new size/position. Might look something like:
public void paint(Graphics g)
   if (x1 >= 0 && y1 >= 0 && x2 >= 0 && y2 >=0)
      g.setColor(Color.black);
      g.drawRect(x1, y1, x2, y2);
}Finally, when mouseReleased() is called, it could reset the variables to -1, which would indicate to your overridden paint() method that no rectangle should be drawn. Hope this helps somewhat - I'm not sure of any specific tutorials that might help - maybe the one on applets?
Good luck

Similar Messages

  • How to create a "Explorer" like in java

    i'm just wonderin if there's a way on how to create "Windows Explorer" like in Java wherein you can view all your directories with yellow folder icon and also you can view all your files and drives....
    And when you double click the yellow folder icon it will then expand and will show all the subfolders and files ...
    How????
    Thanks!

    Yes, there is a way. Look up JTree in the API.-can you post some code.... i cant figure out on how to use JTree...
    i'm still confused on where will i get the entire directories of my drives...
    thanks

  • Problem rotating rectangle (selecting corners) after creating with rectangle tool in illustrator

    I'm using the latest CC version of Illustrator. When I draw a rectangle using the rectangle tool, I no longer seem to be able to select the corners to resize the rectangle nor does the cursor turn to a rotate icon when I put the mouse just outside the corner. I know that Ai CC treats rectangles differently now, with the live rectangles and the rounded corner options, and the transform box opening automatically. What I'm wondering, and hoping isn't the case, is whether this is this at the expense of being able to go right in and resize using the just the mouse? I know that there is the  "Object > Shape > Expand" option, but having to do that for every time I draw a rectangle is time-consuming and adds and extra step that was unnecessary before. I saw a tutorial on Lynda where the instructor drew a live rectangle in CC AND was still able to resize it by grabbing the corner "handle". Anyone know if this is just a setting I need to turn on or something similarly easy, or is it a case of Adobe inadvertently making the workflow longer when trying to make it easier? And yes, I have "show bounding box" selected under VIEW.

    MOD indi-go girl,
    I am afraid you have come across the Live Rectangle bug which is limited to the MAC versions starting with 10.7 and 10.8, but not 10.9 (Mavericks) or 10.10 (Yosemite). Hopefully, the bug will be fixed soon.
    So a switch to Mavericks or Yosemite with a reinstallation might be the way to solve it here and now.
    To get round it in each case, it is possible to Expand the Live Rectangles to get normal old fashioned rectangles, or to Pathfinder>Unite, or to use the Scale Tool or the Free Transform Tool.
    A more permanent way round that is to create normal old fashioned rectangles, after running the free script created by Pawel, see this thread with download link:
    https://forums.adobe.com/thread/1587587

  • Need Help, how to create more than one rectangle from one button in one stage of canvas

    Dear Guys,
    I has problem to create more than one rectangle canvas from one button. here my role to create :
    1. I create input size with textfield
    2. I click button called "submit query"
    3. My web will create a rectangle with specific size.
    My problem come when I click again the button, my old rectangle has been remove than my new rectangle has created.
    My question is : how I can create more than one without delete/remove the old I was created?
    Here my Code :
    <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="stylesheet" type="text/css" media="all" href="css/style.css"><script src="kinetic-v4.7.2.min.js"></script></head> <body><label>Length</label><input name="panjang" id="panjang" type="text" size="5" maxlength="5"><br> <label>Width</label><input name="lebar" id="lebar" type="text" size="5" maxlength="5"><br>  <label>Height</label><input name="tinggi" id="tinggi" type="text" size="5" maxlength="5"><br> <label>Packing Name</label><input name="nam_pac" id="nam_pac" type="text" size="5" maxlength="5"><br> <input name="submit" type="submit"> <script defer>              var stage = new Kinetic.Stage({                container: 'container',                width: 943.5,                height: 254.10              });              var layer = new Kinetic.Layer();              var rectX = stage.getWidth() / 2 - 50;              var rectY = stage.getHeight() / 2 - 50;                            var group = new Kinetic.Group({                draggable: true              });                                         var box = new Kinetic.Rect({                x: rectX,                y: rectY,                width: <?php echo ($_POST['panjang']/10)/1.3; ?>,                height: <?php echo $_POST['lebar']/10; ?>,                //fill: '#00D2FF',                stroke: 'blue',                strokeWidth: 2                //draggable: true              });               var simpleText = new Kinetic.Text({                x: Math.round(box.getWidth() / 2),                y: Math.round(box.getHeight() / 2),                text: '<?php echo $_POST['tinggi'].'/'.$_POST['nam_pac']; ?>',                fontSize: 30,                fontFamily: 'Calibri',                fill: 'blue',              });                                          // add cursor styling              box.on('mouseover', function() {                document.body.style.cursor = 'pointer';              });              box.on('mouseout', function() {                document.body.style.cursor = 'default';              });                            group.add(box);              group.add(simpleText);              layer.add(group);              stage.add(layer);            </script></body> 
    this is my printscreen may help you to help me :
    thanks before to help me
    Regards,
    Prabowo.

    It's work Ken, but if I modify your code into my code.
    error again. they say like before (...is undefined)
    May You want to check my code
    <?php
    include('pinambung.php');
    ?>
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>GI Loading Plan Maker</title>
    <meta name="viewport" content="width=device-width" />
    <link rel="stylesheet" type="text/css" media="all" href="css/style_2.css">
    <script src="js/kinetic-v4.7.2.min.js"></script>
    <script src="js/CalendarPopup.js"></script>
    <script src="js/jquery-1.10.2.js"></script>
    </head>
    <body>
      <header class="w" id="header"> <!--Header Area -->
          <img src="images/headers.jpg" width="100%" height="100%" />
      </header><!--End of Header Area -->
      <nav class="w" id="nav"><!--nav Area -->
          <?php include('top.php'); ?>
      </nav><!--End of nav Area -->
      <section class="w" id="main"><!--section Area -->
          <section id="content">
          <article>
            <h2>Customer Info</h2>
            <form id="myForm" action="insert.php" method="post">
            <label>Customer Name :</label><input name="cs_name" id="cs_name" type="text" size="25" maxlength="50">
            <br>
            <label>Date of Shipment :</label><input name="shipment_date" id="shipment_date" type="text" size="10" maxlength="12" > use format : YYYY-MM-DD
            <br />
            <label>Container Name :</label><input name="con_num" id="con_num" type="text" size="10" maxlength="12">
            <label>Revision :</label><input name="revision" id="revision" type="text" size="5" maxlength="5"><br />
            <label>Prepared by :</label><input name="prepared_by" id="prepared_by" type="text" size="25" maxlength="50">
            <button id="saveinfo">Save As DB</button>
            <button id="saveall">Save As Image</button>
            <button id="print" onclick="window.print();return false">Print</button>
            </form>
            <span id="result"></span>
            <script type="text/javascript" src="js/insert.js"></script>
          </article>
              <br /><br />
          <article>
              <h2>Packing Info</h2>
            <label>Container Type :</label>
            40' HC<input name="con_type" type="radio" id="con_type" value="40hc">
            40'<input name="con_type" type="radio" id="con_type" value="40">
            20<input name="con_type" type="radio" id="con_type" value="20"><br />
            <input name="loadstan" type="button" value="Create Container" id="isSelect">
            <button id="removecon">Remove Container</button>
            <br />
            <label>Length</label><input name="panjang" id="panjang" type="text" size="5" maxlength="5">
            <label>Width</label><input name="lebar" id="lebar" type="text" size="5" maxlength="5">
            <label>Height</label><input name="tinggi" id="tinggi" type="text" size="5" maxlength="5">
            <label>Packing Name</label><input name="nam_pac" id="nam_pac" type="text" size="20" maxlength="55">
            <input name="loadstan" id="loadstan" type="button" value="Load Standard Packing" onclick="window.open('spk.php', 'winpopup', 'toolbar=no,statusbar=no,menubar=no,resizable=yes,scrollbars=yes,width=300,height=400');">
            <input name="submit" type="submit" value="Create Box">
            <button id="remove">Remove Box</button><br />
          </article>
        </section>
        <aside id="sidebar">
          <label for="layer-to-delate">Select a layer to delete or rotate</label><br />
          <select id="layer-to-delete" size="14"></select><br />
          <input id="delete-layer-button" type="button" value="Delete layer">
          <input id="rotate-layer-button" type="button" value="Rotate box">
        </aside>
        <section id="content2">
          <div id="container">
          </div>
          <script defer>
          function radians (degrees) {return degrees * (Math.PI/180)}
          function degrees (radians) {return radians * (180/Math.PI)}
          function angle (cx, cy, px, py) {var x = cx - px; var y = cy - py; return Math.atan2 (-y, -x)}
          function distance (p1x, p1y, p2x, p2y) {return Math.sqrt (Math.pow ((p2x - p1x), 2) + Math.pow ((p2y - p1y), 2))}
            var stage = new Kinetic.Stage({
                container: 'container',
                width: 943.5,
                height: 254.10
            var layers = new Array();
           function addCont(){
               layer2 = new Kinetic.Layer();
                switch ($('input:radio[name=con_type]:checked').val()){
                  case '40hc':
                     var box_con = new Kinetic.Rect({
                          x: 10,
                          y: 10,
                          width: 1190/1.3,
                          height: 2300/10,
                          stroke: 'black',
                          strokeWidth: 2
                      var TextCon = new Kinetic.Text({
                          x: 10,
                          y: 240,
                          text: 'Container Size 40 HC (11900mm X 2300mm X 2550mm)',
                          fontSize: 12,
                          fontFamily: 'Calibri',
                          fill: 'green',
                      layer2.add(box_con);
                      layer2.add(TextCon);
                      stage.add(layer2);
                      break;
                     case '40':
                     var box_con = new Kinetic.Rect({
                          x: 10,
                          y: 10,
                          width: 1190/1.3,
                          height: 2300/10,
                          stroke: 'black',
                          strokeWidth: 2
                      var TextCon = new Kinetic.Text({
                          x: 10,
                          y: 240,
                          text: 'Container Size 40 (11900mm X 2300mm X 2250mm)',
                          fontSize: 12,
                          fontFamily: 'Calibri',
                          fill: 'green',
                      layer2.add(box_con);
                      layer2.add(TextCon);
                      stage.add(layer2);
                      break;
                     case '20':
                     var box_con = new Kinetic.Rect({
                          x: 10,
                          y: 10,
                          width: 580/1.3,
                          height: 2300/10,
                          stroke: 'black',
                          strokeWidth: 2
                      var TextCon = new Kinetic.Text({
                          x: 10,
                          y: 240,
                          text: 'Container Size 20 (5800mm X 2300mm X 2250 mm)',
                          fontSize: 12,
                          fontFamily: 'Calibri',
                          fill: 'green',
                      layer2.add(box_con);
                      layer2.add(TextCon);
                      stage.add(layer2);
                      break;
            function addRect() {
                layer = new Kinetic.Layer();
                var box = new Kinetic.Rect({
                    x: 10,
                    y: 10,
                    width: +(($("#panjang").val()/10)/1.3),
                    height: +($("#lebar").val()/10),
                    stroke: 'blue',
                    strokeWidth: 2
                var group = new Kinetic.Group({
                            draggable: true,
                            snap : true
                var boxLabel = $("#nam_pac").val() + "/H : " + $("#tinggi").val();            
                if (($("#panjang").val() && $("#lebar").val()) != 0) {         
                var simpleText = new Kinetic.Text({
                    x: 10,
                    y: 10,
                    text: boxLabel,
                    fontSize: 12,
                    fontFamily: 'Calibri',
                    fill: 'red',
                } else {
                    var simpleText = new Kinetic.Text({
                    x: 10,
                    y: 10,
                    text: '',
                    fontSize: 12,
                    fontFamily: 'Calibri',
                    fill: 'red',
                group.add(box);
                group.add(simpleText);
                layer.add(group);
                stage.add(layer);
                layers.push(layer);
                $("#layer-to-delete").append("<option>Layer " + boxLabel + "</option>");
            function deleteRect() {
                if($("#layer-to-delete > option").length < 1) return;
                var i = $("#layer-to-delete").prop("selectedIndex");
                layers.splice(i,1)[0].destroy();
                $("#layer-to-delete > option").eq(i).remove();
            function rotateRect() {
                if($("#layer-to-delete > option").length < 1) return;
                var i = $("#layer-to-delete").prop("selectedIndex");
                layers[i].rotateDeg(30);
                layers[i].draw();
            $("#delete-layer-button").click(function(e) {
                  deleteRect();
            $("#rotate-layer-button").click(function(e) {
                rotateRect();
            $("input[type=submit]").click(function(e) {
                addRect();
            $("#isSelect").click(function () {
                  addCont();
            $("#removecon").click(function () {
                  layer2.destroy();
            $(window).keypress(function(e) {
                if(!$(document.activeElement).is("label")) {
                    if((e.keyCode || e.which) == 46) {
                        layer.destroy();
                if((e.keyCode || e.which) == 35) {
                        layer2.destroy();
            document.getElementById('saveall').addEventListener('click', function() {
              stage.toDataURL({
                callback: function(dataUrl) {
                      window.open(dataUrl);
            }, false);
          </script>
        </section>
      </section><!--End of section Area -->
      <footer class="w" id="footer"><!--footer Area -->
        Copyright <a href="login.php" target="_new">©</a> 2013, <a href="http://omhanggar.com" target="_new">created</a><a href="http://intranet.guentner-asia.com" target="_new"> by PT. Güntner Indonesia </a>
      </footer><!--End of footer Area -->
    </body>
    </html>
    thanks again before,
    Prabowo

  • Create internet explorer object from process ID

    Hi,
    I want to create a object for open instance of internet explorer and pass username and password to it.
    By using the below command I am getting the process object but how can we create internet explorer object from it so that I can access document elements.
    gps | ? {$_.mainwindowtitle -match 'Service'} | select name, mainwindowtitle
    Thanks
    Prasanna

    Hi Prasanna,
    If you means create IE object and signin automatically with username and password, the script below is for your reference:
    $username = "....."
    $password = "......"
    $ie = New-Object -com InternetExplorer.Application
    $ie.visible=$true
    $ie.navigate("https://login.live.com/")
    while($ie.ReadyState -ne 4) {start-sleep -m 100}
    $ie.document.getElementById("i0116").value= $username
    $ie.document.getElementById("i0118").value = $password
    $ie.document.getElementById("idSIButton9").click()
    start-sleep -m 100
    gps | ? {$_.mainwindowtitle -match 'Microsoft account'} | select name, mainwindowtitle
    The result like:
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • Create a dynamic form where selected text boxes appears, based on options chosen in a drop-down box

    HELP!!! Can anyone please provide some guidance on how to create a dynamic form where selected text boxes appears, based on options chosen in a drop-down box.
    I have a form which – based on the department that's selected from a drop-down box – will have different form fields/text boxes, etc, made available.
    Is this possible in LiveCycle, if so, can you please provide the script/info - as needed.
    Thanks,

    In the preOpen event of the second dropdown list you put something like (in formCalc):
    if (dropdown1 == 1) then
    $.clearItems()
    $.setItems("Year, 2 Year,  3 Year")
    elseif (dropdown1 == 2) then
    $.clearItems()
    $.setItems("3 Year,  4 Year")
    endif

  • How to create a report  based on selected item from Select list?

    Hi,
    I have created a tables_LOV based on:
    select table_name d, table_name r from user_tab_cols
    where column_name like '%_type%'
    Then I created a page item ListOfTables,  Display as select list and pointing to tables_LOV.
    I run the page, and i can select the table i want from the drop down list.
    How to create a report  based on the selected item? (ex: select * from selected_table)
    many thanks in advance
    Salah

    Hi Salah,
    Allright, have a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report
    I think that simulates what you're trying to accomplish. I've set up the simplest method I could think of.
    The report is based on an apex collection. If you are not familiar with that, you should study the documentation: APEX_COLLECTION
    To recreate my example you should:
    1) create an (interactive) report on your collection
    SELECT *
       FROM APEX_collections
    WHERE collection_name = 'MY_COLLECTION'
    2) create a page_item select list for the tables you want to display (in my case this is called "P38_TABLES" )
    3) create a dynamic action that triggers on change of your select list page_item. The dynamic action must be a PL/SQL procedure perfoming the following code:
    declare
      l_query varchar2(4000);
    begin
      l_query := 'select * from '||:P38_TABLES;
      if apex_collection.collection_exists
            ( p_collection_name => 'MY_COLLECTION' )
      then
        apex_collection.delete_collection
          ( p_collection_name => 'MY_COLLECTION' );
      end if;
      apex_collection.create_collection_from_query
        ( p_collection_name => 'MY_COLLECTION'
        , p_query           => l_query
    end;
    Make sure you add your page_item to the "Page Items to Submit" section.
    4) Add an extra true action that does a refresh of the report region.
    Here are two pictures describing the da:
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA1.png
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA2.png
    Good luck and regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • How to create a DB Adapter with select query having inner query

    Hi All,
    I am trying to create a DB Adapter with select query. The query has some inner queries in it. It is just like this select a, b, c, (select d from e) d, (select e from e) e from tablename.
    The problem here is with the xsd generated for this query. Xsd is not getting generated properly for all the fields it is just getting generated till c element and when it encounters
    the inner query it is stopping the generation of xsd. So for the above query the xsd is something similar to the below
    <xs:complexType name="rewOutput">
    <xs:sequence>
    <xs:element name="a" type="xs:string" nillable="true"/>
    <xs:element name="b" type="xs:string" nillable="true"/>
    <xs:element name="c" type="xs:string" nillable="true"/>
    <xs:element name="select_d" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    as shown above the xsd is just getting generated till the first inner query. What should be done to get the full fledged xsd. Should it be manually built ?? Please help me on this.
    Thanks In Advance.
    Edited by: 959766 on Nov 30, 2012 1:20 AM

    Hi,
    I don't think the parser will be able to understand your query properly... I would try building the xsd manually...
    Cheers,
    Vlad

  • How to create individual view (like MRP,Accounting..)for existing material

    Hi,
    I have a scenario as below:
    Suppose I created a Material using MM01 txn only entering data in 2 views i.e Basic data1 and Basic data2.
    Now my workflow triggers. I have done this using 'Create' event of BUS1001006 Object type.
    Now i need to send workitems to all those who are responsible to create rest views  like MRP,Accounting,Work scheduling etc..Workitem will take them to MM01 txn with Material No. and user will select the view which he has authorization and will enter the relevent data and save.For this i have used  'CreateView' method of BOR BUS1001006 but its not working properly.
    I hope you could understand the scenario.If need more clarity then please revert.
    Can anybody tell the solution please.It will be very helpful to me.
    Regards,
    Madhu

    I am passing the object also..but its not helping.
    I think Parameter 'ViewListLine'  of method 'CreateView' is not passing properly.
    Can you please give any solution where to get this parameter value.
    Regards,
    Madhu
    Edited by: Madhusmita Acharya on Mar 10, 2010 10:06 AM

  • Has anyone created a Visio-like VI app?

    I'm interested in creating a Visio-like app, where I can pick from a predefined set of objects (square, circle, etc.) and place them on a palette (Picture control).  I'd like to be able to use the mouse to select placed objects, either to move them, or to right click on them to look at / modify their properties.
    Has anyone done something like this?  I've created an app like this, but without any mouse interaction on the palette.  The user positions and resizes the object through a cluster control.  It works nicely, but using a mouse would be more natural.  And more user-friendly, especially for those not used to LabView.
    Bonus features that I'd like, but can't imagine that are feasible:  to use resizing boxes (e.g. at the corners of a square, to resize the square), and a ghost outline of the object when dragging it accross the pane or resizing it.
    I've played a bit with incorporating the mouse -- looking up which object is selected, drawing the ghost outline, adding the resizing boxes.  But it seems that I'm trying to make LabView do something that the OS is probably better suited to do....?
    The end goal is to be able to create a Visio-like screen made up of mostly-but-not-completely graphical objects and save its description in a proprietary format.
    I've got LV8, though I'm more familiar with LV7.1.  And I've been a proud user since LV3.0.  If this can be done, I think I can do it. ...   Help?
    Thanks!
    Tom

    "tst" <[email protected]> wrote in message news:[email protected]...
    <a href="mailto:Wiebe@CARYA" target="_blank">Wiebe@CARYA</a> wrote: Draw all the unique ID's as color values in a offscreen buffer (picture control)Use an event to get the mouse down.Lookup the pixel color in the offscreen bufferConvert it to object ID.
    That was my method until someone posted the VI shown in the attachment (I cleaned it up a little, documented it and added an example).
    If you have a series of points for your shape, then this should be a better method.
    That *is* a nice VI.
    But it's not better if you have a lot of objects. The InROI has to be called for each object, so the search time will grow with the number of objects. The offscreen buffer only doesn't have this problem. The InROI method will also be hard to use with lines. And with larger circles you have to use a lot of points, or you'll get incorrect hits or misses.
    One benefit is that you are still able to select objects even if they are totally covered by other objects. Guess a requirement specification is needed to make a choise. Switching from one to the other method will be terrible.
    Also, the picture control is just a string. If you dig into this string, you'll notice that you can make a buffer. In this buffer you can replace one single picture object. So you don't have to redraw all the entire picture. This way you can get a real performance boost. It's convenient to store object info in the same buffer.
    It would seem to me that it would be better to have a buffer of the picture itself (the blue wire) which will depend on the z ordering (i.e. everything "under" the currently selected element will be the base picture and all the other stuff would be redrawn). I haven't done any real examining of the picture control VIs, but I would rather avoid manipulating the string myself if only for the reason that NI might (please?) change the implementation to something more efficient.
    Well, the picture (blue wire) is a string with the length of the string as the first 2 bytes (perhaps 4, I'm not sure). So you can store each object's picture, and replace them one by one whenever you need to. Then, if you need the picture, remove all the sizes, concatenate the string, and put the total size before the string (then cast to picture).
    Or you can remove the size, and store the string, then concatenate, etc. and attach the total size.
    If NI changes the way it works, you only need to remake the "remove size.vi" and "concatenate.vi" (provided that concatenation is possible).
    The principle of the picture control is a virtual machine. The virtual machine itself is not that slow (unless you compare the 3d stuff to serious 3d stuff). It is slow because the subvi's that build the string are slow. Even worse, you need to call them each time anything in the picture changes. It is also slow because each time you draw anything, the pen is set (even if it hasn't changed).
    With the buffer you get a trade off. It will require more memory, but it can be much faster depending on the situation.
    With the standard picture control vi's, you are forced to build slow programs...
    Draw the ghost outline in a separate picture control. Make this picture control transparent, and set it to the same size and position as the "real" drawing. Don't forget to use the events of the top level picture control! This way, you don't have to redraw the entire picture when you move only one object.
    That's an interesting suggestion.
    Tom, if you do create something, it would be nice if you post it. Maybe we can improve it and make it into a general template.
    InROI.vi:
    http://forums.ni.com/attachments/ni/170/194933/1/InROI.vi
    ROI test.vi:
    http://forums.ni.com/attachments/ni/170/194933/2/ROI test.vi

  • Creating report based on user selected Date Range

    Hello.
    I am trying to display an Apex report that selects data for the report based on a user entered date range.
    It's a simple page with two date picker fields (p18_start and p18_end).
    The report region SQL looks like this:
    SELECT *
    FROM prj_items
    WHERE LM_DT BETWEEN :p18_start AND :P18_end
    One table, one field on the table to search and two Apex variables.
    I thought this would be fairly simple, but I am obviously missing something.
    I not even sure what other information is needed to help me figure this out.
    -Jody

    Hi,
    You can set defaults for the datepickers if you need to - this could be done in a computation on the page for each item and conditional on the item being null.
    When I've done something similar to this, I've created two hidden page items - eg, :P19_FIRST_DATE and :P19_LAST_DATE and populated these with the earliest/latest date that the user could reasonably select (perhaps, in your case, the MIN(LM_DT) and MAX(LM_DT) values).
    Then your SQL would be:
    select * from PRJ_ITEMS
    where LM_DT BETWEEN TO_DATE(NVL(:P19_START,:P19_FIRST_DATE), 'DD-MON-YY')
    AND TO_DATE(NVL(:P19_END,:P19_LAST_DATE), 'DD-MON-YY')If you don't want to set default dates, you could do something like:
    SELECT * FROM PRJ_ITEMS
    WHERE (:P19_START IS NULL AND :P19_END IS NULL)
    OR (:P19_START IS NOT NULL AND :P19_END IS NULL AND LM_DT >= TO_DATE(:P19_START,'DD-MON-YY'))
    OR (:P19_START IS NULL AND :P19_END IS NOT NULL AND LM_DT <= TO_DATE(:P19_END,'DD-MON-YY'))
    OR (LM_DT BETWEEN TO_DATE(:P19_START,'DD-MON-YY') AND TO_DATE(:P19_END,'DD-MON-YY'))There are various reasons why your two dates are being cleared when the page is reloaded. Firstly, you should check the branch that returns to the same page - make sure you are not clearing the cache for the page. Then, have a look to see if there is a "reset page" process (usually created for you when you create a form page). Then, check the Source settings for the items. Typically, these would be "Only when current value in session state is null" and a Source Type of "Static Assignment" with the "Source Value or Expression" left empty.
    Andy

  • How to create dotted or dash rectangle in Photoshop?

    Hi All,
    Is there any easy way in Photoshop CS3 or later Extended to create "dotted or Dask" rectangles? I am talking about the border of the rectangle to be "dotted or dash" line rather usual line? If there is any Actionscript (free) that will be fanastic.
    Thanks in advance...

    Photoshop CS6 makes it easy.
    With Photoshop CS5.5 and older, the best way is to make a path in the shape you want, then stroke it with a brush that's been prepared with the proper spacing and direction dynamics to cause the stroke to be dotted or dashed.
    Generally speaking you can find a lot of tutorials for doing it via Google.  What I might do is to search for something along the lines of dashed stroke photoshop, possibly also adding the word tutorial in the mix, then use the Google Images search, find one that looks like what you're trying to accomplish, and click through the Website For This Image link.
    Here's one of the first I ran across with such a search:  http://www.techimo.com/forum/graphic-design-digital-photography/110702-mini-tutorial-photo shop-making-dotted-dashed-lines-complex-path.html
    -Noel

  • How do I create an image like this?

    Completely new to PS. How would I create an image like this with text? https://www.facebook.com/photo.php?fbid=10151570901245020&set=pb.50687255019.-2207520000.1 366989903.&type=3&theater
    A link to a tutorial would be helpful.
    Thanks!

    Hi there,
    Are you referring to the text, the color effect, or both?
    Adding type is very easy - just grab the Type Tool from the tool bar. The article linked above provides some great tips for editing type in Photoshop.
    As is the case with many "how to's" for Photoshop, there are several ways to acheive the colorized effect like the one applied to image you linked to. One method is to use Adjustment Layers, which I have outlined below.
    1. With your image layer active (it will be highlighted in blue in your Layers panel, as shown below), create a selection of the area you'd like to colorize. I'm using the Polygonal Lasso Tool to create a diagonal selection - to do so, I held down the Shift key on my keyboard as a created my diagonal lines. This might take a bit of practice, but you'll get the hang of it quickly.
    2. Then, in your Adjustments panel (if you don't see it, go to Window > Adjustments), click on the Curves adjustment layer, as highlighted below. Now you can play around with the curves to get the effect you'd like. (Here's a quick guide on using the Curve tool)
    3. To select the other areas of your image, command (Mac) / control (PC) click on the adjustment layer thumbnail (highlighted below). Then, go to Select > Inverse.
    4. Now we want to deselect part of our selection. Grab the Quick Selection Tool from the toolbar and set it to Subract from selection. Then, simply drag the selection brush over the area you want to deselect. In my case, I only want to have the upper-left corner of my image selected.
    5. After you have your selection, click on the image layer and add a Curves adjustment layer like before.
    6. Repeat steps 3-5 for the other corner of your image and you should end up with something like this:
    The nice thing about using adjustment layers is that you can always change them - just double click on the Adjustment layer thumbnail (highlighted in step 3).
    Alternatively, you can select areas of your image and fill the selections with flat colors on separate layers. You can then go in a change the Blend Mode and Opacity for each layer.
    Feel free to reply with any questions!
    Kendall

  • Can we create serach help for a selection screen field

    Can we create serach help for a selection screen field with out creating searchhelp object.
    I mean is it possible to create serchelp in the program itself with some specific values i want to give.
    E.g say we can define any internal table and fill it with values and using that into selection screen fields
    Regards
    Mave

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR paymeth.
      PERFORM PAYMENT_HELP.
    FORM PAYMENT_HELP.
      DATA: begin of DESCR_TAB occurs 0,
            DESCR LIKE BKPF-BKTXT,
            END OF DESCR_TAB.
      DATA: gd_repid like sy-repid.
      gd_repid = sy-repid.
      DESCR_TAB-DESCR = 'aaaaa'.
      append DESCR_TAB.
      DESCR_TAB-DESCR = 'bbbbb'.
      append DESCR_TAB.
      DESCR_TAB-DESCR = 'ccccc'.
      append DESCR_TAB.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield    = 'DESCR'
                DYNPPROG    = gd_repid
                DYNPNR      = '1000'
                DYNPROFIELD = 'paymeth'
                VALUE_ORG   = 'S'
                DISPLAY     = ' '
           TABLES
                value_tab   = DESCR_TAB.
    endform.
    Svetlin

  • How to create an object like "G/L Account / Business Par" in JE?

    I want to create an object like "G/L Account / Business Par" in JE. Pressing "Tab" key, it pops up "G/L Account select list"; pressing "Ctrl + Tab" key, it pops up "Business Partner select list". How do I do? Thanks

    看起来这个帖子应该放在ERP论坛里,更容易收到解答

Maybe you are looking for

  • Claim status report - PC00_M40_REMS

    Hi experts Claims status report PC00_m40_rems is showing incorrect balance.  That is,  for example, eligibility is Rs. 50000 Step1: Claim for the month for April is Rs.5000. Claim processed through PC00_M40_REMP. The claim status was successfull. Aft

  • EbTAX define tax rule based on the purchase value

    Hi, I have 2 questions to configure a rule in EBTAX. 1. XXVAT tax only applies if the purchase value is greater than 100 HOL. In Tax Determining Factor Sets I can't find the options to define this condition. Where I can define this condition? 2. In e

  • Database table for output condition records

    Hi   Can anyone let me know " in which database table the condition records of output type will get stored?" . please let me know the table names related  to output. Thanks in advance

  • Multiple line selection for RRI  in WAD

    Is it possible to select multiple lines from 1 query and do a RRI to the receiver query. Eg : Select multiple POs and then go to PO details query which shows PO details of multiple POs in WAD and both the results shown in the same web report? I tried

  • Where is  the location(path) of the videos that the 3GS recorded?

    Where is the location(path) of the videos that the 3GS recorded? Thanks. Kevin