Textfield as datepicker
How can i use a Textfield as a date picker in apex 4.0?
Sanjay
Hi,
datepickers in APEX 4.0 don't open a seperate HTML page.
But if you want to use textfields, you can for example use this code in the header of the page :
<script type="text/javascript">
$(function() {
$(".datepicker").datepicker({
dateFormat: 'dd-M-y',
showOn: 'focus',
showAnim: '',
showOtherMonths: true,
selectOtherMonths: true,
</script>All textfield items with class="datepicker" will show a datepicker when clicked.
But I think it do the same as the ApEx datepicker item implementation.
Yann.
Similar Messages
-
UI Datepicker and Spry textfield Validation
Hi, I am having a problem with using the UI Date picker and Spry textfield Validation together. I have created a sample form: 2 input boxe, the test box has the datepicker and spry validation and test2 has the date picker only,one submit button and some php code that echos the boxes values on submit.
My date picker is date formated as 'yy-mm-dd' for four digit year. My spry validation is formated 'yyyy-mm-dd' with validate on submit.
Now when I click on the test input box the datepicker comes up normally and i select a date. I then select the date on test2. Once I click the submit button the test field with spry validation come back saying a value is required and nothing else happens.
I was playing around and trying other things to get it to work and I noticed that when I select the test inputbox and the calander pops up if I enter some numbers into the text box then select a date from the datepicker then enter a date in the test2 inputbox and hit submit it works.
So it appears to me that the validation is not reading anything in the test field when I just select a date. Why is that? When I select a date it shows a date in the inputbox. It makes it hard to use the datepicker on a form.
Any help would be a preciated. Code is below.
Thanks Winrol
<?php echo "Test box 1 value = ". $_POST['test']. "<br/>" ?>
<?php echo "Test box 2 value = ". $_POST['test2'] ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script src="jquery-ui-1.7.2/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet" type="text/css" />
<link href="jquery-ui-1.7.2/css/base/ui.datepicker.css" rel="stylesheet" type="text/css" />
<link href="jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet" type="text/css" />
<link href="jquery-ui-1.7.2/css/base/ui.datepicker.images.css" rel="stylesheet" type="text/css" />
<style type="text/css">
/* BeginOAWidget_Instance_2137022: #datepicker */
#datepicker .ui-widget {
font-family: inherit;
#datepicker .ui-datepicker {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
#datepicker .ui-datepicker-title {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 1.1em;
color: #000;
font-weight: normal;
line-height: 1.8em;
#datepicker .ui-state-default, .ui-widget-content .ui-state-default {
border-color: #e6e6e6;
background-color: #e6e6e6;
color: #555555;
#datepicker .ui-state-default, .ui-state-default a {
color: #555555;
#datepicker .ui-state-highlight, .ui-widget-content .ui-state-highlight {
border-color:#FCEFA1;
background-color:#FCEFA1;
color:#363636;
#datepicker .ui-state-active, .ui-widget-content .ui-state-active {
border-color: #FFFFFF;
background-color: #FFFFFF;
color: #212121;
#datepicker .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus
border-color: #5F5F5F;
background-color: #5F5F5F;
color: #212121;
#datepicker .ui-widget-header
border-color: #5F5F5F;
background-color: #808080;
border-width: 1px;
/* Text attributes for the Days of Week Text */
#datepicker .ui-datepicker table th
font-size: .8em;
color: #000;
font-weight: bold;
/* EndOAWidget_Instance_2137022 */
</style>
<script type="text/xml">
<!--
<oa:widgets>
<oa:widget wid="2137022" binding="#datepicker" />
</oa:widgets>
-->
</script>
<script type="text/javascript">
// BeginOAWidget_Instance_2137022: #datepicker
$(function() {
$('input').filter('.datepicker').datepicker({dateFormat: 'yy-mm-dd'});
// EndOAWidget_Instance_2137022
</script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
background-color: #FFC;
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p>
<label for="test">test</label>
<span id="sprytextfield1">
<input name="test" type="text" class="datepicker" id="test"/>
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></p>
<p>
<label for="test2">test2</label>
<input name="test2" type="text" id="test2" class="datepicker" />
</p>
<p onclick="<?php echo $_POST['test'] ?>">
<input type="submit" name="submit" id="submit" value="Submit" />
</p>
</form>
<script type="text/javascript">
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"yyyy-mm-dd", hint:"yyyy-mm-dd"});
</script>
</body>
</html>This does work
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.datepicker.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.datepicker.images.css" rel="stylesheet">
</head>
<body>
<form action="" method="post">
<span id="sprytextfield1">
<label for="mydate">Date:</label>
<input id="datepicker" name="mydate" type="text">
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span>
<div id="datepicker" class="ui-glass-gradient ui-80TopTo0Bottom-gradient-header"></div>
<input name="mysubmit" type="submit">
</form>
<script src="SpryAssets/SpryValidationTextField.js"></script>
<script src="jquery-ui-1.7.2/js/jquery-1.3.2.min.js"></script>
<script src="jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js"></script>
<script>
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"mm/dd/yyyy", validateOn:["change"], useCharacterMasking:true});
$(function() {
$('#datepicker').datepicker({ showOtherMonths: false });
</script>
</body>
</html>
Gramps -
How to make DatePicker readOnly
Hi
There is a tabular form(up datable query) on one of my pages. One of its items is a Datepicker. In some conditions I need to make this field unchangeable by users.
I was able to do so by the following Java Script Dynamic action:
var elms = document.getElementsByName('f04');
for (i=0; i< elms.length; i++) {
elms.readOnly=true
It works fine and disables the textField of the Datepicker however users still able to change the date by clicking on the popup calendar button. the popup calendar button is not disabled yet.
I would appreciate your help.
RegardsHi!
Try this:
var elms = document.getElementsByName('f04');
for (i=0; i< elms.length; i++) {
elms.readOnly=true;
$.datepicker._disableDatepicker(elms);
or
$.datepicker._disableDatepicker($('#P1_DATEPICKER_ITEM')[0]); -
Spry Textfield date validation
I have a Spry textfield for a user to enter a date. I want to
limit the date entered to 31 days away from the current date. Can
anyone help me out with this or provide directions to an article to
help solve this issue?
PatThis does work
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.datepicker.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.datepicker.images.css" rel="stylesheet">
</head>
<body>
<form action="" method="post">
<span id="sprytextfield1">
<label for="mydate">Date:</label>
<input id="datepicker" name="mydate" type="text">
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span>
<div id="datepicker" class="ui-glass-gradient ui-80TopTo0Bottom-gradient-header"></div>
<input name="mysubmit" type="submit">
</form>
<script src="SpryAssets/SpryValidationTextField.js"></script>
<script src="jquery-ui-1.7.2/js/jquery-1.3.2.min.js"></script>
<script src="jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js"></script>
<script>
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"mm/dd/yyyy", validateOn:["change"], useCharacterMasking:true});
$(function() {
$('#datepicker').datepicker({ showOtherMonths: false });
</script>
</body>
</html>
Gramps -
Problem of defining value to a textfield in MovieClip
hello,dear everyone
there is problem that realy confused me.that is the
textfield(or other display objects) in MovieClip can't be defined
when i jumpto that frame.check these simple code:
mc.stop()
function goNext(evt:Event){
mc.nextFrame()
dosth()
function dosth()
if(mc.currentFrame==2)
mc.mytext.text="hello"
nextBT.addEventListener("click",goNext)
the mc is a simple MC that have 2 frames,and the textfield
object is in the second frame.
and what i try to do is when i clicked the button,the mc
jumpto the second frame.and i define a value to that textfield.but
it's failed when i try to do like that.
as i debug the program.i found that when i define the value
to the textfield,that textfield is a Null Object(should be the
TextField object).not only the textfield not work,but also other
elements such as Button objects.
so,i am thinking that must because the objects are too late
to initialized before they be used.maybe there are some event can
tell me that all elements has been initialized,as i can use them
then.what do you think,my friend?If all of the code you have is in the first frame, then it
has processed long before anything ever moved to the second frame.
What you could try is to have a variables layer that extends
both frames, and assign the value of the textfield text to that
variable. Make the textfield associate with that variable (in the
properties section for it), So when the movieclip moves to the
second frame the text field should automatically acquire the
variable value.
I may not have interpretted your problem correctly, so you
might have to clarify things if I missed the target. -
Is there a simple way to detect a textfield value has been changed on exit?
The filler may enter the textfield then type something and revert it back,
any command that can simply detect a field's value has been changed on it's exit event?Niall,
I was thinking if there is any simple command like xfa.event.prevText in dropdown box that I can use,
anyway, thanks for your help.
Rgds. -
Displaying the path of the file selected by a FileChooser in a TextField
I'm just getting started with Swing. I developed a simple dialog box that has two text fields and two buttons. The objective is to open two files using those two buttons. I used FileChooser to select the files. Now, I want to display the path of the selected files in their corresponding TextFields. I use the following code to do that.
final FileChooser fc1 = new FileChooser();
final FileChooser fc2 = new FileChooser();
final TextField tf1 = new TextField();
final TextField tf2 = new TextField();
private void button1ActionPerformed(ActionEvent evt)
int returnVal1 = fc1.showOpenDialog(labelPhpFile);
if (returnVal1 == JFileChooser.APPROVE_OPTION)
File file1 = fc1.getSelectedFile();
String fileName1 = file1.getName();
String filePath1 = file1.getPath();
tf1.setText(filePath1);
private void button2ActionPerformed(ActionEvent evt)
int returnVal2 = fc2.showOpenDialog(labelPhpFile);
if (returnVal2 == JFileChooser.APPROVE_OPTION)
File file2 = fc2.getSelectedFile();
String fileName2 = file2.getName();
String filePath2 = file2.getPath();
tf2.setText(filePath2);
}The above code works fine only for the first file. Mean the path of the file selected using fc1 is getting displayed in the tf1 TextField. But, the file selected using fc2 is not getting displayed tf2 TextField. Please help me.
Thank you :)h1. The Ubiquitous Newbie Tips
* DON'T SHOUT!!!
* Homework dumps will be flamed mercilessly.
* Have a quick scan through the [Forum FAQ's|http://wikis.sun.com/display/SunForums/Forums.sun.com+FAQ].
h5. Ask a good question
* Don't forget to actually ask a question. No, The subject line doesn't count.
* Ask once
- Don't Crosspost!
- Two people answering one question independantly is a waste of there time.
* Don't even talk to me until you've:
(a) [googled it|http://www.google.com.au/] and
(b) looked it up in [Sun's Java Tutorials|http://java.sun.com/docs/books/tutorial/] and
(c) read the relevant section of the [API Docs|http://java.sun.com/javase/6/docs/api/index-files/index-1.html] and maybe even
(d) referred to the JLS (for "advanced" questions).
* [Good questions|http://www.catb.org/~esr/faqs/smart-questions.html#intro] get better Answers. It's a fact. Trust me on this one.
- Lots of regulars on these forums simply don't read badly written questions. It's just too frustrating.
- FFS spare us the SMS and L33t speak! Pull your pants up, and get a hair cut!
- Often you discover your own mistake whilst forming a "Good question".
- Many of the regulars on these forums will bend over backwards to help with a "Good question",
especially to a nuggetty problem, because they're interested in the answer.
* Improve your chances of getting laid tonight by writing an SSCCE
- For you normal people, That's a: Short Self-Contained Compilable Example.
- Short is sweet: No-one wants to wade through 5000 lines to find your syntax errors!
- Often you discover your own mistake whilst writing an SSCCE.
- Solving your own problem yields a sense of accomplishment ;-)
h5. Formatting Matters
* Post your code between a pair of {code} tags
- That is: {code} ... your code goes here ... {code}
- This makes your code easier to read by preserving whitespace and highlighting java syntax.
- Copy&paste your source code directly from your editor. The forum editor basically sucks.
- The forums tabwidth is 8, as per [the java coding conventions|http://java.sun.com/docs/codeconv/].
- Indents will go jagged if your tabwidth!=8 and you've mixed tabs and spaces.
- Lines longer than 80 characters should be wrapped.
- Proper indentation illustrates program logic.
* Post your error messages between a pair of {code} tags:
- That is: {code} ... errors here ... {code}
- To make it easier for us to find, Mark the erroneous line(s) in your source-code. For example:
System.out.println("Your momma!); // <<<< ERROR 1
- Note that error messages are rendered basically useless if the code has been
modified AT ALL since the error message was produced.
- Here's [How to read a stacktrace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/].
* The forum editor has a "Preview" pane. Use it.
- If you're new around here you'll probably find the "Rich Text" view is easier to use.
- WARNING: Swapping from "Plain Text" view to "Rich Text" scrambles the markup!
- To see how a posted "special effect" is done, click reply then click the quote button.
If you (the newbie) have covered these bases *you deserve, and can therefore expect, GOOD answers!*
h1. The pledge!
We the New To Java regulars do hereby pledge to refrain from flaming anybody, no matter how gumbyish the question, if the OP has demonstrably tried to cover these bases. The rest are fair game. -
ProLoader and TLF TextFields do not work together!
I'm using ProLoader to load a .swf that uses TLF. The master .swf loads the target .swf and all code executes as expected with one minor glitch: the content of the loader is white/blank. Has anyone else seen this!?
~~~~~~~~~~~~~~~~~~~~~~~~
Here is the full bug report that I tried to send Adobe, but they cap reports at 2000 characters and provide no option for uploading a source .zip. (Seriously, Adobe?) If you have time, and follow my instructions you will see how ProLoader won't even load a .swf with TLF on its stage. (Yes, I realize this different from my problem, but I'd like to demonostrate how buggy and inconsistent ProLoader is. The simple solution would be not to use TLF, and mostly likely, I will end up doing that.)
******BUG******
ProLoader loads .swf with TLF, but ProLoader is blank.
Steps to reproduce bug:
1. Download sample files (http://helpx.adobe.com/content/dam/kb/en/141/tn_14190/attachments/Load_External_SWF.zip) from the Tech Note, Load external SWF into another SWF (http://helpx.adobe.com/flash/kb/load-external-swf-swf.html).
2. Open ExternalSWF.fla and assign it a document class.
Here is mine:
package {
import flash.display.MovieClip;
import flash.events.Event;
public class ExternalSWF extends MovieClip {
public static var DATA_LOAD_COMPLETE:String = "ExternalSWF_DataLoadComplete";
private var data_:String;
public function ExternalSWF() {}
//This function will be called from the .swf that loaded me.
public function loadData(data:String):void
data_ = data;
dispatchEvent(new Event(DATA_LOAD_COMPLETE));
public function get data():String { return data_; }
3. On ExternalSWF.fla's stage, change a classic TextFields into a TLF TextField.
4. In Loader_Movie.fla, change all flash.display.Loader instances to fl.display.ProLoader in order to load TLF TextFields. Also, add an event listener to myLoader for Event.COMPLETE. Here are my Loader_Movie.fla's Actions:
import flash.events.Event;
import fl.display.ProLoader;
var myLoader:ProLoader = new ProLoader(); // create a new instance of the ProLoader class
var url:URLRequest = new URLRequest("ExternalSWF.swf"); // in this case both SWFs are in the same folder
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, myLoaderIsLoaded);
myLoader.load(url); // load the SWF file
addChild(myLoader); // add that instance to the display list, adding it to the Stage at 0,0
myLoader.x = 10; // move the loaded SWF 10 pixels to the right (from the left edge)
myLoader.y = 175; // move the loaded SWF 175 pixels down from the top
// (optional) load a second external SWF file
var my2ndLoader:ProLoader = new ProLoader();
var url2:URLRequest = new URLRequest("ExternalSWF2.swf");
my2ndLoader.load(url2);
addChild(my2ndLoader); // optionally, you could put the 2nd SWF beneath
// the 1st by using addChildAt(my2ndLoader, 1);
// (optional) scaling of the 2nd SWF file
my2ndLoader.scaleX = 2; // scale the SWF horizontally by 200%
my2ndLoader.scaleY = 2; // scale the SWF vertically by 200%
function myLoaderIsLoaded(event:Event):void
trace("The first .swf has loaded so add event listeners");
var swf:ExternalSWF = ExternalSWF(myLoader.content);
swf.addEventListener(ExternalSWF.DATA_LOAD_COMPLETE, allFinished);
swf.loadData("foobar");
function allFinished(event:Event):void
trace("Here is the data we loaded: " + ExternalSWF(myLoader.content).data);
Results:
[Trace] Output
ReferenceError: Error #1056: Cannot create property __id0_ on ExternalSWF.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at ExternalSWF()
ExternalSWF is invisible; 4 loading dots appear instead.
Expected results:
Both .swfs load without incident.
Trace output:
The first .swf has loaded so add event listeners
Here is the data we loaded: foobar
Additional notes:
I discovered this bug when my main/master .swf used ProLoader to load another .swf (with TLF on a symbol in the libary). In this case, the ProLoader appeared blank/white, not even the 4 loading dots. However, all the code in both .swfs still ran as expected (shown via the Output panel dumping all expected trace statements until execution finished).
Environment:
Adobe FLash Professional CS5.5, Version 11.5.1.349
(bug discovered while running "Test Movie" in IDE)
Windows 7 Professional Service Pack 1
Intel(R) Core(TM)2 Duo CPU E4600 @ 2.40GHz 2.39 GHz
RAM: 6.00 GB
64-bit Operating SystemDo you have anything that uses TLF in your preloader? It's possible that the TLF framework has made your preloader so heavy that it merely appears to not be doing anything, but the actual case is that all that stuff has to load before it can show you anything.
You may find this helpful http://jeffkamerer.com/blog/2010/08/12/using-a-custom-preloader-loop-with-tlf-text/
However, I don't really understand why you feel you have to use TLF to bring in the text from Photoshop. I think you must mean PhotoShop PSD's, because PhotoShop PNG's will not contain editable text (though Fireworks ones can). I get Photoshop comps all the time and bring the text in as Classic Text. While it's not an exact match 100% of the time, it's as close a match as you're going to get based on the limitations of Classic text. I think there's no reason for your designers to be redoing the designs--you just need to play around with the import settings and figure out what gets you close and then what tweaks you need to do to get closer.
And, to answer your question, nearly everyone creates graphics for Flash files in Photoshop, despite Fireworks being the better tool. For whatever reason, designers often aren't very adventurous when it comes to learning new tools, and nearly all art schools teach PhotoShop.
I also don't have any trouble loading CS5.5 AS3 swfs (no TLF--I just don't need the hassle) with Document Classes using an ordinary Loader. So I think there's something not right about what you're doing if you've come to the conclusion that you can't load a swf with a Document Class. Try scaling back to the bare minimum, then working up.
Finally, I just don't "get" why people do two things that you're doing (or, I do, but I think it's unnecessary and a colossal failure on Adobe's part)
Instantiating everything through code. Not only are you wasting an inordinate amount of time/code in specifying layout, you also completely lose the natural capability of Flash to compile assets throughout the whole of the swf. This means you have to have a preloader, because literally everything you ever use is embedded before the first visual frame. Contrast to using the timeline, where all you need to load the visuals for the first frame is the Document Class (which you can keep light by coding to Interfaces) and the visuals for the first frame. Anything else you need to load, you can defer to the frame that you've selected for embedding your AS Classes on.
Using a preloader at all.
My preloading strategy is very simple. I put a spinner graphic in the first frame, with the word "Loading." The playhead will stop at the frame that I've specified to use for exporting my ActionScript Classes (10--this provides enough space for the label "Loading" to be readable). When the embedded Classes and whatever is needed to display frame 11 is loaded, the playhead will continue to frame 11 by itself, with no code. On Frame 11, I have a MC that is a named instance, and I have a getter/setter pair to catch it. When the setter triggers, I know I'm ready to start the logic.
However, you could do all sorts of things, like just putting a MC there that "is" the entirety of your other logic (has what is now the Document Class of the swf you're preloading as its BaseClass).
Anyway, maybe something in my ramble will help you. -
Lightbox and datepicker don't work togethor
Hi, I have,or had, datepicker working on my website. Once I added lightbox2 to my site my datepicker stopped working. If I comment out the links to lightbox2 then my date picker workes. Thanks in advance for any help.
Here is some code.
=======================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<!--set variable and echo value in the title tags-->
<title class= "header2">Keynote Speakers, Sports Celebrities and Emcee's | EMJ Marketing <?php $title="The Right Keynote Speakers, Emcee's and Sports Celebrities for your event" ?> </title>
<!--<title class="header2">"Welcome"</title>-->
<!-- TemplateEndEditable -->
<link href="../NewEMJ.css" rel="stylesheet" type="text/css" /><!--[if lte IE 7]>
<style>
.content { margin-right: -1px; } /* this 1px negative margin can be placed on any of the columns in this layout with the same corrective effect. */
ul.nav a { zoom: 1; } /* the zoom property gives IE the hasLayout trigger it needs to correct extra whiltespace between the links */
</style>
<![endif]-->
<script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="../jquery-ui-1.7.2/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="../jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<link href="../SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<link href="../SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<!-- DatePicker -->
<link href="../jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet" type="text/css" />
<link href="../jquery-ui-1.7.2/css/base/ui.datepicker.css" rel="stylesheet" type="text/css" />
<link href="../jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet" type="text/css" />
<link href="../jquery-ui-1.7.2/css/base/ui.datepicker.images.css" rel="stylesheet" type="text/css" />
<!--lightbox2 -->
<script type="text/javascript" src="../lightbox2/prototype.js"></script>
<script type="text/javascript" src="../lightbox2/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="../lightbox2/lightbox.js"></script>
<link rel="stylesheet" href="../lightbox2/lightbox.css" type="text/css" media="screen" />
<style type="text/css">
table {
width: 896px;
color: #D6BD38;
background-repeat: no-repeat;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
body {
background-color: #000;
a:visited {
color: #D6BD38;
a:link {
color: #D6BD38;
</style>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-24112472-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
</script>
<style type="text/css">
/* BeginOAWidget_Instance_2137022: #datepicker */
#datepicker .ui-widget {
font-family: inherit;
#datepicker .ui-datepicker {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
#datepicker .ui-datepicker-title {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: .8em;
color: #000000;
font-weight: normal;
line-height: 1.8em;
#datepicker .ui-state-default, .ui-widget-content .ui-state-default {
border-color: #d6bd38;
background-color: #d6bd38;
color: #F7DA3D;
#datepicker .ui-state-default, .ui-state-default a {
color: #F7DA3D;
#datepicker .ui-state-highlight, .ui-widget-content .ui-state-highlight {
border-color:transparent;
background-color:transparent;
color:#F7DA3D;
#datepicker .ui-state-active, .ui-widget-content .ui-state-active {
border-color: #cccccc;
background-color: #cccccc;
color: #F7DA3D;
#datepicker .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus
border-color: #666666;
background-color: #666666;
color: #000;
#datepicker .ui-widget-header
border-color: #d6bd38;
background-color: #000000;
border-width: 1px;
/* Text attributes for the Days of Week Text */
#datepicker .ui-datepicker table th
font-size: .8em;
color: #d6bd38;
font-weight: bold;
/* EndOAWidget_Instance_2137022 */
</style>
<script type="text/xml">
<!--
<oa:widgets>
<oa:widget wid="2137022" binding="#datepicker" />
</oa:widgets>
-->
</script>
</head>
=================================
Thanks winrolCheck this link should work for you
http://api.jquery.com/jQuery.noConflict/ -
Dynamic action with function works, doesnt refresh textfield
Hi all,
experimenting with dynamic actions so I got the following setup:
I've built a screen with 2 text boxes
P7_input
P7_output
The goal is to put some tet in P7 input and have it returned with additional text in P7_OUTPUT
CREATE OR REPLACE PROCEDURE PRC_ECHO
P_INPUT IN VARCHAR2 DEFAULT 'LEEG'
, P_OUTPUT OUT VARCHAR2
) AS
BEGIN
p_output := 'Ingevoerd: ' || p_input;
END PRC_ECHO;I've created a dynamic action on the LOSE FOCUS event of item P7_INPUT.
The true action executes PL/SQL (sequence number 10)
Begin
eigen_apps.uga_prc_echo (:p7_input, :P7_OUTPUT);
end;"Page items to submit" are set to P7_INPUT, P7_OUTPUT
(and I tried with just P7_INPUT).
The second true action (sequence number 20) does a REFRESH on ITEM P7_OUTPUT (and I tried refresh region and other things I thought would make it work.)
When I enter something in P7_INPUT and tab, click or enter away from the P7_INPUT field, nothing changes in my P7_OUTPUT textfield.
Only when I hit the refresh button in my browser P7_OUTPUT is filled with 'Ingevoerd: <P7_INPUT value>.
So. The procedure does return the value into P7_OUTPUT, but I cant get an instant refresh of the P7_OUTPUT to work.
Can any of you help me?
RobinGetting some other errors now, will look into this tomorrow.
1 error has occurred
ORA-06550: line 4, column 18: PLS-00382: expression is of wrong type ORA-06550: line 4, column 7: PL/SQL: Statement ignoredNeed to check my procedure...
Robin -
How to get textfield values from a tableRowGroup
I have textfield in a table.
my problem is
How to get textfield values from a tablerowgroup1.I have created getQuantity and setQuantity properties in my session bean and mapped text property of tabletextbox to session bean quantity.
also used map to set and reatrieve quantity values.
I am getting error for bean type quantity. -
Unable to get the value from the textfield in valueChangeEvent
Hi,
I have created one custom textField by extending the CoreInputText. Now i have attched default ValueChangeListener to it. I am using this textField in my application.
Now i type some thing and do a focus lost, the value change listener get called. i want to validate the value entered. In that listener method if i take the getSource() from ValueChnageEvent object and do a getValue() I am getting the entered value.
My problem is that if i do a getValue() of the textField i am not gettting the value entered.
How can i get the entered value from the textfield.? Is there any method to notify to do this?
Thanks in advance.Hi,
I tried to the value from coreInputText also. If i check the getValue method of the component, i am getting the last updated value. I have debug the FlowPhaseListsner also. And i found that this listener is calling before the updateModel phase. Due to that i am not getting the value from the Field. -
Using a button and a textfield in the same cell of a table
I have been struggling with this problem for ages, please someone help...
I am trying to implement a table similar to NetBeans property sheet editor where you have a textfield and a button with "..." in the same table cell. The button is used to invoke a custom editor.
I have most things working, custom renderers, custom editors and such.
However, the focus interactions on the table seem completely screwed. Clicking in the editor causes the cell to switch to editing mode as expected. Pressing cursor down or tab, which should close the editor and move focus to the next cell down does not work - the editor closes but the focus disappears to a completely different component elsewhere on my GUI.
My textfield and button are on a JPanel, and I return that JPanel when getTableCellEditorComponent is called.
If I switch out the JPanel and instead return the textfield, the focus works as normal.
I've even looked at the NetBeans source but I can't work out what their trick is.
Any tips would be gratefully received.
TIA.Thanks for your time, Jeanette...
Here is a bare-bones example of the problem I'm having. I'm running on JDK1.4 and JDK1.3.1_02.
I've tried some tricks (hacks) with getNextFocusableComponent and requestDefautFocus and such but with no success.
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
* This example shows a keyboard/focus navigation problem when using a JPanel
* as a table cell editor. The JPanel contains a textfield and a button.
* Click in the editor to invoke it, and tab-off (or press cursor down). The
* edit ends, but the focus disappears rather than moving to the next cell in
* the table.
* Change the line that returns the panel to return a text field instead, and
* all is well.
public class Test
public static void main( String[] args )
new Test();
public Test()
JFrame f = new JFrame();
f.setContentPane( new TablePanel() );
f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
f.setSize( 800, 600 );
f.setVisible( true );
class TablePanel extends JPanel
TablePanel()
setLayout( new BorderLayout() );
JTable table = new JTable();
table.setDefaultEditor( Object.class, new MyEditor() );
table.setModel(
new DefaultTableModel(
new Object[][]
{null, null},
{null, null},
{null, null},
{null, null}
new String[] { "A", "B" } ) );
add( table, BorderLayout.CENTER );
class MyEditor extends AbstractCellEditor implements TableCellEditor
private JComponent myEditorPanel;
private JTextField myTextField;
MyEditor()
myEditorPanel = new MyEditorPanel();
myTextField = new JTextField();
public Object getCellEditorValue()
return null;
public Component getTableCellEditorComponent( JTable table, Object value,
boolean isSelected,
int row, int column )
return myEditorPanel; // Problems...
// return myTextField; // Keyboard and focus as expected
class MyEditorPanel extends JPanel
JTextField tf;
MyEditorPanel()
setLayout( new BorderLayout() );
tf = new JTextField();
add( tf, BorderLayout.CENTER );
add( new JButton( "edit" ), BorderLayout.EAST ); -
Transparent TextField with Synth Look and Feel
I am trying to use synth to implement a textfield with a transparent background, and having some problems with it. I can see my panel and the transparent field fine enough in the beginning, but when the text in the field changes, it writes right over the previous text and becomes a pile of unreadable white marks. I've experimented with varying degrees of transparency, but you can still see the old field underneath slightly. Does anyone have any suggestions? My code is below.
Thanks.
synth.xml
<synth>
<!-- PANEL -->
<style id="panelStyle">
<state>
<imagePainter method="panelBackground" path="../../../lafImages/papyrus_bkgd.gif" sourceInsets="10 15 10 15"/>
</state>
</style>
<bind style="panelStyle" type="name" key="PAPYRUS_PANEL"/>
<!-- TEXTFIELD -->
<style id="textFieldStyle">
<font name="Kudasai" size="12"/>
<state>
<color type="TEXT_FOREGROUND" value="#FFFFFF"/>
<!-- set the alpha value for transparency in 1st two digits -->
<color type="BACKGROUND" value="#00000000"/>
</state>
<opaque value="false"/>
</style>
<bind style="textFieldStyle" type="region" key="TEXTFIELD"/>
</synth>
my tester
class SynthTester {
private JTextField field;
public SynthTester(){
initLookAndFeel();
JFrame main = new JFrame();
JPanel panel = new JPanel();
panel.setName("PAPYRUS_PANEL");
field = new JTextField(3);
field.setText("0");
panel.add(field);
JButton button = new JButton("+");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int val;
try {
val = Integer.parseInt(field.getText());
} catch( Exception ex ) {
val = 0;
val++;
field.setText(Integer.toString(val));
panel.add(button);
main.add(panel);
main.pack();
main.setVisible(true);
private void initLookAndFeel() {
SynthLookAndFeel lookAndFeel = new SynthLookAndFeel();
try {
InputStream is = getClass().getResourceAsStream("synth.xml");
if( is == null) {
System.err.println("unable to load resource stream");
} else {
lookAndFeel.load(is, getClass());
UIManager.setLookAndFeel(lookAndFeel);
} catch (Exception e) {
System.err.println("Couldn't get specified look and feel ("+ lookAndFeel+ "), for some reason.");
System.err.println("Using the default look and feel.");
e.printStackTrace();
System.exit(1);
}As its name implies, an imagePainter element creates a SynthPainter that paints from an image. For example:
<synth>
<style id="example">
<state>
<color value="white" type="BACKGROUND"/>
</state>
<imagePainter method="panelBackground" path="background.png"
sourceInsets="5 6 6 7" paintCenter="false"/>
<insets top="5" bottom="6" right="7" left="6"/>
</style>
<bind style="example" type="region" key="Panel"/>
</synth> -
How to get the last element of a structure in a textfield in DesignStudio
Hello,
how can I get the last element of a structure within a bex query?
Within the structure we are working with dates that dynamically are buiId (input date - offsets for several months).
I have to show the last value in a single textfield within DesignStudio.
Regards
FrankHi Frank,
in DS 1.3 you can use forEach function to get the last element of BEx structure (or n-th element in general using if condition)
var array = DS_CROSSTAB1.getMembers("DHGY5D6XEFO1K45SB00BXFH7A",10);
var lastMember="";
array.forEach(function(element, index) {
lastMember = element.text;
TEXT_1.setText("Last structure element: "+lastMember);
Maybe you are looking for
-
When using my ipad air it keeps coming off the page I'm on or app I am using and going back to the home screen. Also when using my ipad the screen will go white with a black apple icon in the middle for about 20 seconds then it makes a ping sound and
-
Mountain Lion 10.8.2 Heavy background disk activity but not time machine
Since accepting the Software update that puts my version of ML as 10.8.2 I have began to notice a regular (every hour) constant heavy activity in one of my drives (yet to identify which one). The said drive(s)?? whirr up and carry out activity that s
-
Transition Conflict on VI When I Delete A 5 Second Sound Effect ?
I inserted a Cartoon Boing sound effect all by itself on A3/A4 in my HDV project. When I decided to delete it (successfully) I got a warning - "Transition Conflict on V1". I am not doing anything with V1 and this solitary sound effect is not connecte
-
Problem installing Sun One DS 5.2
I'm having a little trouble installing the iPlanet Directory Server 5.2 on Solaris 9. I get the error: error: initialization failure:Unable to initialize the NSS subcomponent. Configuration of the Directory Server failed. Error Directory Server confi
-
I cannot find OS x mavericks 10.9.0 in the app store and I cannot download a newer version because it requires 10.9.0. I have looked everywhere and its really annoying. I know it was taken off the app store when 10.9.10 came out but I need it to get