How to get treedata correctly
Hi all, i am using apache tomahawk tree2 component and i get the tree item from DB. The code like:
public TreeNode getTreeData() {
List list = getMenuList();
TreeNode treeData = new TreeNodeBase("foo-folder", "Inbox", false);
Iterator it = list.iterator();
HashMap menuTable = new HashMap();
while (it.hasNext()) {
Eosmenu item = (Eosmenu) it.next();
String label = item.getMenuLabel();
boolean isLeaf = item.getIsLeaf() != null
&& item.getIsLeaf().equalsIgnoreCase("Y");
int level = item.getMenuLevel();
String menuId = item.getMenuId();
String parentsID = item.getParentsId();
TreeNodeBase node = new TreeNodeBase();
if(isLeaf){
node.setType("document");
}else{
node.setType("bar-folder");
node.setDescription(label);
node.setLeaf(isLeaf);
menuTable.put(menuId, node);
if (level == 1) {
treeData.getChildren().add(node);
} else {
TreeNodeBase pItem = (TreeNodeBase) menuTable.get(parentsID);
if (pItem != null)
pItem.getChildren().add(node);
return treeData;
}This works well only when the items are in the front of their chirdren. How to let it works correctly when the data in the database like :
id------menuid-------menuname------menulevel------parentid
1----------b---------------bb-------------------2------------------a
2----------a---------------aa-------------------1------------------0
anybody help me.
Similar Messages
-
The dates my photos were taken are not incorrect. Any suggestions on how to get the correct dates back?
Thank you Winston. This works and I can adjust several photos at the same time.
-
How to get the correct size of the loaded swf file?
final public class main extends Sprite
public function main()
loaderInfo.addEventListener(Event.COMPLETE, _onLoadCompleted);
private function _onLoadCompleted(event: Event): void
var tw: int = stage.width;
var th: int = stage.height;
var tsw: int = stage.stageWidth;
var tsh: int = stage.stageHeight;
Above is my simple as3 project in flex builder 3.
My screen resolution is 1920*1080, when debugging, the swf is stretched to the full client area of the IE, but the stage.stageWidth is 500 and the stage.stageHeight is 375, both the stage.widht and stage.height are 0, who can tell me why and how to get the right size of the swf file, named the client area size of the IE in this situation?
Thanks very much!The HTML wrapper might resize the SWF later, so wait a frame and check stageWidth/stageHeight again.
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui -
How to get the correct value from check box
hi guys,
here is a program to read data from IKPF.
with the user tick on the check box, the program will retrive
corresponding records based on the inventory counted (zstat) status.
however i don't get the correct output with the following selection.
Please advise where is going wrong. Thank you.
IF ph_ncnt = 'X'.
v_zstat1 = SPACE.
ENDIF.
IF ph_pcnt = 'X'.
v_zstat2 = 'A'.
ENDIF.
IF ph_acnt = 'X'.
v_zstat3 = 'X'.
ENDIF.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
b~menge into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat3 OR
a~zstat = v_zstat2 OR
a~zstat = v_zstat1 )
and a~gjahr = p_gjahr.hi guys,
i'll use the following to get the desire result. This is a bit "stupid" but at least it gives me the correct result.
IF ph_ncnt = 'X'.
v_zstat1 = SPACE.
ENDIF.
IF ph_pcnt = 'X'.
v_zstat2 = 'A'.
ENDIF.
IF ph_acnt = 'X'.
v_zstat3 = 'X'.
ENDIF.
IF ph_ncnt = SPACE AND ph_pcnt = SPACE
AND ph_acnt = SPACE.
message I799(SA) with 'Which data to print?'.
stop.
ELSEIF ph_ncnt = 'X' AND ph_pcnt = 'X'
AND ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~gjahr = p_gjahr.
ELSEIF ph_ncnt = 'X' AND ph_pcnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat1 OR
a~zstat = v_zstat2 )
and a~gjahr = p_gjahr.
ELSEIF ph_ncnt = 'X' AND ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat1 OR
a~zstat = v_zstat3 )
and a~gjahr = p_gjahr.
ELSEIF ph_pcnt = 'X' AND ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat2 OR
a~zstat = v_zstat3 )
and a~gjahr = p_gjahr.
ELSEIF ph_ncnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~zstat = v_zstat1
and a~gjahr = p_gjahr.
ELSEIF ph_pcnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~zstat = v_zstat2
and a~gjahr = p_gjahr.
ELSEIF ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~zstat = v_zstat3
and a~gjahr = p_gjahr.
ENDIF. -
How to get a correct date format
Hi Experts,
I fetched a record from the table KALV. Here its showing the date format as DD.MM.YYYY. But in my internal table and my output its showing YYYYMMDD.
How to solve this?
Actually this report needs to show the output as per the user's format. Because may have different format. Accoriding to there format it should show the output.
How todo this?
Anyone guide this?
Mohana
Moderator Message: Basic Question.
Edited by: kishan P on Feb 3, 2011 4:14 PMHere's a sample of the code:
[NSDateFormatter setDefaultFormatterBehavior:NSDateFormatterBehavior10_4];
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setDateStyle:NSDateFormatterShortStyle];
NSDate *date = [ dateFormatter dateFromString:@"7/4/2008" ];
NSLog(@"string from date %@: %@ for locale %@", date, [dateFormatter stringFromDate:date], [[dateFormatter locale] localeIdentifier]);
(the same code without the messed up forum syntax is at http://pastebin.com/f695ef95b)
When I set my region (in the International system preferences) to be United States, it prints:
2008-08-14 20:20:31.117 Date Difference[17226:10b] string from date 2008-07-04 00:00:00 -0400: 7/4/08 for locale en_US
And when my region is United Kingdom, it prints:
2008-08-14 20:19:23.441 Date Difference[17199:10b] string from date 2008-04-07 00:00:00 -0400: 07/04/2008 for locale en_GB
It looks like the NSDateFormatter is insensitive to the change of regions. Notice that the raw printing of the date is properly switching with the region, though.
What do I have to do to get the NSDateFormatter to respect the region setting? -
How to get the correct stored procedure in oracle
Hi sir,
i am having one stored procedure which i converted from sql it's compiled successfully.
create or replace
PROCEDURE Spvalidateholiday1
v_pidate1 IN Date DEFAULT NULL ,
v_piEmpid IN VARCHAR2 DEFAULT NULL ,
v_pidate2 IN Date DEFAULT NULL ,
v_poRetVal OUT Number
--RETURN NUMBER
AS
v_date3 VARCHAR2(20);
v_date4 VARCHAR2(20);
v_date5 VARCHAR2(40);
v_date6 VARCHAR2(40);
v_scode VARCHAR2(10);
v_dayoff1 VARCHAR2(20);
v_dayoff2 VARCHAR2(20);
BEGIN
v_date5 := To_Char(To_Date(v_pidate1,'YYYY-MM-DD','D'));
v_date6 := To_Char(To_Date(v_pidate2,'YYYY-MM-DD','D')) ;
SELECT Shift_Code
INTO v_scode
FROM Employee
WHERE Emp_ID = v_piEmpid;
SELECT WeeklyOff1
INTO v_dayoff1
FROM Shift
WHERE Shift_Code = v_scode;
SELECT WeeklyOff2
INTO v_dayoff2
FROM Shift
WHERE Shift_Code = v_scode;
SELECT dayid
INTO v_date3
FROM Weekly
WHERE dayss = v_dayoff1;
SELECT dayid
INTO v_date4
FROM Weekly
WHERE dayss = v_dayoff2;
--select @date3=dayid from Weekly w join Site_Param s on w.dayss=s.WeeklyOff1
--select @date4=dayid from Weekly w join Site_Param s on w.dayss=s.WeeklyOff2
IF ( v_date5 = v_date3
OR v_date6 = v_date4
OR v_date4 = v_date5
OR v_date3 = v_date6 ) THEN
BEGIN
v_poRetVal := 0 ;
END;
ELSE
BEGIN
v_poRetVal := 1 ;
END;
END IF;
RETURN; --v_poRetVal;
END;
but getting error:
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'SPVALIDATEHOLIDAY1' ORA-06550: line 1, column 7: PL/SQL: Statement
could u check the stored procedure?
thanksHi sir,
i am calling it my application
that is used like this
Dim hshParam As New Hashtable
hshParam.Add("Empid", '00000002')
hshParam.Add("date1", '2012-10-25')
hshParam.Add("date2", '2012-10-27')
intRetProc = objDataTier.ExecuteStoredProcedureWithReturnT("Spvalidateholiday1", hshParam)
and here is this method written:
Public Function ExecuteStoredProcedureWithReturnT(ByVal sStroredProcedureName As String, ByVal phshTbl As Hashtable) As Integer
Dim cmdCommand As OracleCommand
Dim prmParmOutput As OracleParameter
Dim pParam As IDictionaryEnumerator = phshTbl.GetEnumerator
Dim sKey As String, sValue As String
Try
ExecuteStoredProcedureWithReturnT = True
OpenDbConnection()
cmdCommand = New OracleCommand(sStroredProcedureName, conConnection)
cmdCommand.CommandType = CommandType.StoredProcedure
cmdCommand.CommandTimeout = 0
While pParam.MoveNext
sKey = "v_pi" & pParam.Key
sValue = pParam.Value
cmdCommand.Parameters.Add(New OracleParameter(sKey, sValue))
End While
prmParmOutput = New OracleParameter
cmdCommand.Parameters.Add(New OracleParameter("v_poRetVal", SqlDbType.Int)).Direction = ParameterDirection.Output
' If
cmdCommand.ExecuteNonQuery()
ExecuteStoredProcedureWithReturnT = CInt(cmdCommand.Parameters("v_poRetVal").Value)
Catch ex As Exception
ExecuteStoredProcedureWithReturnT = 2
Throw ex
End Try
End Function
now tell me is it correct? -
How to get the correct client certificate used in the two way ssl
how to export the certificate in browser to the correct client certificate format needed by the WLSSSLAdaptor?
I can export the certificate in browser to p12 or pfx format, but how to retrieve the private key from it and convert to PKCS#8?
anyone did this before?
ThanksHi,
Use the event after_user_command.When the user clicks any other buttons in the toolbar,this event will be triggered after the processing and you can handle the sub-total for % columns here.
Regards,
Archna Raja -
How to get the correct length...removing appended extra ascii characters
I have a table fs_lg_partgroups, having the columns description,subgroupname.
I have a query like this..
select description,length(description) from fs_lg_partgroups where subgroupname='FORMULA226';
Then i got the output as
formula226 and the length is 42. Even though there are 10 characters only.
I came to know that some ascii characters are appended to description values, so it is showing the length like this.
But i don't know how to remove those ASCII characters from description column for all rows to get the exact length.
Please can u help me..If you have used char data type then use varchar2 datatype instead of char datatype for description column.
Learn about char and varchar2 datatypes here.
http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c13datyp.htm#7223 -
Itunes 11, audio books, how to get a correct sorted display?
I have some audio books ripped from CDs. The title have a track number (of a certain CD) and have a CD number. Track 3 of 5, CD 2 of 6. Unfortunately in the audio book view the titles for an audio book are not sorted by CD and then by track number. First should be all tracks of CD 1 in order, then of CD 2, and so on. In list view the sort order is correct. But not in the new audio book view.
Is there a way to tell iTunes 11 to sort the titles of an audio book in the correct order?I've got the same issue with all my 100% correct tagged multi-disc Audiobooks here.
With iTunes 11 it isn't possible to play this kind Audiobooks in correct order. -
How to get the correct sql command in oracle?
Hi sir,
i am using this query in sql that is :
SELECT C.*,ISNULL(P.Comp_Name,'') + ' (' + ISNULL(P.Comp_ID,'') + ')' Parent FROM Comp_Master C LEFT JOIN Comp_Master P ON C.Parent_ID = P.Comp_ID Where C.Comp_ID='004'
so i am getting in parent column value like this: "PARIS GROUP (001)"
but the same command i converted in sql developer that is:
SELECT C.* ,NVL(P.Comp_Name, ' ') || ' (' || NVL(P.Comp_ID, ' ') || ')' as Parent FROM Comp_Master C LEFT JOIN Comp_Master P ON C.Parent_ID = P.Comp_ID WHERE C.Comp_ID ='004'
but not getting in parent column value its coming only ( )
help me.
thanksWelcome to Oracle.
It has manuals.
http://tahiti.oracle.com/
Choose your version, which you continue to keep a mystery
E.g.
http://www.oracle.com/pls/db112/homepage
Including Oracle SQL syntax
http://docs.oracle.com/cd/E11882_01/server.112/e26088/toc.htm
Which you will find useful since Oracle does not run Microsoft SQL as you continue to find over and over again.
And there is a 2 day getting started as a developer guide, which you appear to desperately need,
http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm
If you have any specific questions about anything you read in there, come back in a couple of days after you have finished reading them. -
Urgent Please regarding how to get the correct name from it,
I have asome input values say {a=1,b=2,c=3,d=4} in bag A .Now I need to display the name "a" in one column of the table and its value "1" in another column in a jTable so can some one help me out as I have to turn in the stuff tomorrow.
Thanks in advance.I have asome input values say {a=1,b=2,c=3,d=4} in
bag A .Now I need to display the name "a" in one
column of the table and its value "1" in another
column in a jTable so can some one help me out as I
have to turn in the stuff tomorrow.
Thanks in advance.Looks like you have spent too much time in the pub! The only way you will get this done is if someone does it for you. Since your specification is so poor (you don't say what form your bag takes) I suspect nobody will even attempt to do it for you.
Cut your losses. Go back to the pub and accept that you will fail this particular assignment.
P.S. Start the next assignment in plenty of time.
P.P.S. Marking something as 'urgent' is normally counter productive. -
How to get the correct result when I access mxml file in address bar in IE?
os: windows xp
web server: tomcat 5.5
lcds version: 2.6
One week ago, I installed lcds2.5 in my coumputer. At that time, when I type address http://localhost/lcds/test.mxml in address bar of Internet Explorer, the web server return the result of test.swf.
I upgraded lcds from 2.5 to 2.6 this morning, and then when I type http://localhost/lcds/test.mxml in IE address bar again, the server return the source code of text.mxml in the web page, which is not I expected.
Why the web server don't handle the *.mxml file like in lcds2.5? How can I resolve this problem?Hi,
Webtier Compiler is which is no longer part of LCDS starting with the version 2.6. However you can install it if you want, read the instructions from this link http://labs.adobe.com/wiki/index.php/LiveCycle_Data_Services:Setting_up_an_SDK,_Compilers ,_and_Flex_Builder -
How to get subject correct in this procedure?
create or replace PROCEDURE send_mail (p_sender IN VARCHAR2,
p_recipient IN VARCHAR2,
p_recipient2 IN VARCHAR2,
p_message IN VARCHAR2,
p_subject IN VARCHAR2)
as
l_mailhost VARCHAR2(255) := 'mail.revion.com';
l_mail_conn utl_smtp.connection;
BEGIN<p>
l_mail_conn := utl_smtp.open_connection(l_mailhost, 25);<p>
utl_smtp.helo(l_mail_conn, l_mailhost);<p>
utl_smtp.mail(l_mail_conn, p_sender);<p>
utl_smtp.rcpt(l_mail_conn, p_recipient);<p>
utl_smtp.rcpt(l_mail_conn, p_recipient2);<p>
utl_smtp.open_data(l_mail_conn );<p>
utl_smtp.write_data(l_mail_conn, p_message);<p>
utl_smtp.write_data(l_mail_conn, p_subject);<p>
utl_smtp.close_data(l_mail_conn );<p>
utl_smtp.quit(l_mail_conn);<p>
end;<p>Hi,
Try:
utl_smtp.write_data(l_mail_conn, 'Subject: ' || p_subject);
Andy -
IPhone 5S screen is out of order. How to get it corrected.
I bought a iPhone in US in November 2013. Now I am in India (in Bhubaneswar, Odisha). Since yesterday I found unwanted lines appear on the screen. And my screen does not respond properly. What to do?
Your warranty is valid only in the US and Apple will not accept international mail, it must be brought in person. Have a friend in the US take it for warranty service, otherwise you are on your own.
-
How to get operation/activity number in correct sequence
hi all,
in Tcode CA03, we can see the first column "operation number" come in sequence.
0010 INSTRUCT
0020 STAGE
0030 SMT1
0040 SMT2
0050 ROUTING
0060 TEST1
0070 QC
0080 LBLPACK1
0090 FQA-TEST
0100 FINALQA
0110 QCE
However when query in the z report on table PLPO,
it would appear something like the following:
10 10000185 INSTRUCT
20 10000212 STAGE
30 10000178 SMT1
40 10000199 SMT2
110 10000407 QCE
10 10000197 ROUTING
20 10000205 TEST1
30 10000195 QC
40 10000188 LBLPACK1
50 10000315 FQA-TEST
60 10000180 FINALQA
those number comes after 110 is maintained in "reference operation set". it has inserted in between
SMT2 and QCE in CA02.
Please advise how to get the correct sequence in the z program through table PLPO. Or any other table with the entries maintained properly.
thanks .The document is confusing indeed. Here's what to do:
Since you already have Adobe Reader 9.4 installed (distributed via GPO), all you need to do is create an administrative installation point (AIP) for version 9.4.1 so you can deploy it to upgrade version 9.4.
Here's an example:
- Copy AdbeRdr940_en_US.msi (the 42MB MSI installation file) and AdbeRdrUpd941_all_incr.msp (the 3.24MB patch) to C:\Temp folder
- Create a new subfolder under C:\Temp folder (let's call it AdbeRdr941)
- Run this command:
msiexec /a C:\Temp\AdbeRdr940_en_US.msi
- When prompted, specify target drive C:\Temp\AdbeRdr941
- When the above process completes, run the following command to slipstream version 9.4.1 into 9.4.0:
msiexec /a C:\Temp\AdbeRdr941\AdbeRdr940_en_US.msi /p C:\Temp\AdbeRdrUpd941_all_incr.msp
Note: the above AdbeRdr940_en_US.msi in folder C:\Temp\AdbeRdr941 file size is about 3.8MB
- When prompted, once again the target is C:\Temp\AdbeRdr941
When the process completes, copy C:\Temp\AdbeRdr941 folder to a shared network folder and create a new GPO to distribute the new version. Hope that helps.
Maybe you are looking for
-
Error copying file when reinstalli​ng Windows
I saw where someone had posted a similar question, but saw no answers. Anyway, IBM sent me a set of recovery disks and a new hard drive (unit it still under warranty) and when I try to reinstall using the recovery disks provided, it stops during disk
-
How to find the available parameters in Framework Page
Hi All, I am new to OA Framework need some help. I need to find out the list of parameters for a Framework page. Once I know the available parameter then I can pass the value so that page rendering will be based on the parameter value. How to know th
-
Is there a way to use jsf in pdk portlets? Or a least does someone have experience writing some kind of wrapper provider for jsr168 portlet. thanks for advance
-
Consume the webservice in PI Box
Dear Experts, I have created a Java Class that calls a webservice deployed in PI 7.1. Below is the java code private String sendingDataToPISystem(String userName, String password, String endPointReference, String nameSpace, String serviceName, S
-
I have my laptop networked to my printer
Can someone help me here, whenever I open the hp solutions center page and I put in all the information then do the test run it's giving me an error saying check the device what could be wrong?