Custom Component: Instantiation attempted on a non-constructor.
Hi all, i've created an empty class that extends the Slider
control. it compiles fine, but when i run it, i get the following
error: Error #1007: Instantiation attempted on a non-constructor.
this is how i'm calling it:
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:tix="com.tixsmart.flex.controls.*" >
<tix:SeekBar x="91" y="223" width="424"
height="11"/>
Adobe Newsbot hopes that the following resources helps you.
NewsBot is experimental and any feedback (reply to this post) on
its utility will be appreciated:
Flex 3 - Metadata tags:
This MXML code generates an error because Flex cannot convert
the Strings ' abc ' and ' def ' to a Number. You insert the
[ArrayElementType] metadata tag
Link:
http://livedocs.adobe.com/flex/3/html/metadata_3.html
How to highlight the ticks ina slider - Flex India Community:
Apr 15, 2008 ... There was an error processing your request.
Please try again. Standard view View as tree ... I am new to Flex
and I have created a slider.
Link:
http://groups.google.com/group/flex_india/browse_thread/thread/f0f5b69c171ae859
[#SDK-11271] A Flash Container can only take a Flex container
as a:
See code: <?xml version='1.0'?> <!--
skins/PictureFrame.mxml --> <mx:Application xmlns:mx='
http://www.adobe.com/2006/mxml'
xmlns:myComps='*'>
Link:
http://bugs.adobe.com/jira/browse/SDK-11271
Slider and Text Input Issue - Flex India Community | Google
Groups:
Aug 7, 2008 ... following code is solution for ur problem
<?xml version='1.0' encoding='utf-8'?> <mx:Application
xmlns:mx='
http://www.adobe.com/2006/mxml'
Link:
http://groups.google.com/group/flex_india/browse_thread/thread/8bc9cccc3681711b?fwc=1
HSlider and VSlider controls -- Flex 2:
Flex provides two sliders: the HSlider (Horizontal Slider)
control, which creates ... <mx:Application xmlns:mx='
http://www.adobe.com/2006/mxml'>
<mx:HSlider
Link:
http://livedocs.adobe.com/flex/2/docs/00000542.html
Disclaimer: This response is generated automatically by the
Adobe NewsBot based on Adobe
Community
Engine.
Similar Messages
-
Instantiation attempted on a non-constructor.
I'm new to flex and trying to convert a project from a purely AS3 project to a Flex 4 project. I'm trying to use a custom application class, and getting this strange error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at mx.preloaders::Preloader/initialize()[E:\dev\4.x\frameworks\projects\framework\src\mx\pre loaders\Preloader.as:253]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.x\frameworks\projects\fr amework\src\mx\managers\SystemManager.as:1925]
at mx.managers::SystemManager/initHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\ managers\SystemManager.as:2419]
Here's a minimal example of the code causing this error:
(FancyAppClass.mxml)
<?xml version="1.0" encoding="utf-8"?>
<main:FancyApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:main="main.*">
</main:FancyApplication>
And in FancyApplication.as:
package main {
import spark.components.Application;
public class FancyApplication extends Application {
public function FancyApplication() {
super();
What am I doing wrong? The weirdest part is that sometimes the error goes away only to come back later after some minor code change that seems completely unrelated.Bad news first: I did full reinstalls of flash CS4, CS5 and Flash Builder, and saw no change. Good news: At least I know nothing is wrong with my machine to have corrupted any of those installs, and I found what was causing the problem in the end.
By turning on the -keep-generated-actionscript option, I was able to inspect the SystemManager subclasses the compiler was building for me. It builds one for each "Applicaiton" in your project, and because my actionscript class extends Application, it was included by default in the project's list of application files and the compiler was building a SystemManager sublcass for it as well. However, when building that version (from the actionscript file rather than from the mxml), it was not including the default preloader class in the info() method returned object. The randomness was a result of which "application" was being launched (which came down to which file in the IDE I had selected): If the FancyAppClass (mxml) version was launched, it had the preloader subclass, and everything worked. If the actionscript version was launched, it didn't have the preloader class and caused the error. I have resolved this specific problem by removing the actionscript file from the list of applications in the project config.
So now my question is: Is the behavior of not including the preloader in the info method of the generated SystemManager subclass the intended functionality, or is this a bug? -
TypeError: Error #1007: Instantiation attempted on a non-constructor.
So I am trying out Flex 4 and started so by creating a basic class that extends the spark.components.Application class.
package
import spark.components.Application;
public class SimpleApp extends Application
public function SimpleApp():void
super();
It compiles time but at runtime I am getting this error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at mx.preloaders::Preloader/initialize()
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()
at mx.managers::SystemManager/initHandler()
Anyone have any insight into this? I found this http://forums.adobe.com/message/2724794 but it doesn't really seem to be a whole lot of help in my case.K so I just setup a simple mxml file for it
<?xml version="1.0"?>
<sa:SimpleApp xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:sa="com.simpleapp.*" />
Now it seems to be happy. Thanks. -
package{
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class MainTimeline extends MovieClip{
private var movieArray:Array = new Array(8);
private var myMovieClip:Array = new Array(18);
private var sco:Array = new Array(6);
private var i:Number = 0;
private var rangeX:Number = 0;
private var sumScore:Number = 0;
public function MainTimeline(){
movieArray = [tele01, tele02, tele03, tele04, duck01, monkey01, pig01, boom01]; //Animation MovieClip from library
myMovieClip = [myMovieClip1, myMovieClip2, myMovieClip3, myMovieClip4, myMovieClip5, myMovieClip6]; //Blank MovieClip from library
for (i = 0; i < 6; i++)
var number:Number = Math.floor(Math.random() * 9);
myMovieClip[i] = new movieArray[number]; //create Animation MovieClip to Blank MovieClip
myMovieClip[i].x = rangeX;
myMovieClip[i].y = 90;
sco[i] = 50;
addChild(myMovieClip[i]);
rangeX += 132;
myMovieClip[0].addEventListener(MouseEvent.CLICK, disappear1);
myMovieClip[1].addEventListener(MouseEvent.CLICK, disappear2);
function disappear1(e:MouseEvent):void {
myMovieClip[0].visible=false;
sumScore = sumScore + sco[0];
score.text = sumScore.toString();
function disappear2(e:MouseEvent):void {
myMovieClip[1].visible=false;
sumScore = sumScore + sco[1];
score.text = sumScore.toString();
I am a Newbie of AS3 and I dont't undersatnd why this code can run successfully sometimes, sometimes not and told me "TypeError: Error #1007: Instantiation attempted on a non-constructor."
Please, help me... I try to solve anything. Thank you.Change...
myMovieClip[i] = new movieArray[number];
to
myMovieClip[i] = new Array[number];
OR
myMovieClip[i] = movieArray[number];
I'm not sure of the intention -
Instantiation attempted of a non-constructor???
I'm getting the following error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at Website()[/Design/The Silver Collective/_classes/Website.as:42]
This is line 42:
var top = new top();
package {
import flash.display.*;
import FluidLayout.*;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import gs.*;
import gs.easing.*;
import fl.motion.easing.*;
import com.greensock.*;
import flash.text.AntiAliasType;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
//import flash.text.TextFormat;
//import greensock.*;
import flash.events.MouseEvent;
import flash.events.FullScreenEvent;
import flash.display.*;
import flash.events.*;
import flash.net.URLRequest;
public class Website extends MovieClip {
public function Website() {
/* Set the Scale Mode of the Stage */
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.align=StageAlign.TOP_LEFT;
/* Add the symbols to stage
var bg = new Background();
addChild(bg);
var top = new top();
addChild(top);
var toprightoption = new toprightoption();
addChild(toprightoption);
//var middle = new Middle();
//addChild(middle);
var btmrightfooter = new btmrightfooter();
addChild(btmrightfooter);
/* Apply the alignment to the background
var bgParam = {
x:0,
y:0,
offsetX: 0,
offsetY: 0
new FluidObject(bg,bgParam);
/* Apply the alignment to the top */
var topParam = {
x:0,
y:0,
offsetX:0,
offsetY:0
new FluidObject(top,topParam);
/* Apply the alignment to the toprightoption */
var toprightoptionParam = {
x:1,
y:0,
offsetX: -toprightoption.width - 20,
offsetY: 20
new FluidObject(toprightoption,toprightoptionParam);
/* Apply the alignment to the content
var middleParam = {
x:0.5,
y:0.5,
offsetX: -middle.width/2,
offsetY: -middle.height/2
new FluidObject(middle,middleParam);
/* Apply the alignment to the btmrightfooter */
var btmrightfooterParam = {
x:1,
y:1,
offsetX: -btmrightfooter.width - 10,
offsetY: -btmrightfooter.height -10
new FluidObject(btmrightfooter,btmrightfooterParam);
private var currentlyShowing:MovieClip=null;
public function showModalContent(clip:MovieClip):void {
if (currentlyShowing!=null) {
removeChild(currentlyShowing);
currentlyShowing=clip;
addChild(currentlyShowing);
public function removeModalContent():void {
if (currentlyShowing!=null) {
removeChild(currentlyShowing);
currentlyShowing=null;You need to used different names for the variable and class.
Like var tp = new top(); -
Instantiation attempted on a non-constructor problem
Hi,
I've got the following error in my application: "TypeError: Error #1007: Instantiation attempted on a non-constructor".
I've created a class that represents a 2D Vector. But when I instanciate it inside another class, I get this error.
Here is a little piece of code of my problem:
public class Player extends MovieClip {
private var position:Vector = new Vector();
public function Player() {
// constructor code
public class Vector {
public var xValue:Number;
public var yValue:Number;
public function Vector() {
// constructor code
xValue = 0;
yValue = 0;
These 2 classes are in separated files. The Player's class is a Movie Clip in the library, while Vector's class is just a class file. What can I be doing wrong?Vector is a native top level class in AS3.
-
I have been porting an app from Flex 3.4.x to 4.0.. I have successfully ported the app and its libraries to flex 4.0 (everything build successfully, all the CSS has the new Namespace stuff added, and warnings are down to the same stuff pre-port). I've also removed ALL the references to http://www.adobe.com/2006/flex/mx in any of my mxml files... In short I "think" I have moved everything over to the new mx and fx namespaces. But I still get the following error (which never happend in 3.4 or 3.5 with this same app) when I try to run my flex app.
TypeError: Error #1007: Instantiation attempted on a non-constructor. at mx.preloaders::Preloader/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\preloaders\Preloader.as:253] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1925] at mx.managers::SystemManager/initHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2419]
At this point I am completely stumped.. anyone have any ideas?
Thanks
Josh*Scratches head*
Ok so I did a -keep and checked my ***SystemManager-generated.as the funciton info() was setting the sparkdownload progress just fine
preloader: SparkDownloadProgressBar
and it was importing both ths spark and mx progress bars
import mx.preloaders.DownloadProgressBar;
import mx.preloaders.SparkDownloadProgressBar;
then I checked my link report.. and sure enough the spark preloader was there
<script name="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs\framework.swc(mx.preloaders:SparkDownloadProgressBar)" mod="1263586859699" size="13103" optimizedsize="6977">
as was the mx.preloaders.preloader
<script name="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs\framework.swc(mx.preloaders:Preloader)" mod="1262975731760" size="6770" optimizedsize="4160">
as was the IPreloaderDisplay
<script name="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs\framework.swc(mx.preloaders:IPreloaderDisplay)" mod="1262975731869" size="2113" optimizedsize="508">
what wasn't in my link report was the mx.preloaders.DownloadProgressBar, but it was probably optmized out because it isn't actually ever called...
And I can tell that info() is the one being called the first time through (when the first RSL decompression happens), so that's not it..
Is there a way to figure out what tha second RSL decompression is? It seems to me thats where the issue is.. (from what it looks like (based on width and hight numbers that the first decompression is my application (having my apps height and width) the second decomression is my object tag in my browser (because it has the height and width numbers I am setting there.. (which are different because I am trying to use the scaleMode to make the app scale to fit different sizes)..
Oh and if I haven't said it yet, Thank you very much for your guidence on this.. Its a real headscratcher for me.
Josh -
Error #1007 - attempting to instantiate a non-constructor
I am receiving said message on an actionscript-only project. I tried to reduce the application to a nonsensical example:
package
{ import flash.display.Sprite;
public class zz extends Sprite
public function zz()
var dummies:Array = [];
dummies.push(new dummy());
dummies.push(new dummy());
var newdata:Array = dummy.mixup(dummies);
package
import flash.geom.Point;
public dynamic class dummy extends Array
public function addp(pt:Point):void
this.push(pt.clone());
public static function mixup(dummies:Array):Array
var ret:Array = [];
function local_makeresult():void
{ for(var n:int = 0 ; n < 3 ; n++)
{ var b:dummy = new dummy();
ret.push(b);
local_makeresult();
for(var m:int = 0 ; m < dummies.length ; m++)
{ for(var n:int = 0 ; n < 3 ; n++)
{ var i:int = int(dummies[m].length * Math.random());
var j:int = int(3 * Math.random());
ret[j].push(dummies[m][i]);
return ret;
So the problem class
a) extends array
b) includes a static utility function (converting an array of class objects into another one)
c) that utility function includes nested functions
Tge error message looks like this
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at dummy/mixup/local_makeresult()
at dummy$/mixup()
Does this mean we cannot use nested functions inside static ones?Hi
as I said this is not actual code (several hundred lines) but just a contrived example modelling the application structure. While it is still something different, lets assume that the dummy class represents polygons (so it derives from array and would implement useful methods like finding total length, area, center of gravity).
The static function could be intersection
I am using quite a few nested functions in this project - they have access to local variables of the enclosing function. Without the m I wouldhave to pass in a handful of variables (or an object grouping them together)
I have already noticed that nested functions are a mixed blessing, because there are fewer compile-time checks (such as number and type of arguments). However, they exist, so why shouldn't I use them?
One of the things I stumbled over: when I got the error, I tried one thing ... that did make the code work in the end: I removed the static attribute from the function and changed the main class to call it as a method of the first element of the array (which is certainly making it unreadable) -
Here is the error:
TypeError: Error #1007: Instantiation attempted on a
non-constructor.
at
BitmapButtonExample()[C:\programming\flex\__FlexProfessional\Chap16\BitmapButtonExample.a s:33]
Here is the code:
package{
import flash.display.Bitmap;
import flash.display.SimpleButton;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.filters.ColorMatrixFilter;
public class BitmapButtonExample extends Sprite{
[Ebbed(source="assets/DSCF3515.jpg")]
private var logoClass:Class;
public function BitmapButtonExample(){
if(stage != null){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
var myButton:SimpleButton = new SimpleButton();
var filters:Array = new Array();
var matrix:Array = new Array();
matrix = matrix.concat([-1, 0, 0, 0, 256]); //red
matrix = matrix.concat([0, -1, 0, 0, 256]); //green
matrix = matrix.concat([0, 0, -1, 0, 256]); //blue
matrix = matrix.concat([0, 0, 0, 0, 256]); //alpha
var filter:ColorMatrixFilter = new
ColorMatrixFilter(matrix);
filters.push(filter);
var myBitmap:Bitmap = new logoClass();
var myBitmat2:Bitmap = new logoClass();
myBitmat2.filters = filters;
myButton.upState = myBitmap;
myButton.overState = myBitmat2;
myButton.downState = myBitmat2;
myButton.useHandCursor = true;
myButton.hitTestState = myBitmap;
addChild(myButton);
What is this?
Thanks,
GeneTypo? Ebbed vs Embed
-
Passing arguments to a custom component in the constructor
I would like to know if it is possible to pass arguments to a
custom component in the constructor when I'm instantiating it
within Actionscript. I've not seen anyone do this, so at the moment
I have a couple of public properties defined on the custom
component and then do the following:
var myComponent:TestComponent = new TestComponent();
myComponent.propertyOne = true;
myComponent.propertyTwo = 12;
etc.
Whereas I'd like to do something like:
var myComponent:TestComponent = new TestComponent( true, 12
Any ideas if this is possible?Another approach as opposed to creating init function is to link symbol with autogenerated class (just assign it a class but do not create *.as file for it) and use it just as graphical view with no functionality (well only MovieClip's functionality).
ViewClip.as
public class ViewClip extends MovieClip {
public var view:MovieClip;
public function ViewClip(){
this.view = instantiateView();
this.addChild(view);
protected function instantiateView():MovieClip {
return new MovieClip();
Circle.as
public class Circle extends ViewClip {
public function Circle(scaleX:Number, scaleY:Number) {
super();
override protected function instantiateView():MovieClip {
return new ClassView(); -
Instantiating a Custom Component
I am somewhat new to this concept and I keep thinking about
things the ActionScript 2 way where we can say:
createObject(refObject,instanceName,depth,constructorObject);
I am instantiating custom MXML components using a technique
similar to the following:
var classRef:Class =
flash.utils.getDefinitionByName("Components."+module) as Class;
var d:DisplayObject = new classRef() as DisplayObject;
mainCanvas.addChild(d);
where mainCanvas is a Canvas component on my main stage and d
is a reference to the custom component attached to the mainCanvas.
My question is what is the best practice means to pass data
to d such that it will be available upon instantiation. I am
looking to employ the constructor object concept from attachMovie
and createObject of AS 2.
Thanks in advanceLook up ClassFactory - but what you are doing isn't very
Flex-ish. The better way is to do:
var d:Whatever = new Whatever();
d.property1 = value;
d.property2 = value;
mainCanvas.addChild(d);
This is the way we do it within the Flex framework and is
pretty easy to understand. You might also want to look up the
commitProperties function and override that in your custom
component in case you need to combine or use your property values
while your component is initializing. -
Can I define a constructor for a Custom Component?
I have a custom component which I instantiate through ActionScript. For the sake of clean code, I would like to be able to assign the variables through the constructor like any other class:
var myComp:CustomComponent = new CustomComponent(arg1, arg2, ...);
However, when I try to write a constructor in the Script block for the component, it gives me a compile error telling me that I have multiple constructors:
//In Script tag//
public function CustomeComponent(arg1, arg2 ...):void { ... }
Are we not able to define constructors for Custom Components?If this post helps, please mark it as such.
If you create an array variable in your MXML component, and then set it with myVar="[val1, val2, val3]" in the opening tag of your component, then you basically have a constructor in MXML.
You can use the [Bindable] metadata tag in three places:
Before a public class definition.
The [Bindable] metadata tag makes usable as the source of a binding expression all public properties that you defined as variables, and all public properties that are defined by using both a setter and a getter method. In this case, [Bindable] takes no parameters, as the following example shows:
[Bindable]
public class TextAreaFontControl extends TextArea {}
The Flex compiler automatically generates an event named propertyChange, of type PropertyChangeEvent, for all public properties so that the properties can be used as the source of a data binding expression.
If the property value remains the same on a write, Flex does not dispatch the event or update the property, where not the same translates to the following test:
(oldValue !== value)
That means if a property contains a reference to an object, and that reference is modified to reference a different but equivalent object, the binding is triggered. If the property is not modified, but the object that it points to changes internally, the binding is not triggered.
Note: When you use the [Bindable] metadata tag before a public class definition, it only applies to public properties; it does not apply to private or protected properties, or to properties defined in any other namespace. You must insert the [Bindable] metadata tag before a nonpublic property to make it usable as the source for a data binding expression.
Before a public, protected, or private property defined as a variable to make that specific property support binding.
The tag can have the following forms:
[Bindable]
public var foo:String;
The Flex compiler automatically generates an event named propertyChange, of type PropertyChangeEvent, for the property. If the property value remains the same on a write, Flex does not dispatch the event or update the property.
You can also specify the event name, as the following example shows:
[Bindable(event="fooChanged")]
public var foo:String;
In this case, you are responsible for generating and dispatching the event, typically as part of some other method of your class. You can specify a [Bindable] tag that includes the event specification if you want to name the event, even when you already specified the [Bindable] tag at the class level.
Before a public, protected, or private property defined by a getter or setter method.
You must define both a setter and a getter method to use the [Bindable] tag with the property. If you define just a setter method, you create a write-only property that you cannot use as the source of a data-binding expression. If you define just a getter method, you create a read-only property that you can use as the source of a data-binding expression without inserting the [Bindable] metadata tag. This is similar to the way that you can use a variable, defined by using the const keyword, as the source for a data binding expression.
The tag can have the following forms:
As far as binding, you can add the [Bindable] tag before the class declaration to make bindable all public properties defined as variables, and all public properties defined by using both a setter and a getter method. -
Trouble instantiating custom component
I created a custom component that extends the TileList. The
code is here:
package com.views
import mx.controls.TileList;
public class scrollPane extends TileList{
public function scrollPane(){
dataProvider = [
{label: "item0", data: 0},{label: "item1", data: 1},
{label: "item2", data: 2},{label: "item3", data: 3},
{label: "item4", data: 4},{label: "item5", data: 5},
{label: "item6", data: 6},{label: "item7", data: 7},
{label: "item8", data: 8}];;
visible = true;
I am able to instantiate this control when my default
application is an mxml file but for some reason i cant instantiate
it when my default application is an as file. any
suggestions?It is very difficult to have an application that is not
implemented with an mx:Application as the root. I advise you do not
attempt this.
Tracy -
Custom component and non-primitive types of attributes
Dear programmers
I try to develope a custom UI component that one of its attribute is an ArrayList. For example:
<productFile:Matrix images="#{MyBean.imagesArray}"/>Unfortuanetly I get the following exception:
[Unable to convert string '#{MyBean.imagesArray}' to class java.util.ArrayList for attribute images: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager]: org.apache.jasper.JasperException: Unable to convert string '#{MyBean.imagesArray}' to class java.util.ArrayList for attribute images: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
The attribute images is an ArrayList in the custom component.
I have also specifieded it as an ArrayList in the tld file:
<tag>
<name>Matrix</name>
<tag-class>org.sii.productfilejsf.tags.MatrixTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>images</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<type>java.util.ArrayList</type>
</attribute>
</tag>Does anyone has an idea what can be the problem?
How can I convert the expression?so how will I be able to convert it?Only your converter knows it.
By the way, is your Matrix component fully completed including its children components?
If yes, you should know how to implement a converter, or its equivalent code for them.
For example, in the <h:dataTable> component, if its value attribute points an array of object,
then it is automatically converted to an appropriate DataModel used by its column children.
We may need to see your MyBean bean and related code set, if we have enough time. -
Component instantiated twice??
I'm trying to run an application with a custom component dropped on to it.
Outputting debug info to the app server log shows that the component is being instantiated TWICE when I run the app. ( I only have one instance dropped on the page ).
However this is not the problem. The problem is that the first instance is being created BEFORE the faces context is initialized ( I'm calling FacesContext.getCurrentInstance() in the component constructor. ).
I'm not sure if this is supposed to work like this but its affecting my design as the component has to access and load certain resources as part of its initialization and it cannot do so without getting hold of the context.
Any clues..?Dear Creator Team,
Can someone please point out if I'm trying to do something wrong here.. OR if what I'm trying to say is not clear and requires more explanation?
This is very easy to reproduce - try getting ahold of faces context in a JSF component constructor..
thanks
Maybe you are looking for
-
my printer 6500 office jet says ink system failure help??
-
How to get option select single Values in select options
Hello All, I have a requirement where, in select-options i should avoid the range selection and should have only select single values option. User wanted to give the list of 10000 materials by using copy and paste as we have in normal abap with pase
-
Update from Exchange 2013 SP1 to CU8 error
hi, i've got problem when update to cu8. the file 'c:\program files\microsoft\exchange server\v15\transportroles\agents\hygiene\asdat.msi' is not a valid installation package for the product microsoft exchange 2007 standard anti-spam filter updates.
-
Restore Factory Setings - F10 Not Working on Vaio VPCF232FX/B
Like i said in the Title post. I'm up to date with all drivers. I do a back-up on my flash driver, also the Recovery partition are intact i never touch it. Isn't first time when i make a restore on factory settings, but its first time when not work.
-
Lightroom 5: my five star collection keeps making copies of the same photo in the collection
when I rate a photo with five stars it goes into the five star collection which I want, but when I close out LTR5 and come back later there are two of each, sometimes three or four of the same photo even though I haven't opened up that photo or colle