Property.state doesn't work
Hallo everybody. I am using Flash Builder not since much time but i learned basilar things.. One of these things is that if i have a flex component and in my applications i have 2 states, state1 and state2, if i want to change a property (es. width) of that component in state1 and i wish it can be different in state2 i can write like this:
width.state1
width.state2
This works always. Now, i just created my own component. The name of this component is "mioPannello":
<?xml version="1.0" encoding="utf-8"?>
<s:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
public var rett_titolo_bottom:int;
public var rett_centrale_top:int;
public var rett_centrale_bottom:int;
public var font_label:Number;
]]>
</fx:Script>
</s:Panel>
As you can see, i just created my 4 properties which i will use in my own skin. The name of this skin is "mioPannello_skin":
<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%" bottom="0" creationComplete="aCreazioneCompletata(event)">
<s:states>
<s:State name="normal" />
<s:State name="disabled" />
</s:states>
<fx:Metadata>
[HostComponent("componenti.mioPannello")]
</fx:Metadata>
<fx:Script>
<![CDATA[
import componenti.mioPannello;
import mx.collections.ArrayList;
import mx.events.FlexEvent;
[Bindable]
public var font_label:Number;
public function aCreazioneCompletata(event:FlexEvent):void
this.rett_titolo.bottom = hostComponent.rett_titolo_bottom;
this.rett_centrale.top = hostComponent.rett_centrale_top;
this.rett_centrale.bottom = hostComponent.rett_centrale_bottom;
this.font_label = hostComponent.font_label;
]]>
</fx:Script>
<s:Rect id="rett_sfondo" height="90%" width="100%" bottom="0">
<s:fill>
<s:SolidColor color="#BDCCD4"/>
</s:fill>
</s:Rect>
<s:Rect id="rett_centrale" height="100%" width="90%" horizontalCenter="0">
<s:stroke>
<s:SolidColorStroke caps="none" color="#FFFFFF" joints="miter" miterLimit="10" weight="1"/>
</s:stroke>
</s:Rect>
<s:Rect id="rett_titolo" alpha="0.71" height="100%" width="80%" top="0" horizontalCenter="0">
<s:fill>
<s:SolidColor color="#E8EBF2"/>
</s:fill>
</s:Rect>
<s:Label id="titleDisplay"
top="5"
color="#FFFFFF"
fontWeight="bold"
fontFamily="Myriad Pro" fontSize="{font_label}"
horizontalCenter="0"/>
</s:SparkSkin>
When i call my component in my application, i can set property values in this way:
<componenti:mioPannello width="100%" height="100%" title="panel title" skinClass="skins.mioPannello_skin" rett_titolo_bottom="15" rett_centrale_bottom="10" rett_centrale_top="30" font_label="12"/>
Everything works good if i have just 1 state, but if, in my application i have 2 states, state1 and state2, the code doesn't work. So, if i write:
<componenti:mioPannello width="100%" height="100%" title="panel title" skinClass="skins.mioPannello_skin" rett_titolo_bottom.state2="5" rett_titolo_bottom="15" rett_centrale_bottom="10" rett_centrale_top="30" font_label="12"/>
rett_titolo_bottom.state2="5" it should change in state2 (or not??) but it doesn't change... It takes always the value 15 as it is in main state.
Why this thing happen??.. I though i just created a normal property... How can i change that property in each different state. I hope you understand my problem and can help me..
Sry for bad english
Thx for all
Max
Ok, i solved my problem. The problem was that i was applying my properties in the CreationComplete event but now i changed it and i applied the new value through render Event and it works fine.
Thx a lot CoreyRLucier
Max
Similar Messages
-
If statement doesn't work in JPanel
Hi everybody.
I'd like somebody tell me the reason why the "if" statement doesn't work in a Jpanel but works in a Japplet. I'm including the fragments of code that are relevant to the question.
Thanks in advance.
public class Applet_INVEN extends JApplet {
jTabbedPane jTabbedPane1 = new JTabbedPane();
Panel_1 p_1 = new Panel_1();
JLabel jLabel1 = new JLabel();
JTextField jTextField1 = new JTextField();
JButton jButton1 = new JButton();
void jButton1_actionPerformed(ActionEvent e) {
if (jTextField1.getText() != "0") //------Executes when the condition is true
jLabel1.setText("bingo");
public class Panel_1 extends JPanel {//------INSIDE a JPANEL
JTextField jTextField1 = new JTextField();
JTextField jTextField2 = new JTextField();
JTextField jTextField3 = new JTextField();
JButton jButton1 = new JButton();
void jButton1_actionPerformed(ActionEvent e) {
jTextField2.setText(jTextField1.getText()); //----Ever executes, of course!
if(jTextField1.getText() != "0") //----Never executes, even when
jTextField3.setText("ojo"); //----the condition is true!You shouldn't use the != operator to test equality of Objects. Use Object.equals() instead.
if (jTextField1.getText() != "0")
should be
if ( ! jTextField1.getText().equals("0"))
or better:
if ( ! "0".equals(jTextField1.getText())) <-- avoids null pointer exception. -
In day 4, video # Creating "pages" with Flex states doesn't work
i can't open video training http://www.adobe.com/devnet/flex/videotraining in day 4. it's name( Creating "pages" with Flex states ) doesn't work, it report error. supporter can look it and solve problem
Hi,
I'm also pacing the same issue. if click on the video in the Day 4 exercises. i don't know, what is the issue with that particular videos. and also pacing one more issue that design mode is not showing in my flash builder 4. if u have any ans plz help me out. PFA -
"Merge into" statement doesn't work
Hi Reader,
It seems that in some of our installed machines merge into statement doesn't;t work. We've already experienced this issue on databases installed within virtual machines, but also found on other configurations sporadically.
Using statement match a single/multiple records (according required logic)
statement:
MERGE INTO RNCATEGORIES CV
USING dual ON
( CV.DESIGNCENTERID = in_DESIGNCENTERID
AND CV.CADPACKAGENAME = in_CADPACKAGENAME
WHEN MATCHED THEN
UPDATE SET
PKGCATEGORYID = in_PKGCATEGORYID,
UserPackageType = in_UserPackageType
WHEN NOT MATCHED THEN
INSERT VALUES ( in_DESIGNCENTERID,
in_CADPACKAGENAME, in_PKGCATEGORYID,in_UserPackageType );
Table script:
CREATE TABLE RNCATEGORIES
DESIGNCENTERID RAW(16) NOT NULL,
CADPACKAGENAME NVARCHAR2(64) NOT NULL,
PKGCATEGORYID RAW(16),
USERPACKAGETYPE NVARCHAR2(64)
PK_RNCATEGORIES PRIMARY KEY (DESIGNCENTERID, CADPACKAGENAME)
Thanks in advance,
AmirAfter creating the table, your merge statement gives me
SQL> MERGE INTO RNCATEGORIES CV
2 USING dual ON
3 ( CV.DESIGNCENTERID = in_DESIGNCENTERID
4 AND CV.CADPACKAGENAME = in_CADPACKAGENAME
5 )
6 WHEN MATCHED THEN
7 UPDATE SET
8 PKGCATEGORYID = in_PKGCATEGORYID,
9 UserPackageType = in_UserPackageType
10 WHEN NOT MATCHED THEN
11 INSERT VALUES ( in_DESIGNCENTERID,
12 in_CADPACKAGENAME, in_PKGCATEGORYID,in_UserPackageType );
AND CV.CADPACKAGENAME = in_CADPACKAGENAME
ERROR at line 4:
ORA-00904: "IN_CADPACKAGENAME": invalid identifierwhich is about what I expected. The USING clause requires a select statement, not just a table name. It looks to me like this merge statement is in some kind of stored procedure, and that the in_XXX are variables passed to that procedure. If this is correct, then your merge needs to be more like:
MERGE INTO rncategories cv
USING (SELECT in_designcenterid dcid, in_cadpackagename cpn,
in_pkgcategoryid pcid, in_userpackagetype upt
FROM dual)
ON (cv.designcenterid = dcid and
cv.cadpackagename = cpn)
WHEN MATCHED THEN
UPDATE SET
pkgcategoryid = pcid
userpackagetype = upt
WHEN NOT MATCHED THEN
INSERT VALUES (dcid, cpn, pcid, upt);John -
Why this statement doesn't work?
I have two table job and job_status,I use Page Process try to insert records to job_status, but the select query doesn't work, it display all the job in job table didn't filtered out the job matching the query, do someone know why? Any suggestion will be appreciated!
DECLARE
BEGIN
FOR x IN (
SELECT
JOB_SEQ,
PRIMARY
FROM JOB
WHERE ((RUN_DATES like '%'||:P6_WDAY||'%')
or (RUN_DATES like '%'||:P6_DD ||'%')
or (RUN_DATES like ''|| 0 ||'')))
LOOP
INSERT INTO JOB_STATUS(JOB_SEQ, OPERATOR,RUN_DATE) VALUES
(x.JOB_SEQ,x.PRIMARY,to_date(:P6_DATE,'YYYYMMDD'));
END LOOP;
END;ops wrong typed
try
DECLARE
BEGIN
FOR x IN (
SELECT
JOB_SEQ,
PRIMARY
FROM JOB WHERE
((RUN_DATES like CHR(39)||'%'||:P6_WDAY||'%'||CHR(39))
or (RUN_DATES like CHR(39)||'%'||:P6_DD ||'%'||CHR(39))
or (RUN_DATES like ''|| 0 ||'')))
LOOP
INSERT INTO JOB_STATUS(JOB_SEQ, OPERATOR,RUN_DATE) VALUES
(x.JOB_SEQ,x.PRIMARY,to_date(:P6_DATE,'YYYYMMDD'));
END LOOP;
END; -
Why Statement doesn't work?
In my jsp page,I wrote:
<%Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn=DriverManager.getConnection("jdbc:microsoft:sqlserver://CE800:1181;DatabaseName=supermarket;user=sa;Password=");
Statement stmt=conn.CreateStatement("SELECT * FROM dic_ware_class");
ResultSet rs=stmt.executeQuery();
%>
But tomcat report some exceptions:
Error: 500
Location: /myjsp/test.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
C:\tomcat\work\localhost_8080%2Fmyjsp\_0002ftest_0002ejsptest_jsp_0.java:63: Ambiguous class: java.beans.Statement and java.sql.Statement
Statement stmt=conn.createStatement("SELECT * FROM dic_ware_class");
^
C:\tomcat\work\localhost_8080%2Fmyjsp\_0002ftest_0002ejsptest_jsp_0.java:63: Wrong number of arguments in method.
Statement stmt=conn.createStatement("SELECT * FROM dic_ware_class");
^
2 errors, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:536)
If I use PreparedStatement,it works,who can tell me reason,thanks a lot.The select statement does not go into the createStatement(). it goes in the executeQuery(). Also you must be importing both the java.bean.* package and java.sql.* package. Since they both contain a Statement class, you are getting an ambigious answer. You need to prefix java.sql. to the statement class ex. java.sql.Statement stmt = ....
-
SimpleFormSelect Tag Property 'Size' Doesn't Work!
Hello, I have created a JSP that uses the SimpleFormSelect Tag, and I have a problem with the size property of it:
<SimpleForm name="testForm" target="xxx.jsp" method="post">
<SimpleFormSelect name="testSelect" displaymode="list" size="10">
<SimpleFormOption value="1">number 1</SimpleFormOption>
<SimpleFormOption value="2">number 2</SimpleFormOption>
<SimpleFormOption value="3">number 3</SimpleFormOption>
</SimpleFormSelect>
</SimpleForm>
This should display a list box that is 10 items high, but the height remains at 1. What am I doing wrong?Try using multiple="true". Look at the following example: http://otn.oracle.com/docs/products/ias/doc_library/90200doc_otn/wireless.902/a90485/xml4.htm#1033402
Kalle -
My Wifi doesn´t work. The Wifi icon on top menu bar states there is no hardware connected. How can I resolve this as previously Wifi connection worked perfectly. Is this something that to do with the computer hardware? Please advise.
SkyDaughter29 wrote:
My current situation: I have soooo many texts on my iphone and I haven't deleted many because I need the information contained in them for future reference and for legal purposes. I would really like to find a means and way to save them other than on the phone itself. I've done searches for various apps yet I'm not finding what I think I would need. It appears Apple does not sync the texts between the iphone and my MacBook Pro.
Try the computer apps PhoneView (Mac) or TouchCopy (Mac & PC):
http://www.ecamm.com/mac/phoneview/
http://www.wideanglesoftware.com/touchcopy/index.php
Best of luck. -
Create Slideshow Display sequence property doesn't work
Create Slideshow Display sequence property doesn't work,
I have selcted random but the slideshow always plays in order. I searched the scripts for any logi related to this and other properties set, but cannot find any refernce to any of these propoerties:
transType='Random' transTime='1' firstImage='1' dispSequence='1'>
How can I make the slideshow start with a random image each time?
thanks
sHello,
I am back on this question, about how to get the non-flash version of the Creatr Slideshow v1.6 to display the images in a random sequence. Can anyone point me in the right direction, please?
thanks
juno -
Preview App Saved State Removal Doesn't Work
I'm having trouble with my Preview App in Mavericks. I evidently had too many windows opewn and it became unresponsive, so I had to use Force Quit. Relaunching opened all the previous windows and the problem was repeated. After searching the Communities, I learned that the Saved State folder for Preview should be deleted. Then, I couldn't find the Saved State folder, and, after more time searching, I learned it's hidden in Library of the Go menu (Thanks a lot, Apple). I trashed the Saved State folder for Preview, but nothing changed: It STILL opens up all the previous windows. I can't even wrap my brain around how this is possible!
The machine is a 2010 Mac Pro running Mavericks 10.9.1
Any help would be appreciated.Richard Benson2 wrote:
Edit: I should have said "Zoom to Fit doesn't work as expected"
I was hoping to use Preview as a proper replacement for Acrobat but this is really aggravating. The zoom to fit only seems to use the horizontal Preview document space to determine the viewed file's fitment. Which of course is useless if you want to view the whole file in totality at the maximum space available. I simply want 100% of the viewable document area to maximize to the given space, not just 100% horizontal. As it stands there doesn't seem to be a way to do that other than using the scale field and just trial and error the percentage until you get the result...
Any tips, tricks, workarounds?
Message was edited by: Richard Benson2 for clarity
I have had the same issue for over a year, and it's very aggravating, as I used to use it all the time, and still need to, but it just won't work. It will work if an image is too large, but not when it's too small, and it take multiple "zoom ins", and then you can't get it to fit right! I don't know Apple hasn't fixed this key flaw.... No OS update yet, has fixed it. -
Setting Chart type property of iSPC chart dynamically doesn't work
Hi all,
I am trying to set the chart type property (XBAR, MEDIAN etc..) of iSPC chart dynamically from my html page.
This is the code that I used.
var chart_obj = document.iSPCChart.getChartObject();
chart_obj.setChartType("MEDIAN");
iSPCChart is my Applet name.
But the code doesn't seem to work.
The chart is always of the type that I have set in the iSPC display template.
Can someone help me in this regard?
Thanks a lot.
Regards,
M.SubathraM,
Even though that method shows up in the script assistant and the docs it really doesn't work.
Just swap out the display template for one saved with the desired type:
document.iSPCChart.setDisplayTemplate("Folder/MedianChart");
document.iSPCChart.updateChart(true);
With all of the alarm rules, colors, limits, settings, etc. it is not likely that you will have the same view (display template) that applies to every SPC chart type.
There is also a predelivered example of an SPC Chart that uses an iframe and an irpt to dynamically pass the chart type (along with other settings) you can reference: http://<servername>/Lighthammer/Samples/SPC/Servers.irpt
Regards,
Jeremy Good -
SoftKeyboardType property of StageText : some values doesn't work on Android
Hello,
on my Galaxy Nexus Android 4.2.2, when I use the softKeyboardType property of StageText :
"number" and "email" work,
but "punctuation", "url", and "contact" doesn't work.
http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/text/StageTe xt.html#softKeyboardType
Why some values doesn't work ?
I need the constant "punctuation", please help.
ThanksHi,
Thank you for your bug report. We are able to reproduce the issue. Could you please open a new bug report on this over at bugbase.adobe.com? Once the bug has been added would you mind posting back with the URL so that others affected can add their votes and comments?
Thanks once again for reporting this.
-Nimit -
I reinstalled acrobat 8 on my computer but when I try to print to a pdf it states that the program isn't activated. I tried to install and reinstall it but it still doesn't work. It shows that it is activated. I tried to deactivate and reactivate but that doesn't help either. Everything else seems to work.
Hi tspcat,
What operating system are you using, and what version? You may be running into a compatibility issue between your older version of Acrobat and the OS that you're running.
Please let us know a bit more about your setup, so we can get to the bottom of this printing issue.
Thanks,
Sara -
My MacBook's keyboard and track pad doesn't work property.
My MacBook's keyboard and track pad doesn't work property after update to snow leopard. It's work fine while still using is 10.4. Please help me!
Try Resetting the System Management Controller (SMC)
-
I am trying to connect my new nano to my iTunes account. I keep getting msg "ipod detected but not identified properly. disconnect and reconnect. if problem persists uninstall/reinstall iTunes". I've uninstalled/ reinstalled iTunes 6 times but keep getting the same msg.
when installing iTunes I get a pop-up "iTunes helper error" check access. with options to abort, retry, ignore. retry doesn't work. ignore installs iTunes but it doesn't recognize my nano. abort shuts down the download.
how do I fix these problems??Hello, KenaiK9.
Thank you for visiting Apple Support Communites.
I see you are receiving an error and have processed some troubleshooting steps with the issue persisting. There are just a couple more in the article below that covers this specific error.
iPod nano: Error message saying that iPod could not be identified properly
Cheers,
Jason H.
Maybe you are looking for
-
Limiting or control for Residual payment with reason codes
Hi FI Gurus, When we are received or making payment to customer or vendor, sometimes we need to clear the invoice by receiving or making payments with small differences through residual payment. Is there any control for limiting residual payment. Let
-
Error #2004 when displaying tooltip in popup on FP 10.1
I'm posting a bug we're seeing here in hopes of someone seeing this will know what may be causing it, know how to fix it (presumably someone from Adobe), or have some better ideas on recreating in a simple test case. Here is the bug: https://bugs.ado
-
Lost Locale problem with Struts/Validator Plugin client side validation
Has anyone else had problems losing the locale in the generated javascript ? With the following tiles def and layout (nmLayout.jsp) I can get the locale from the browser OK with <html:html locale="true"> and it works ok for imported text (picking up
-
Multiple Partition in Windows XP.
Is it possible to create multiple partitions in windows XP?
-
Aperture quits during Import when Photostream enabled
Whenever I enable Photostream, Aperture quits a few seconds after it starts importing from Photostream. This occurs even with the latest Lion update and the latest Aperture date. I have tried repairing, rebuilding but still crashes. Once it starts do