Problems with addChild in UIComponent
Hello there
I have this class, which extends UIComponent class, and I
need put a Label inside it, but when I create the label, and add it
using addChild method, the Label isnt shown.
The class name is "Page" and it is child of a class named
"PageManager" (extends UIComponeny) which is a child of another
class named "Magazine" (extends UIComponent) which is a unique
child of "Application" (extends Canvas).
the class source-code:
* Página que carrega o conteúdo passado por XML e
é dinâmica
* @author Thiago Ricieri
* @version 1.0
package sm.display {
//Importação de classes do Library do Flash
import flash.display.Loader;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import mx.containers.HBox;
import mx.controls.Label;
import mx.core.UIComponent;
* Classe que define o documento que inicializa a revista
public class Page extends UIComponent {
* Atributos
public var pageSide:Number;
public var isBehind:Boolean;
private var infoLabel:Label;
static public var numInstances:Number = 0;
* Construtor da Classe
public function Page() {
super();
infoLabel = new Label();
this.addChild(infoLabel);
infoLabel.text = "some text here " +
numInstances.toString();
infoLabel.setStyle("color", "#ffffff");
infoLabel.y=150;
infoLabel.x=150;
numInstances++;
pageSide = 0;
isBehind = false;
this.addEventListener(MouseEvent.CLICK, clickHandle);
public function loadImage(src:String):void {
var _loader:Loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
completeHandle);
var request:URLRequest = new URLRequest(src);
_loader.load(request);
//addChild(_loader);
private function completeHandle(e:Event):void{
protected function clickHandle(e:Event):void {
Thanks a lot ;]
cool,
I've discovered the "override protected function
createChildren()", thats cool!
i've created two another classes extending UIComponent and
they didnt need the "override protected function createChildren()"
to attach components to them. This is only aplied on the classes
that I described above, when i try to use the method "addChild()"
to attach a Label.
I've followed the methods from the article, but is not
working the way I like yet.
help ;]
Similar Messages
-
Problems with addChild()
Hello,
I am just learning AS3 and have a problem with addChild(). I
have created a slide show Class, which works fine when I call it
from the document class field of the .fla. If I call the slide show
class not directly from the .fla but though another class the slide
doesn't show, even through the slide show is running in the
background which I tested with traces.
I would be glad, if someone could help me with this problem.
Thanks in advande
DidiimageLoader.load(urlReq); // get it
addChild(imageLoader); // display it
Maybe you have to wait until you are sure the image has been
loaded, i.e. when the event "complete:Event" happens.
http://livedocs.adobe.com/flex/2/langref/flash/net/URLLoader.html#load() -
Problem with addChild()
Hy! I'm trying to make a map for my game and I have a problem that I can't solve. I'm not going to write the entire code because it's really big...
public class Arena extends MovieClip
private var logic:ArrayList = new ArrayList();
private var display:ArrayList = new ArrayList();
public function Arena()
// create the logic and visual elements and add them into the Arrays
public function generateMap():void
// adding the visual elements (some MovieClips) to their respective place
public function startListen():void
for (var i:Number = 0; i < 100; i++)
display.getItem(j).getItem(i).addEventListener(MouseEvent.CLICK, onClick);
// display is a matrice that's why the getItem is called twice
// here I'm waiting for the user to click an element and after that to add a DataType in the Arena at the same location where he clicked
function onClick(e:MouseEvent):void
var Instance:* = new DataType();
this.addChild(Instance);
Instance.x = e.target.x;
Instance.y = e.target.y;
// the problem is that the e.target.x and y are always 0, no matter what.
// if i try to write "e.target.addChild(Instance)" it addes it where I want, but inside the symbol
Can anyone give me a hand here ? Thanks a lot !use currentTarget instead of target.
-
Problem with addChild() and getChildAt()
Can someone tell me why the last trace outputs undefined?
var myMC1:MovieClip = new MovieClip();
var myMC2:MovieClip = new MovieClip();
myMC1.addChild(myMC2);
myMC1.getChildAt(0).name = "myMC3";
trace(myMC1.getChildAt(0)); // outputs [object MovieClip]
trace(myMC1.getChildAt(0).name); //outputs myMC3
trace(myMC1.myMC3); // outputs undefinedquote:
Originally posted by:
smohadjer
So if I understand you correctly if I add a movie clip to
another movie clip using addChild() it would not be the same and I
won't be able to use the dot syntax to refer to the second movie
clip. But why?
This is because when you use addChild you add it to
DisplayContainer display list - not as a property of the parent
movie. Dot notation is for reading or invoking something that is in
the scope of an object. By adding a display object to display list
- it doesn't add another property to the Object's scope. Again, as
Ned said there are way to read the content of display list. In
order for the syntax you are craving for to work you need to create
properties and methods explicitly. Most of the classes in the
flash.display package are not dynamic (you cannot add more than
they already provide - you need to extend them in order to do
that),
This is the way it is. I hear what you are saying though (and
must admit that, perhaps, it looks more intuitive to refer to
children via dot notation) but from the viewpoint of OOP and AS3
architecture it would not be correct. I do see a good reason for
Adobe decoupling display list from object's properties. But this is
too long a discussion. -
Problem with the MenuBar and how can i delete a own component out of the storage
Hello,
I opened this thread in the category "Flex Builder 2", but
under this category my questions fit better.
I have a problem with the MenuBar and a question to delete a
component out of storage.
1. We have implemented the MenuBar, which was filled
dynamically with XML data.
Sporadically it will appear following fault, if we "mousover"
the root layer.
RangeError: Error #2006: Der angegebene Index liegt
außerhalb des zulässigen Bereichs.
at flash.display::DisplayObjectContainer/addChildAt()
at mx.managers::SystemManager/
http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()
at mx.managers::SystemManager/addChild()
at mx.managers::PopUpManager$/addPopUp()
at mx.controls::Menu/show()
at mx.controls::MenuBar/::showMenu()
at mx.controls::MenuBar/::mouseOverHandler()
Here a abrid ged version of our XML to create the MenuBar:
<Menuebar>
<menu label="Artikel">
<menu label="Artikel anlegen" data="new_article" />
<menu label="Artikel bearbeiten" data="edit_article" />
<menu label="Verpackung">
<menu label="Verpackung anlegen" data="new_package" />
<menu label="Verpackung bearbeiten" data="edit_package"
/>
</menu>
<menu label="Materialgruppe">
<menu label="Materialgruppe anlegen"
data="new_materialgroup" />
<menu label="Materialgruppe bearbeiten"
data="edit_materialgroup" />
</menu>
</menu>
</Menuebar>
It is a well-formed XML.
2. Delete a component out of storage
We have some own components (basically forms), which will be
created and shown by an construct e.g.
var myComponent : T_Component = new T_Component ;
this.addChild(myComponent)
Some of our forms will be created in an popup. On every call
of the popup, we lost 5 mb or more, all childs on the windows will
be removed by formname.removeAllChild();
What cann we do, that the garbage collector will dispose this
objects.
Is there a way to show all objects with references (NOT
NULL)?
I have read in the Flex Help, that
this.removeChild(myComponent) not delete the form and/or object out
of the storage.
Rather the object must be destroyed.
It is sufficient to call delete(myComponent) about remove
this object out of the storage as the case may be that the
garbage-collector remove this object at any time?
Or how can I destroy a component correctly. What happens with
the widgets on this component e.g. input fields or datagrids?
Are they also being deleted?
Thanks for your help.
MatzeIf you mena the "photo Library" then you cannot delete it.
This is how iphone handles photos. There are not two copies. There a re simply two places from which to access the same photos. ALL photos synced to iphone can be accessed via Photo Library. Those same pics can be accessed via their individual folder. -
Problem with Import and Base Object
Hi everyone
Last week, I downloaded Flash CS5. I am trying different thing and here is the problem that I dont understand
I wrote a package like that
package {
import flash.text.TextField;
import fl.controls.Button;
public class ex1 extends Sprite {
public function ex1() {
var myButton:Button = new Bu
tton();
var label:TextField = new TextField();
addChild(label);
If I try to execute that script, the compiler returns error
1046: Type was not found or was not a compile-time constant: Button.
1180: Call to a possibly undefined method Button.
If I insert in the main stage (with the Componet Editor) a Button in the main stage, and recompile it, no error.
If I delete the Button in the main stage and recompile again, no error
But, If I save the projet and reload it again, I've got the same error
By the way, I dont have any problem with the textField()
What is wrong with my setup.
OTHER QUESTION:
If in the ACTION FRAME (F9), I insert the folowing code:
import ex1;
var a:ex1 = new ex1();
one more time, I've got error from the compiler. Why ?
We cannot include a package in the ACTION FRAME ?
Thanks for your helpThere are some things (including $.fileName) that just do not work in jsxbin's.
I don't thing the exception hook will work either.
Either use an ini file in a well known location (~/Desktop) or make sure your
files are put in Presets/Scripts. That location can be determined with this bit
of code:
var SCRIPTS_FOLDER =
new Folder(app.path + '/' +
localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts"));
-X -
Problem with FLVPlayback and component
First of all I had problem with control component. they are not working so i just named that ppo and change the visibility to false to get rid of problem!
ppo.visible=false;
Question1
(is there anyway to solve the problem? I mean to match the controlbar with screen of FLVplayer.)
Question2
what is the difference btw Flvplayback and FLVplayback 2.5 ?
Question3
whenever I click in btn1 it plays the flv.but sometimes it has no action so i click again and suddenly it plays the 001.flv twice and simultanously(even more than twice!)
how can I solve my problem ?
___________________Frame 1______________
import fl.video.*;
import flash.events.MouseEvent;
var myVideo:FLVPlayback = new FLVPlayback();
control.visible=false;
myVideo.x = 115;
myVideo.y = -10;
myVideo.skinBackgroundColor = 0x333333;
myVideo.skinAutoHide=true;
myVideo.skinFadeTime=300;
addChild(myVideo);
btn1.addEventListener(MouseEvent.CLICK , c1);
function c1(e:MouseEvent):void
myVideo.source = '001.flv';
Question 4 : I want to jump to another frame and start another flv but I want to stop previous flv. and again add myVideo2 to stage like frame 1 pattern. Is it true ? is there any better way to do this ?
---------------------------frame5-----------------------
import fl.video.*;
import flash.events.MouseEvent;
var myVideo2:FLVPlayback = new FLVPlayback();
control2.visible=false;
myVideo2.x = 115;
myVideo2.y = -10;
myVideo2.skinBackgroundColor = 0x333333;
myVideo2.skinAutoHide=true;
myVideo2.skinFadeTime=300;
addChild(myVideo2);
btn2.addEventListener(MouseEvent.CLICK , c2);
function c2(e:MouseEvent):void
myVideo2.source = '002.flv';
thank you in advanced..Question1
(is there anyway to solve the problem? I mean to match the controlbar with screen of FLVplayer.)
what are you calling the '..controlbar' and what are you calling the '...control component'?
Question2
what is the difference btw Flvplayback and FLVplayback 2.5 ?
2.5 has more features, http://blogs.adobe.com/ktowes/2009/05/announcing_dvrcast_and_flvplay.html
Question3
whenever I click in btn1 it plays the flv.but sometimes it has no action so i click again and suddenly it plays the 001.flv twice and simultanously(even more than twice!)
how can I solve my problem ?
remove the click listener so you can only click once. then you may need to wait if testing online.
___________________Frame 1______________
import fl.video.*;
import flash.events.MouseEvent;
var myVideo:FLVPlayback = new FLVPlayback();
control.visible=false;
myVideo.x = 115;
myVideo.y = -10;
myVideo.skinBackgroundColor = 0x333333;
myVideo.skinAutoHide=true;
myVideo.skinFadeTime=300;
addChild(myVideo);
btn1.addEventListener(MouseEvent.CLICK , c1);
function c1(e:MouseEvent):void
myVideo.source = '001.flv';
Question 4 : I want to jump to another frame and start another flv but I want to stop previous flv. and again add myVideo2 to stage like frame 1 pattern. Is it true ? is there any better way to do this ?
---------------------------frame5-----------------------
import fl.video.*;
import flash.events.MouseEvent;
myVideo.stop();
removeChild(myVideo);
myVideo=null;
var myVideo2:FLVPlayback = new FLVPlayback();
control2.visible=false;
myVideo2.x = 115;
myVideo2.y = -10;
myVideo2.skinBackgroundColor = 0x333333;
myVideo2.skinAutoHide=true;
myVideo2.skinFadeTime=300;
addChild(myVideo2);
btn2.addEventListener(MouseEvent.CLICK , c2);
function c2(e:MouseEvent):void
myVideo2.source = '002.flv'; -
Hi! I'm having a problem with getting this code working, basically I want to drag and drop two things onto another the things dissapear then it moves onto a new page, the first item works properly but then the second item wont dissapear and remains stuck to the cursor. Heres the code I'd be greatful of any help.
import flash.events.MouseEvent;
import fl.motion.MotionEvent;
stop();
Back6_btn.addEventListener(MouseEvent.CLICK, onBack6Click)
function onBack6Click(event:MouseEvent):void{
gotoAndPlay("Bedroom2");
Forward6_btn.addEventListener(MouseEvent.CLICK, onForward6Click)
function onForward6Click(event:MouseEvent):void{
gotoAndPlay('Brother bit');
var inGran:Number=0;
Gin.addEventListener(MouseEvent.MOUSE_DOWN, dragOn);
Tonic.addEventListener(MouseEvent.MOUSE_DOWN, dragOn);
function dragOn(event:MouseEvent):void {
event.target.startDrag(false);
stage.addEventListener(MouseEvent.MOUSE_UP, dragOff);
function dragOff(event:MouseEvent):void {
event.target.stopDrag();
if (event.target.dropTarget!=null&&event.target.dropTarget.parent==Gran) {
event.target.visible=false;
inGran++;
stage.removeEventListener(MouseEvent.MOUSE_UP, dragOff);
function checkPage(e:Event):void {
if (inGran==2) {
gotoAndPlay("Bedroom1");you have some mismatched brackets, change your target properties to currentTarget (and i'm not sure you're dropping onto the correct target) but, try:
import flash.events.MouseEvent;
import fl.motion.MotionEvent;
stop();
Back6_btn.addEventListener(MouseEvent.CLICK, onBack6Click)
function onBack6Click(event:MouseEvent):void{
gotoAndPlay("Bedroom2");
Forward6_btn.addEventListener(MouseEvent.CLICK, onForward6Click)
function onForward6Click(event:MouseEvent):void{
gotoAndPlay('Brother bit');
var inGran:Number=0;
Gin.addEventListener(MouseEvent.MOUSE_DOWN, dragOn);
Tonic.addEventListener(MouseEvent.MOUSE_DOWN, dragOn);
function dragOn(event:MouseEvent):void {
event.currentTarget.parent.addChild(event.currentTarget);
event.target.startDrag(false);
stage.addEventListener(MouseEvent.MOUSE_UP, dragOff);
function dragOff(event:MouseEvent):void {
event.target.stopDrag();
if (event.target.dropTarget!=null&&event.target.dropTarget.parent==Gran) {
event.target.visible=false;
inGran++;
stage.removeEventListener(MouseEvent.MOUSE_UP, dragOff);
function checkPage(e:Event):void {
if (inGran==2) {
gotoAndPlay("Bedroom1"); -
DateTimeAxis min/max bug? Problems with consistent padding. Date Wrapping.
I have been working on a problem with a BarChart object that I've created using dynamic data.
My primary issue is that I can't seem to get the proper min/max values to set for the chart.
To solve this I manually found the min and max of the data set of Dates and set the min and max of the chart. This allowed me to finally see all the floating custom bars (each bar is rendered with a user set fill), however now if I have a bar that extends over a year change the horizontal axis labels do not wrap the date properly, so instead of 2/10 (feb 2010) being the last date, 12/09 (dec 2009) is the last date.
I've been trying to dynamically adjust the padding based upon a change event, but so far to no avail. Partially I think because I'm not sure which event for the function to fire on.
private function dateAxisGen(r:Array):void {
var min:Number = r[0].startTime.time;
var max:Number = r[0].endTime.time;
const PAD:Number = 2;
const MILLISEC_IN_MONTH:Number = 2629743830;
const MILLISEC_IN_WEEK:Number = 604800000;
const MILLISEC_IN_DAY:Number = 864;
for (var i:int = 1; i < r.length; i++) {
var o:OperationXT = OperationXT(r[i]);
min = Math.min(o.startTime.time, min);
max = Math.max(o.endTime.time, max);
// Calculates the maximum range, then adds an appropriate
// padding to the chart via extra time. TODO
/* var range:Number = max - min;
if(range >= MILLISEC_IN_MONTH) {
dAxis.padding = (MILLISEC_IN_WEEK/1000000)/PAD;
dAxis.padding = (MILLISEC_IN_WEEK/1000000)/PAD;
} else if(range >= MILLISEC_IN_WEEK) {
dAxis.padding = (MILLISEC_IN_DAY)/PAD;
dAxis.padding = (MILLISEC_IN_DAY)/PAD;
} else {
dAxis.padding = PAD;
dAxis.minimum = new Date(min);
dAxis.maximum = new Date(max);
this, however, does not adjust the padding properly when an operation is removed from the list. Not to mention I still have the date wrapping error. It gives me the following error:
Cannot access a property or method of a null object reference.
at mx.charts::AxisRenderer/measureHorizontalGutters()[C:\work\flex\dmv_automation\projects\d atavisualisation\src\mx\charts\AxisRenderer.as:2244]
at mx.charts::AxisRenderer/calcRotationAndSpacing()[C:\work\flex\dmv_automation\projects\dat avisualisation\src\mx\charts\AxisRenderer.as:1858]
at mx.charts::AxisRenderer/adjustGutters()[C:\work\flex\dmv_automation\projects\datavisualis ation\src\mx\charts\AxisRenderer.as:1534]
at mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\work\flex\dmv_automation\pro jects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:2239]
at mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\work\flex\dmv_automation\pr ojects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1366]
at mx.core::UIComponent/validateDisplayList()[E:\dev\gumbo_beta2\frameworks\projects\framewo rk\src\mx\core\UIComponent.as:8065]
at mx.managers::LayoutManager/validateDisplayList()[E:\dev\gumbo_beta2\frameworks\projects\f ramework\src\mx\managers\LayoutManager.as:663]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\gumbo_beta2\frameworks\projects \framework\src\mx\managers\LayoutManager.as:736]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\gumbo_beta2\frameworks\ projects\framework\src\mx\managers\LayoutManager.as:1069]
Any help with my problem would be greatly appreciated.
ADDITIONAL INFO:
Alright, so I've discovered that the ONLY time the date wrapping error occurs is when the axis labels contain only the month and year, any other time it places it properly.
Does anyone know where I can report this bug?Perre wrote:I'm used to being able to pick one or a couple of songs and then adding it a specified playlist. Is this impossible in sonata?
It's clearly not impossible, just different than you expect. Create your playlist as you want it to appear in the Current tab (meaning don't dump every single song from your library in there, just the ones you want) and then save the playlist.
Perre wrote:And if I try to play the m3u file created (the one with every song listed) through freevo I get a message that the directory is empty. What am I doing wrong??
Look at save_absolute_paths_in_playlists in your mpd.conf. -
Problem with file access in other computer in jsp
I have problem with file accessing in other computer in jsp.
The follow code
File folder=new File("Z:"+File.separator+"sharefolder");//Z is a net share driver
File[] files=folder.listFiles();
System.out.println("test");
System.out.println("length="+files.length);
will throw exception at the second print.
but it works well in main funtion.
Is anybody know what is the problem.
JSP works on windows2003 server,tomcat 5.0.28 JDK1.4 net share folder on windows2000 serverno error code for this.But when I start tomcat I get the follow error.
java.lang.IllegalArgumentException: Document base Z:\ does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:138)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3910)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4138)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
SEVERE: Exception during cleanup after start failed
LifecycleException: Container StandardContext[msgstore] has not been started
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4466)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) -
Hi helpers !@
im trying to load multiple external png files from a folder. the path for the images comes from an xml attribute and i got no problem with the path. The error message pops on when i try to add the loader into an array for later use and then when im done remove each child i created. There is something in my pratice that is not ok , i meen i know im wrong with at some point ! Duh theres an Error message for each loader i create .. .
ReferenceError: Error #1069: Property Loader not found on flash.display.LoaderInfo and there is no default value.
here some code , pls guide me !
function affichageM(){
var nodeM:XML;
for each ( nodeM in listeM ){
var reqM:String = localLogoM + nodeM.attribute("icon_max2");
var imageLoaderJ = new Loader();
imageLoaderJ.contentLoaderInfo.addEventListener(Event.INIT,addM);
imageLoaderJ.load(new URLRequest(reqM));
// just counting for fun
iNodeM ++;
function addM(e:Event){
try { var l_img:Loader = Loader(e.currentTarget.Loader);
l_img.name = "imageLoaderJ" + mc_ArrayImg.length().toString() ;
l_img.visible = false;
mc_ArrayImg.push(l_img);
mc_Jour.addChild(l_img);
//calling the fucntion that will animate all img in the array and had some text to them.....
drawMyImg(mc_ArrayMImg.length()-1);
catch (error:Error) {
//just counting errors for fun
iErreurM++;
var errorMessage:TextField = new TextField();
errorMessage.autoSize = TextFieldAutoSize.LEFT;
errorMessage.textColor = 0xFF0000;
errorMessage.text = error.message + " " + mc_Jour.numChildren + " " + mc_ArrayImg.length;
errorMessage.x = 10*iErreurM;
addChild(errorMessage);
return;Hi, I'm not sure you are on the correct forum. This is the Flash Player forum. When you first open your thread, look to your right "More like This" and perhaps one of those forums would be helpful. Perhaps the Flash forum?
Thanks,
eidnolb -
Problem with displaying chart data
Hello everybody,
I have problem with displaying chart data correctly. I'm using a cartesian chart with DateTimeAxis. The stockdata I'm using is for half a year and
with ticks for every day. The problem is, that Flex displays the data of february in march together with the data of march. I have added a picture
to show the result. The second column of the grid is for february and the third for march.
Could anybody help me with this problem. Thanks in advance.
ThomasHi Chris,
thanks for your reply. Here you get the source code:
The following method creates the LineChart:
public function init():void
model.upperChart = this;
model.upperChartStyle.setChartViewStyle(this);
this.hAxis = new MyDateTimeAxis();
model.upperChartData.configureHAxis(this.hAxis);
this.vAxis = new LinearAxis();
model.upperChartData.configureVAxis(this.vAxis);
this.vAxisTitle = new Label();
this.vAxisTitle.text = model.upperChartData.getVAxisTitle();
model.upperChartStyle.setVAxisTitleLabelStyle(this.vAxisTitle);
this.vAxisTitle.x = 10
this.vAxisTitle.y = 0;
this.addChild(this.vAxisTitle);
this.myChart = new CartesianChart();
//remove default datatip
this.myChart.showDataTips = false;
this.myChart.x = 10;
this.myChart.y = 0;
this.myChart.width = 768;
this.myChart.height = 196;
model.upperChartStyle.setChartStyle(this.myChart);
this.addChild(this.myChart);
//Remove line shadow
this.myChart.seriesFilters = null;
this.myChart.horizontalAxis = this.hAxis;
this.myChart.verticalAxis = this.vAxis;
this.hAxisRenderer = new AxisRenderer();
model.upperChartData.configureHAxisRenderer(this.hAxisRenderer);
this.hAxisRenderer.axis = this.hAxis;
model.upperChartStyle.setHAxisRendererStyle(this.hAxisRenderer);
this.myChart.horizontalAxisRenderers.push(this.hAxisRenderer);
this.vAxisRenderer = new AxisRenderer();
model.upperChartData.configureVAxisRenderer(this.vAxisRenderer);
this.vAxisRenderer.axis = this.vAxis;
model.upperChartStyle.setVAxisRendererStyle(this.vAxisRenderer);
this.myChart.verticalAxisRenderers.push(this.vAxisRenderer);
model.upperChartStyle.setVAxisDataLabelStyle(this.vAxisMinLabel);
this.addChild(this.vAxisMinLabel);
model.upperChartStyle.setSeriesStyle(model.upperChartData.series, model.upperChartData.shares);
this.myChart.dataProvider = model.upperChartData.dataProvider;
this.myChart.series = model.upperChartData.series;
The data for dataprovider and series you can see in attached file dataprovider.xml.
xfield is equivalent to timestamp
yfield is equivalent to absolute
I think the problem could be the configuration of the datetimeaxis. The following method shows the parameter for the datetimeaxis:
public function configureHAxis(axis:MyDateTimeAxis):void
axis.parseFunction = UtilityClass.parseYYYYMMDDHHNNSSString2Date;
axis.dataUnits = "days";
axis.dataInterval = 1;
axis.title = "";
axis.minimum = new Date(UtilityClass.parseYYYYMMDDHHNNSSString2Date("2009-01-07 00:00:00").time);
axis.maximum = new Date(UtilityClass.parseYYYYMMDDHHNNSSString2Date("2009-07-06 00:00:00").time);
And finally you get the function, that I'm using for string to date conversion:
public static function parseYYYYMMDDHHNNSSString2Date(input:String):Date
var result:Date = new Date();
var year:Number = Number(input.substring(0,4));
var month:Number = Number(input.substring(5,7));
var date:Number = Number(input.substring(8,10));
var hours:Number = Number(input.substring(11,13));
var minutes:Number = Number(input.substring(14,16));
var seconds:Number = Number(input.substring(17,19));
result.setUTCFullYear(year);
result.setUTCMonth(month-1);
result.setUTCDate(date);
result.setUTCHours(hours);
result.setUTCMinutes(minutes);
result.setUTCSeconds(seconds);
return result;
I hope that will help to locate the reason for the wrong chart visualization.
Thanks for any help. -
Problem with Non JSF Request to JSF Page
Hi All,
I am working on dynamic controls generation based on the request come from non jsf page
For the first request, pageworks perfectly. but when we go for second request, it is not rendering and I am getting same old page.
What I have identified is if I have 2 pages as JSF, application is not giving any problem.
For this I have written small test application contains both JSF pages only.
page1 contains 3 submit buttons.
When submit buttons are clicked based on the request, I get, am able to see the dynamic controls.
SO there is no problem with JSF PAGE to JSF Page Communication
Now I have done some changes in First JSF page. Instead of submitting directly I am submitting the page through JavaScript which is nonb JSF request. There I am facing the problem and based on requested qaction I am not able to see correct rendered page based on the requested action.
Any Idea why it is giving problem for non JSF requests??
Thanks
SudhakarFor Your Convenience in understanding the problem
I am pasting entire test code
Page 1 -- (here page2 is Page1 and Page1 is page2 - some naming convention errors :) )
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<jsp:text><![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
]]></jsp:text>
<f:view>
<html lang="en-US" xml:lang="en-US">
<head>
<meta content="no-cache" http-equiv="Cache-Control"/>
<meta content="no-cache" http-equiv="Pragma"/>
<title>Page2 Title</title>
<link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body style="-rave-layout: grid">
<h:form binding="#{Page2.form1}" id="form1">
<!-- Non JSF REquests -->
<h:commandButton action="#{Page2.button1_action}" binding="#{Page2.button1}" id="button1" style="left: 48px; top: 48px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=1'; document.forms['form1'].submit(); return false;"/>
<h:commandButton action="#{Page2.button2_action}" binding="#{Page2.button2}" id="button2" style="left: 48px; top: 96px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=2'; document.forms['form1'].submit(); return false;"/>
<h:commandButton action="#{Page2.button3_action}" binding="#{Page2.button3}" id="button3" style="left: 48px; top: 144px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=3'; document.forms['form1'].submit(); return false;"/>
<!-- this is JSF request -->
<!--
<h:commandButton action="#{Page2.button1_action}" binding="#{Page2.button1}" id="button1" style="left: 48px; top: 48px; position: absolute" value="Submit" />
<h:commandButton action="#{Page2.button2_action}" binding="#{Page2.button2}" id="button2" style="left: 48px; top: 96px; position: absolute" value="Submit" />
<h:commandButton action="#{Page2.button3_action}" binding="#{Page2.button3}" id="button3" style="left: 48px; top: 144px; position: absolute" value="Submit" />-->
</h:form>
</body>
</html>
</f:view>
</jsp:root>Page1 Bean
* Page2.java
* Created on June 25, 2005, 11:08 AM
* Copyright user
package webapplication8;
import javax.faces.*;
import com.sun.jsfcl.app.*;
import javax.faces.component.html.*;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
public class Page2 extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
private int __placeholder;
private HtmlForm form1 = new HtmlForm();
public HtmlForm getForm1() {
return form1;
public void setForm1(HtmlForm hf) {
this.form1 = hf;
private HtmlCommandButton button1 = new HtmlCommandButton();
public HtmlCommandButton getButton1() {
return button1;
public void setButton1(HtmlCommandButton hcb) {
this.button1 = hcb;
private HtmlCommandButton button2 = new HtmlCommandButton();
public HtmlCommandButton getButton2() {
return button2;
public void setButton2(HtmlCommandButton hcb) {
this.button2 = hcb;
private HtmlCommandButton button3 = new HtmlCommandButton();
public HtmlCommandButton getButton3() {
return button3;
public void setButton3(HtmlCommandButton hcb) {
this.button3 = hcb;
// </editor-fold>
public Page2() {
// <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
try {
} catch (Exception e) {
log("Page2 Initialization Failure", e);
throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
// </editor-fold>
// Additional user provided initialization code
protected webapplication8.ApplicationBean1 getApplicationBean1() {
return (webapplication8.ApplicationBean1)getBean("ApplicationBean1");
protected webapplication8.SessionBean1 getSessionBean1() {
return (webapplication8.SessionBean1)getBean("SessionBean1");
* Bean cleanup.
protected void afterRenderResponse() {
public String button1_action() throws Exception{
// TODO Following code was replaced by static navigation
getSessionBean1().setId(1);
/* ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
return null;*/
return "case1";
public String button2_action() throws Exception{
// TODO Following code was replaced by static navigation
getSessionBean1().setId(2);
/* ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
return null;*/
return "case2";
public String button3_action() throws Exception{
// TODO Following code was replaced by static navigation
getSessionBean1().setId(3);
/* ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
return null;*/
return "case3";
}page 2
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<jsp:text><![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
]]></jsp:text>
<f:view>
<html lang="en-US" xml:lang="en-US">
<head>
<meta content="no-cache" http-equiv="Cache-Control"/>
<meta content="no-cache" http-equiv="Pragma"/>
<title>Page1 Title</title>
<link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body style="-rave-layout: grid">
<h:form binding="#{Page1.form1}" id="form1">
<h:panelGrid binding="#{Page1.gridPanel1}" id="gridPanel1" style="left: 96px; top: 48px; position: absolute"/>
<f:selectItems binding="#{Page1.radioButtonList1SelectItems1}" id="radioButtonList1SelectItems1"/>
<h:commandButton action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1"
style="left: 384px; top: 120px; position: absolute" value="Submit"/>
<h:commandButton action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1" style="left: 384px; top: 72px; position: absolute" value="Submit"/>
<h:outputLink binding="#{Page1.hyperlink1}" id="hyperlink1" style="left: 480px; top: 216px; position: absolute" value="http://www.sun.com/jscreator">
<h:outputText binding="#{Page1.hyperlink1Text}" id="hyperlink1Text" value="Hyperlink"/>
</h:outputLink>
<h:commandLink binding="#{Page1.linkAction1}" id="linkAction1" style="left: 456px; top: 264px; position: absolute">
<h:outputText binding="#{Page1.linkAction1Text}" id="linkAction1Text" value="Link Action"/>
</h:commandLink>
</h:form>
</body>
</html>
</f:view>
</jsp:root>page2 bean
* Page1.java
* Created on June 25, 2005, 10:52 AM
* Copyright user
package webapplication8;
import javax.faces.*;
import com.sun.jsfcl.app.*;
import com.sun.jsfcl.data.DefaultSelectItemsArray;
import java.util.Vector;
import javax.faces.component.UIComponent;
import javax.faces.component.UISelectItems;
import javax.faces.component.html.*;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
import javax.faces.model.SelectItem;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class Page1 extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
private int __placeholder;
private HtmlForm form1 = new HtmlForm();
public HtmlForm getForm1() {
return form1;
public void setForm1(HtmlForm hf) {
this.form1 = hf;
private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
public HtmlPanelGrid getGridPanel1() {
return gridPanel1;
public void setGridPanel1(HtmlPanelGrid hpg) {
this.gridPanel1 = hpg;
private HtmlCommandButton button1 = new HtmlCommandButton();
public HtmlCommandButton getButton1() {
return button1;
public void setButton1(HtmlCommandButton hcb) {
this.button1 = hcb;
private HtmlOutputLink hyperlink1 = new HtmlOutputLink();
public HtmlOutputLink getHyperlink1() {
return hyperlink1;
public void setHyperlink1(HtmlOutputLink hol) {
this.hyperlink1 = hol;
private HtmlOutputText hyperlink1Text = new HtmlOutputText();
public HtmlOutputText getHyperlink1Text() {
return hyperlink1Text;
public void setHyperlink1Text(HtmlOutputText hot) {
this.hyperlink1Text = hot;
private HtmlCommandLink linkAction1 = new HtmlCommandLink();
public HtmlCommandLink getLinkAction1() {
return linkAction1;
public void setLinkAction1(HtmlCommandLink hcl) {
this.linkAction1 = hcl;
private HtmlOutputText linkAction1Text = new HtmlOutputText();
public HtmlOutputText getLinkAction1Text() {
return linkAction1Text;
public void setLinkAction1Text(HtmlOutputText hot) {
this.linkAction1Text = hot;
// </editor-fold>
public Page1() {
// <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
try {
ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
String id=req.getParameter("id");
if(id!=null)
getSessionBean1().setId(Integer.parseInt(id));
if (getSessionBean1().getId()==1) {
addTextBox();
else if (getSessionBean1().getId()==2) {
addCheckBox();
addRadio();
else if (getSessionBean1().getId()==3) {
addRadio();
// addCheckBox();
} catch (Exception e) {
log("Page1 Initialization Failure", e);
throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
// </editor-fold>
// Additional user provided initialization code
protected webapplication8.ApplicationBean1 getApplicationBean1() {
return (webapplication8.ApplicationBean1)getBean("ApplicationBean1");
protected webapplication8.SessionBean1 getSessionBean1() {
return (webapplication8.SessionBean1)getBean("SessionBean1");
* Bean cleanup.
protected void afterRenderResponse() {
private void addRadio() {
HtmlPanelGrid gridPanel = new HtmlPanelGrid();
UIComponent parent = gridPanel1;
HtmlOutputText outputText = new HtmlOutputText();
outputText.setValue("Some Desc");
outputText.setId("somedesc2");
HtmlSelectOneRadio checkBox = new HtmlSelectOneRadio();
checkBox.setBorder(0);
checkBox.setLayout("pageDirection");
checkBox.setId("a3");
UISelectItems items = new UISelectItems();
DefaultSelectItemsArray objArray =new DefaultSelectItemsArray();
vectDefaultSelectItemsArray.add(objArray);
arrays=(DefaultSelectItemsArray[])vectDefaultSelectItemsArray.toArray(new DefaultSelectItemsArray[vectDefaultSelectItemsArray.size()]);
int size =arrays.length;
arrays[size - 1].clear();
for (int i =0;i<10;i++) {
arrays[size - 1].add(new SelectItem(""+i+"",""+i));
// array.setItems(new String[] {"Yes","No" });
items.setValueBinding("value",getValueBinding("#{Page1.arrays["+(size-1)+"]}"));
checkBox.getChildren().add(items);
gridPanel.getChildren().add(outputText);
gridPanel.getChildren().add(checkBox);
parent.getChildren().add(gridPanel);
private void addCheckBox() {
HtmlPanelGrid gridPanel = new HtmlPanelGrid();
UIComponent parent = gridPanel1;
HtmlOutputText outputText = new HtmlOutputText();
outputText.setValue("Some Desc");
outputText.setId("somedesc1");
HtmlSelectManyCheckbox checkBox = new HtmlSelectManyCheckbox();
checkBox.setBorder(0);
checkBox.setLayout("pageDirection");
checkBox.setId("a2");
UISelectItems items = new UISelectItems();
DefaultSelectItemsArray objArray =new DefaultSelectItemsArray();
vectDefaultSelectItemsArray.add(objArray);
arrays=(DefaultSelectItemsArray[])vectDefaultSelectItemsArray.toArray(new DefaultSelectItemsArray[vectDefaultSelectItemsArray.size()]);
int size =arrays.length;
arrays[size - 1].clear();
for (int i =0;i<10;i++) {
arrays[size - 1].add(new SelectItem(""+i+"",""+i));
// array.setItems(new String[] {"Yes","No" });
items.setValueBinding("value",getValueBinding("#{Page1.arrays["+(size-1)+"]}"));
checkBox.getChildren().add(items);
gridPanel.getChildren().add(outputText);
gridPanel.getChildren().add(checkBox);
parent.getChildren().add(gridPanel);
private void addTextBox() {
HtmlPanelGrid gridPanel = new HtmlPanelGrid();
UIComponent parent = gridPanel1;
HtmlOutputText outputText = new HtmlOutputText();
outputText.setValue("Some Description for Control Text Box");
outputText.setId("somedesc");
HtmlInputText textField = new HtmlInputText();
// textField.setId("textField_"+control.getId());
textField.setId("a1");
HtmlOutputText outputText1 = new HtmlOutputText();
hyperlink1Text.setValue(" ");
hyperlink1Text.setStyleClass("bodyText");
textField.setStyleClass("frmObjects");
gridPanel.setColumns(3);
gridPanel.getChildren().add(outputText);
gridPanel.getChildren().add(hyperlink1Text);
gridPanel.getChildren().add(textField);
parent.getChildren().add(gridPanel);
private DefaultSelectItemsArray array = new DefaultSelectItemsArray();
public DefaultSelectItemsArray getArray() {
return array;
public void setArray(DefaultSelectItemsArray dsia) {
this.array = dsia;
private Vector vectDefaultSelectItemsArray = new Vector();
private DefaultSelectItemsArray[] arrays = new DefaultSelectItemsArray[10];
public DefaultSelectItemsArray[] getArrays() {
return arrays;
public void setArrays(DefaultSelectItemsArray[]dsia) {
this.arrays = dsia;
private UISelectItems radioButtonList1SelectItems1 = new UISelectItems();
public UISelectItems getRadioButtonList1SelectItems1() {
return radioButtonList1SelectItems1;
public void setRadioButtonList1SelectItems1(UISelectItems uisi) {
this.radioButtonList1SelectItems1 = uisi;
private ValueBinding getValueBinding(String expression) {
return FacesContext.getCurrentInstance().getApplication().createValueBinding(expression);
public String button1_action() {
// TODO Replace with your code
return "case1";
}my navigation.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
<navigation-rule>
<from-view-id>/Page2.jsp</from-view-id>
<navigation-case>
<from-outcome>case1</from-outcome>
<to-view-id>/Page1.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>case2</from-outcome>
<to-view-id>/Page1.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>case3</from-outcome>
<to-view-id>/Page1.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/Page1.jsp</from-view-id>
<navigation-case>
<from-outcome>case1</from-outcome>
<to-view-id>/Page2.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>my managed beans xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
<managed-bean>
<managed-bean-name>Page1</managed-bean-name>
<managed-bean-class>webapplication8.Page1</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>SessionBean1</managed-bean-name>
<managed-bean-class>webapplication8.SessionBean1</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>ApplicationBean1</managed-bean-name>
<managed-bean-class>webapplication8.ApplicationBean1</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>Page2</managed-bean-name>
<managed-bean-class>webapplication8.Page2</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
</faces-config> -
Problem with embed font such us some character
Hi i have some problems with a font.
I have this simple code.
[CODE]
package {
import flash.text.AntiAliasType;
import flash.text.TextFormat;
import flash.text.TextFieldAutoSize;
import flash.text.TextField;
import flash.text.Font;
import flash.display.Sprite;
[SWF(backgroundColor="#FFFFFF", frameRate="31", width="700", height="500")]
public class ExampleEmbedFontKoz extends Sprite {
private var mytextfield : TextField;
private var format : TextFormat;
public function ExampleEmbedFontKoz() {
Font.registerFont(AssetManager.kozgopro);
createText();
private function createText() : void {
mytextfield= new TextField();
addChild(mytextfield);
mytextfield.embedFonts= true;
mytextfield.width= 400;
mytextfield.border= true;
mytextfield.autoSize= TextFieldAutoSize.LEFT;
mytextfield.antiAliasType= AntiAliasType.ADVANCED;
format= new TextFormat();
format.font="KozGoPro-Regular";
mytextfield.defaultTextFormat= format;
mytextfield.text= "try embed KozgoPro and write puntualitation.\n i can't view this letters: è é ò à ù ì";
[/CODE]
AssetManager
[CODE]
package {
public class AssetManager {
[Embed(source="KozGoPro-Regular.otf", fontName="KozGoPro-Regular",mimeType="application/x-font", fontWeight="normal", fontStyle="normal" , unicodeRange="U+0021-U+007B,U+0400-U+04CE,U+2000-U+206F,U+20A0-U+20CF,U+2100-U+2183,U+002 0-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+00 7E")]
public static var kozgopro : Class;
[/CODE]
when i write character such us è ò à ì don't view nothing.
I put file online... [url]http://depositfiles.com/en/rmv/6620791594111859[/url]Thank i added this range and now works...
U+00E9,U+00E0,U+00EC,U+00ED,U+00F2,U+00F3,U+00DA,U+00FA,U+00F9
this range are lettere è ò à +ù ì -
HTMLLoader problem with comboBox
hi guys
I'm trying to loader pdf file using XML to retrieve the URL and I have CombBox to list all the files ,and I need to load another file every time I change the silder for the CombBox
the problem is the pdf file load only first time and dosent change if I select another one from the list, I dont know what the the probelm I tried manything like removeChild and I tried to use container but no change, only first time the file loaded
this is the code
cb_list.addEventListener(
SliderEvent.CHANGE,changehandler);
function changehandler(e:Event):void {
var sort1:String=cb_list.value;
var id:String = myXML.tip.(title == sort1)[email protected]();
//trace(id)
var slectedtip = myXML.tip.(title == sort1).fulltip.text();
tit_label.text=myXML.tip.(@ID == id).title .text();
date_label.text=myXML.tip.(@ID == id).date.text();
full_tip.text=myXML.tip.(@ID == id).fulltip.text();
var flashfileURL = myXML.tip.(@ID == id).picURL.text();
swfURL.text=flashfileURL;
var url:String = new String();
url= myXML.tip.(@ID == id).picURL.text().toXMLString();
var requestpdf:URLRequest=new URLRequest(url);
var container:Sprite = new Sprite();
var pdf = new HTMLLoader();
pdf.height=stage.stageHeight-150;
pdf.width=stage.stageWidth-270;
pdf.y=100;
pdf.x=260;
pdf.load(requestpdf);
pdf.addEventListener(Event.COMPLETE, completeHandler);
function completeHandler(event:Event):void {
addChild(pdf);[problem with combobox comes infront of popup window|http://forum.java.sun.com/thread.jspa?threadID=5291468]
Maybe you are looking for
-
Ipod won't sync to my laptop!!!!!!!!!!!
I downloaded songs to my old computer and then i got a lap top so i tried to get all the songs from my ipod to my lap top but it won't let me sync the purchased songs... what do i do?
-
I just reset my computer and re installed itunes 11 and I cant add folder to library but can add files but have 5k songs and that will be a PAIN, and I looked on google and apple for 3hrs now and still cant find a solution. I been having a ipod and i
-
Hi The below mentioned piece of code is throwing a dump in Production system. Is there any way of alternate selection. IF NOT it_pos[] IS INITIAL. SELECT * FROM bseg INTO TABLE it_bseg FOR ALL ENTRIES IN it_pos
-
Installing Oracle 11gR2 Standard Edition on WINDOWS Server 2008R2 with ASM
Hi, I want to setup Oracle 11g DB (11.2.0.2) Standard Edition on Windows Server 2008R2 x64 bit with ASM Instance. I would appreciate if you could suggest me with the following little but important questions. The following link from Oracle doesnt have
-
Hi people! I hava a strange issue in my machine. I'm currently using SapGUI 710 patch level 7 in my PC. I'm trying to use the new editor, but when I set it and try to open any source codes in SE38 or in SE80 (source codes editor in general) the SapGU