Creating jTree from objects
hi all! i am new in swing and i have a question...
i have for example vector of car objects.
lets say that car include the fields: model, company year.
i would like to create a jTree that each node of his root represent a car.
that the sub-root will be the car's model and his sub-nodes are leafs that each of them is the car's company and car's year.
i know that i need to use somehow the jTree model and the cell renderer but how?
i want to be able to add new cars to the jTree and remove selected cars from the tree, how can i do it?
thanks a lot!!! i hope you can help me
what do you mean by cross posted?
i didn't want to hart anybody... i didn't know that its forbidden to ask question in several forums... sorry for that...
i just thought that if people will not answer me in one forum may be i will get answer in other one..
i will not do it again...
thank you
Similar Messages
-
hi. I have created a simple XML file which contains a hierarchical structure of strings.
Also, I have created a SAXParser to read from the xml.
But I don't know how to put this structure in a JTree.
I don't want the tree to appear on my screen. I just want to access certain nodes at different times.
Any help?Hello,
If it's not to display it, you certainly don't need a JTree to store your data.
Maybe you need to use a DOMParser instead but that shouldn't prevent you from building a more appropriate data model. -
Hashtable or Vector to create Jtree ?Data from dtatbase.
I want build JTree in JApplet .
The JApplet is connecting to a database .
As soon as data change ,JTree change.
1.How can use hashtable or Vector to create Jtree ?
the Hashtable's Data or Vector's Data from Database.
2.How Japplet connect to a database and get data?1-How can use hashtable or Vector to create Jtree ?
read JTree constrcutors in which u can use Vector for creating JTree like new JTree(myVector);
and in this myVector u can store your own objects and override toString() method of that object (stored in Vector), but as my practice its not good.
2.How Japplet connect to a database and get data?
You have to make signed applet for connecting your applet with database , and sorry to say but ita a real pain in your ------------- -
Creating dynamically JTree from database values
Hi,
I have a local database with some node values. I receive these values from database as a String[].
short example:
String[] Values = {"mainNode","Processors","mainNode","RAM","mainNode","Monitors",
"Processors","INTEL","Processors","AMD","RAM","Kingston","RAM","GoodRAM",
"Kingston","400MHz","Kingston","433MHz"}First value is higher node, second is a child.
I'd like to produce dynamically JTree from Values[] like below:
MainNode
|----Processors
|----INTEL
|----AMD
|----RAM
|----Kingston
|----400MHz
|----433MHz
|----GoodRam
|----MonitorsI can't build up any working and fast solution :(
Can anyone help me ?
Please for any advices (samples) which will help me to apply it.
Dearly regards!This is a relatively straight forward task but it smacks of being homework so unless you post what you have already done you are unlikely to be given any code.
As a hint -
Go through the data creating a Map between the parent value and a child DefaultMutableTreeNode which contains as user object the child String.
When you extract a parent String from the data lookup the parent DefaultMutableTreeNode in the map and add the child DefaultMutableTreeNode to the parent DefaultMutableTreeNode.
Note - All the map is doing is giving you a quick way of looking up a DefaultMutableTreeNode given a parent name.
Note - that your tree will have problems if the same value appears in two or more branches! -
Can I create a network object from CIDR format or do I need to use IP - netmask?
Have a cisco ASA running ASA V 8.3
Wondering what the correct syntax is or even if it is possible to create a network object from a list of IP's in CIDR format?
Typically just do this:
Create network-object
object-group network name
network-object 1.2.3.0 255.255.255.0
Would like to do this:
network-object 1.2.3.0/24
thanks!Hi,
As far as I know the ASA does not support entering a network/subnet mask in such format in any of its configurations.
- Jouni -
Hi,
I'm using the below PowerShell script, by @hicannl which I found on the MS site, for bulk creating users from a CSV file.
I've had to edit it a bit, adding some additional user fields, and removing others, and changing the sAMAccount name from first initial + lastname, to firstname.lastname. However now when I run it, I get an error saying:
"[ERROR] Oops, something went wrong: The following exception occurred while retrieving member "Put": "There is no such object on the server."
The account is created in the default OU, with the correct firstname.lastname format, but then it seems to error at setting the "Set an ExtensionAttribute" section. However I can't see why!
Any help would be appreciated!
# ERROR REPORTING ALL
Set-StrictMode -Version latest
# LOAD ASSEMBLIES AND MODULES
Try
Import-Module ActiveDirectory -ErrorAction Stop
Catch
Write-Host "[ERROR]`t ActiveDirectory Module couldn't be loaded. Script will stop!"
Exit 1
#STATIC VARIABLES
$path = Split-Path -parent $MyInvocation.MyCommand.Definition
$newpath = $path + "\import_create_ad_users_test.csv"
$log = $path + "\create_ad_users.log"
$date = Get-Date
$addn = (Get-ADDomain).DistinguishedName
$dnsroot = (Get-ADDomain).DNSRoot
$i = 1
$server = "localserver.ourdomain.net"
#START FUNCTIONS
Function Start-Commands
Create-Users
Function Create-Users
"Processing started (on " + $date + "): " | Out-File $log -append
"--------------------------------------------" | Out-File $log -append
Import-CSV $newpath | ForEach-Object {
If (($_.Implement.ToLower()) -eq "yes")
If (($_.GivenName -eq "") -Or ($_.LastName -eq ""))
Write-Host "[ERROR]`t Please provide valid GivenName, LastName. Processing skipped for line $($i)`r`n"
"[ERROR]`t Please provide valid GivenName, LastName. Processing skipped for line $($i)`r`n" | Out-File $log -append
Else
# Set the target OU
$location = $_.TargetOU + ",$($addn)"
# Set the Enabled and PasswordNeverExpires properties
If (($_.Enabled.ToLower()) -eq "true") { $enabled = $True } Else { $enabled = $False }
If (($_.PasswordNeverExpires.ToLower()) -eq "true") { $expires = $True } Else { $expires = $False }
If (($_.ChangePasswordAtLogon.ToLower()) -eq "true") { $changepassword = $True } Else { $changepassword = $False }
# A check for the country, because those were full names and need
# to be land codes in order for AD to accept them. I used Netherlands
# as example
If($_.Country -eq "Netherlands")
$_.Country = "NL"
ElseIf ($_.Country -eq "Austria")
$_.Country = "AT"
ElseIf ($_.Country -eq "Australia")
$_.Country = "AU"
ElseIf ($_.Country -eq "United States")
$_.Country = "US"
ElseIf ($_.Country -eq "Germany")
$_.Country = "DE"
ElseIf ($_.Country -eq "Italy")
$_.Country = "IT"
Else
$_.Country = ""
# Replace dots / points (.) in names, because AD will error when a
# name ends with a dot (and it looks cleaner as well)
$replace = $_.Lastname.Replace(".","")
$lastname = $replace
# Create sAMAccountName according to this 'naming convention':
# <FirstName>"."<LastName> for example
# joe.bloggs
$sam = $_.GivenName.ToLower() + "." + $lastname.ToLower()
Try { $exists = Get-ADUser -LDAPFilter "(sAMAccountName=$sam)" -Server $server }
Catch { }
If(!$exists)
# Set all variables according to the table names in the Excel
# sheet / import CSV. The names can differ in every project, but
# if the names change, make sure to change it below as well.
$setpass = ConvertTo-SecureString -AsPlainText $_.Password -force
Try
Write-Host "[INFO]`t Creating user : $($sam)"
"[INFO]`t Creating user : $($sam)" | Out-File $log -append
New-ADUser $sam -GivenName $_.GivenName `
-Surname $_.LastName -DisplayName ($_.LastName + ", " + $_.GivenName) `
-StreetAddress $_.StreetAddress -City $_.City `
-Country $_.Country -UserPrincipalName ($sam + "@" + $dnsroot) `
-Company $_.Company -Department $_.Department `
-Title $_.Title -AccountPassword $setpass `
-PasswordNeverExpires $expires -Enabled $enabled `
-ChangePasswordAtLogon $changepassword -server $server
Write-Host "[INFO]`t Created new user : $($sam)"
"[INFO]`t Created new user : $($sam)" | Out-File $log -append
$dn = (Get-ADUser $sam).DistinguishedName
# Set an ExtensionAttribute
If ($_.ExtensionAttribute1 -ne "" -And $_.ExtensionAttribute1 -ne $Null)
$ext = [ADSI]"LDAP://$dn"
$ext.Put("extensionAttribute1", $_.ExtensionAttribute1)
Try { $ext.SetInfo() }
Catch { Write-Host "[ERROR]`t Couldn't set the Extension Attribute : $($_.Exception.Message)" }
# Move the user to the OU ($location) you set above. If you don't
# want to move the user(s) and just create them in the global Users
# OU, comment the string below
If ([adsi]::Exists("LDAP://$($location)"))
Move-ADObject -Identity $dn -TargetPath $location
Write-Host "[INFO]`t User $sam moved to target OU : $($location)"
"[INFO]`t User $sam moved to target OU : $($location)" | Out-File $log -append
Else
Write-Host "[ERROR]`t Targeted OU couldn't be found. Newly created user wasn't moved!"
"[ERROR]`t Targeted OU couldn't be found. Newly created user wasn't moved!" | Out-File $log -append
# Rename the object to a good looking name (otherwise you see
# the 'ugly' shortened sAMAccountNames as a name in AD. This
# can't be set right away (as sAMAccountName) due to the 20
# character restriction
$newdn = (Get-ADUser $sam).DistinguishedName
Rename-ADObject -Identity $newdn -NewName ($_.LastName + ", " + $_.GivenName)
Write-Host "[INFO]`t Renamed $($sam) to $($_.GivenName) $($_.LastName)`r`n"
"[INFO]`t Renamed $($sam) to $($_.GivenName) $($_.LastName)`r`n" | Out-File $log -append
Catch
Write-Host "[ERROR]`t Oops, something went wrong: $($_.Exception.Message)`r`n"
Else
Write-Host "[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) already exists or returned an error!`r`n"
"[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) already exists or returned an error!" | Out-File $log -append
Else
Write-Host "[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) will be skipped for processing!`r`n"
"[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) will be skipped for processing!" | Out-File $log -append
$i++
"--------------------------------------------" + "`r`n" | Out-File $log -append
Write-Host "STARTED SCRIPT`r`n"
Start-Commands
Write-Host "STOPPED SCRIPT"Here is one I have used. It can be easily updated to accommodate many needs.
function New-RandomPassword{
$pwdlength = 10
$bytes = [byte[]][byte]1
$pwd=[string]""
$rng=New-Object System.Security.Cryptography.RNGCryptoServiceProvider
while (!(($PWD -cmatch "[a-z]") -and ($PWD -cmatch "[A-Z]") -and ($PWD -match "[0-9]"))){
$pwd=""
for($i=1;$i -le $pwdlength;$i++){
$rng.getbytes($bytes)
$rnd = $bytes[0] -as [int]
$int = ($rnd % 74) + 48
$chr = $int -as [char]
$pwd = $pwd + $chr
$pwd
function AddUser{
Param(
[Parameter(Mandatory=$true)]
[object]$user
$pwd=New-RandomPassword
$random=Get-Random -minimum 100 -maximum 999
$surname="$($user.Lastname)$random"
$samaccountname="$($_.Firstname.Substring(0,1))$surname"
$userprops=@{
Name=$samaccountname
SamAccountName=$samaccountname
UserPrincipalName=“$[email protected]”)
GivenName=$user.Firstname
Surname=$surname
SamAccountName=$samaccountname
AccountPassword=ConvertTo-SecureString $pwd -AsPlainText -force
Path='OU=Test,DC=nagara,DC=ca'
New-AdUser @userprops -Enabled:$true -PassThru | |
Add-Member -MemberType NoteProperty -Name Password -Value $pwd -PassThru
Import-CSV -Path c:\users\administrator\desktop\users.csv |
ForEach-Object{
AddUser $_
} |
Select SamAccountName, Firstname, Lastname, Password |
Export-Csv \accountinformation.csv -NoTypeInformation
¯\_(ツ)_/¯ -
Unable to create a Driver object from driver with Media type string CTC PHO
Hi All,
I am trying to develop a siebel cti adapter for avaya.
I have loaded a custom dll into siebel server but it is throwing error "SBL-CSR-00500: Unable to create a Driver object from driver C:\Mydriver\cti.dll with Media-Type-String CTC Phone ".
It has been long time without any progress.
Please help
Thanks
NishantHi tomhowell,
According to your description, my understanding is that you got an error when you created a site from a custom site template after migrading SharePoint 2010 to your server.
Did you have the original solution file of the site template? Please re-deploy the solution to your SharePoint site, then create a site from the new site template, compare the result.
Also use SPDisposeCheck to indentify the memory leak:
http://archive.msdn.microsoft.com/SPDisposeCheck
http://www.fewlines4biju.com/2012/11/detected-use-of-sprequest-for.html
Here are some similar posts for your reference:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/3a25eb86-8415-4053-b319-9dd84a1fd71f/detected-use-of-sprequest-for-previously-closed-spweb-object-please-close-spweb-objects-when-you?forum=sharepointdevelopmentprevious
http://social.msdn.microsoft.com/Forums/en-US/50ce964f-94a6-4fda-abc0-caa34e7111f1/error-detected-use-of-sprequest-for-previously-closed-spweb-object-occurs-when-new-site-gallery
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
How to create a Document object from a string.
If I use the following code, the input String cannot contain "\n", otherwise, it generates errors.
in the following code, inputXMLString is a String object that has xml content.
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(inputXMLString))); How can I create a Document object from a string with "\n" in the string?
Thanks.If I use the following code, the input String cannot
contain "\n", otherwise, it generates errors.That's going to be a huge surprise to thousands of people who process XML containing newline characters every day without errors.
Perhaps your newline characters are in the middle of element names, or something else that causes your XML to be not well-formed. I'm just guessing here, though, because you didn't say what errors you were getting. -
Create internet explorer object from process ID
Hi,
I want to create a object for open instance of internet explorer and pass username and password to it.
By using the below command I am getting the process object but how can we create internet explorer object from it so that I can access document elements.
gps | ? {$_.mainwindowtitle -match 'Service'} | select name, mainwindowtitle
Thanks
PrasannaHi Prasanna,
If you means create IE object and signin automatically with username and password, the script below is for your reference:
$username = "....."
$password = "......"
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
$ie.navigate("https://login.live.com/")
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.document.getElementById("i0116").value= $username
$ie.document.getElementById("i0118").value = $password
$ie.document.getElementById("idSIButton9").click()
start-sleep -m 100
gps | ? {$_.mainwindowtitle -match 'Microsoft account'} | select name, mainwindowtitle
The result like:
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang -
Creating JTree with results from SQL Query
I have the following source in SQLJ:
String temp=null;
iter1 it1;
iter2 it2;
#sql it1={select id,fdn,level from groups connect by prior fdn=parent_fdn start with fdn='/' };
while(it1.next())
System.out.println(it1.id()); // Display Parent
temp=it1.fdn();
#sql it2= {select clli from nes where parent_fdn=:temp order by clli };
while(it2.next())
System.out.println(it2.clli());//Display Child of above Parent if any
My problem is to construct a Tree GUI using JTree from the above
code with the same hierarchy of parent-child relationship.
I have tried every possible solution using Vectors,Hashtables,String Arrays etc but have not come up with a successful solution so far
IF ANYONE HAS A SOLUTION PLEASE HELP ME WITH AN EXAMPLE.
Thank You
Sharathsharathkv,
Your issue seems to be in figuring out an algorithm to convert row-based SQL resultsets to a hierarchical data structure suitable for display in a tree.
Run the jython (www.jython.org) app below: it simulates doing just that. jython is indentation-sensitive, so you'll need to exercise care when copying. If copy-paste to a text editor doesn't work, copy-paste to a HTML-aware editor (even Outlook Express, if on Windows), then copy from there and paste in a text editor.
--A
This is a jython (www.jython.org) app that illustrates
converting row-based data (eg. a SQL resultset) to a custom
hierarchical data structure, and displaying it in a JTree.
from javax.swing import *
from javax.swing.tree import *
import java
def getSQLRows():
Simulates a SQL resultset.
Columns fdn and parent-fdn indicate parent/child relationships.
rows = [
# id, fdn, parent-fdn, level
[1, '/', None, 1]
, [2, '/fruits', '/', 2]
, [3, '/colors', '/', 2]
, [4, '/sports', '/', 2]
, [5, '/fruits/apples', '/fruits', 3]
, [6, '/fruits/oranges', '/fruits', 3]
, [7, '/colors/red', '/colors', 3]
, [8, '/colors/blue', '/colors', 3]
, [9, '/sports/petanc', '/sports', 3]
, [10, '/sports/rugby', '/sports', 3]
return rows
def convertRowsToHierarchy(rows):
Converts row-based results to hierarchical structure.
Uses known parent/child relations present in rows.
root = None
for row in rows:
fdn, parentfdn = row[1], row[2]
node = SQLTreeNode(fdn, parentfdn)
if root:
root.addEx(node)
else:
root = node
return root
class SQLTreeNode(java.lang.Object):
'''Custom tree node; displayed in JTree'''
def __init__(self, fdn, parentfdn):
self.fdn = fdn
self.parentfdn = parentfdn
self.nodes = []
def add(self, node):
'''Adds node as immediate child'''
self.nodes.append(node)
def addEx(self, node):
'''Adds-with-search. NOTE: naive implementation'''
if self.fdn == node.parentfdn:
self.add(node)
else:
for child in self.nodes:
child.addEx(node)
def toString(self):
return self.fdn
def dump(self):
'''Debug routine to dump hierarchy'''
print 'fdn=%s, parentfdn=%s' % (self.fdn, self.parentfdn)
for node in self.nodes:
node.dump()
class SQLTreeModelAdapter(TreeModel):
'''Tree model adapter: adapts custom data structure to TreeModel'''
def __init__(self, root):
self.__root = root
def getChild(self, parent, index):
return parent.nodes[index]
def getChildCount(self, parent) :
return len(parent.nodes)
def getIndexOfChild(self, parent, child):
return parent.nodes.index(child)
def getRoot(self) :
return self.__root
def isLeaf(self, node):
return len(node.nodes) == 0
def addTreeModelListener(self, l):
pass
def removeTreeModelListener(self, l):
pass
def valueForPathChanged(self, path, newValue):
pass
class SQLTreeDemo(JFrame):
Tree demo UI
Displays a tree displaying [hierarchical] results
of a BOM-type SQL query
def __init__(self):
# Get matrix simulating SQL resultset
rows = getSQLRows()
# Convert to custom hierarchical data structure
root = convertRowsToHierarchy(rows)
model = SQLTreeModelAdapter(root)
tree = JTree(model)
sp = JScrollPane(tree)
self.contentPane.add(sp)
self.size = 200, 300
if __name__ == '__main__':
s = SQLTreeDemo()
s.visible = 1 -
Creating ViewObject from Entity object
HI,
Is it possible to modify the query of the view object? And I have created that view object from EntityObject.
Regards,
InfyHi Arun,
Thanks for your reply. My query has union of 8 different queries. I have created Association between them. But while creating view object, I am getting struck in choosing the association & join type. Can I use expert mode? View object is getting displayed. But when I try to insert any rows, it is throwing errors. My JDev version is, 11.1.2.2.0.. Here is the query:
<SQLQuery><![CDATA[
Select * from (Select a.Appr_Comment Remarks,
a.placeholder_seq placeholder_Seq,
a.Comment_Seq comment_Seq,
b.Dph_Id Placeholder_Id,
Decode(b.Format,Null,c.default_value,To_Char(To_Date(c.Default_Value,'DD-MON-YYYY HH24:MI:SS'),b.format)) Value,
b.label_id label_Id,
b.version_no version_No,
a.user_id user_Id,
0 text_dir,
'N' is_obsolete,
'NA' Cph_Format,
b.tph_placeholder_seq Ph_Version
From Approver_Comments a,
Label_Placeholders b,
Data_Placeholders c
Where a.Label_Id=b.Label_Id
And a.Version_No=b.Version_No
And a.Placeholder_Seq=b.Placeholder_Seq
And b.Dph_Id=c.Placeholder_Id
And b.Dph_Id Is Not Null
Union
Select a.Appr_Comment Remarks,
a.placeholder_seq placeholder_Seq,
a.Comment_Seq comment_Seq,
b.Vph_Id Placeholder_Id,
c.Default_Value Value,
b.label_id label_Id,
b.version_no version_No,
a.user_id user_Id,
0 text_dir,
'N' is_obsolete,
'NA' Cph_Format,
b.tph_placeholder_seq Ph_Version
From Approver_Comments a,
Label_Placeholders b,
Visit_Ph c
Where a.Label_Id=b.Label_Id
And a.Version_No=b.Version_No
And a.Label_Id=c.Label_Id
And a.Version_No=c.Version_No
And a.Placeholder_Seq=b.Placeholder_Seq
And b.Vph_Id=c.Placeholder_Id
And b.Vph_Id Is Not Null
Union
Select a.Appr_Comment Remarks,
a.placeholder_seq placeholder_Seq,
a.Comment_Seq comment_Seq,
b.rtph_id Placeholder_Id,
c.Default_Value Value,
b.label_id label_Id,
b.version_no version_No,
a.user_id user_Id,
0 text_dir,
'N' is_obsolete,
'NA' Cph_Format,
b.tph_placeholder_seq Ph_Version
From Approver_Comments a,
Label_Placeholders b,
rtph c
Where a.Label_Id=b.Label_Id
And a.Version_No=b.Version_No
And a.Label_Id=c.Label_Id
And a.Version_No=c.Version_No
And a.Placeholder_Seq=b.Placeholder_Seq
And b.rtph_id=c.Placeholder_Id
And b.rtph_id Is Not Null
Union
Select a.Appr_Comment Remarks,
a.placeholder_seq placeholder_Seq,
a.Comment_Seq comment_Seq,
b.ftph_id Placeholder_Id,
c.placeholder_data Value,
b.label_id label_Id,
b.version_no version_No,
a.user_id user_Id,
d.text_direction text_dir,
'N' is_obsolete,
'NA' Cph_Format,
b.tph_placeholder_seq Ph_Version
From Approver_Comments a,
Label_Placeholders b,
freetext_ph c,
languages d
Where a.Label_Id=b.Label_Id
And a.Version_No=b
.Version_No
And a.Label_Id=c.Label_Id
And a.Version_No=c.Version_No
And a.Placeholder_Seq=b.Placeholder_Seq
And b.ftph_id=c.Placeholder_Id
And b.ftph_id Is Not Null
And b.LANG_CD = d.LANG_CD
Union
Select a.Appr_Comment Remarks,
a.placeholder_seq placeholder_Seq,
a.Comment_Seq comment_Seq,
b.tph_id Placeholder_Id,
c.description Value,
b.label_id label_Id,
b.version_no version_No,
a.user_id user_Id,
d.text_direction text_dir,
nvl(c.IS_OBSOLETE,'N') is_obsolete,
'NA' Cph_Format,
b.tph_placeholder_seq Ph_Version
From Approver_Comments a,
Label_Placeholders b,
phrase_translation c,
languages d
Where a.Label_Id=b.Label_Id
And a.Version_No=b.Version_No
And a.Placeholder_Seq=b.Placeholder_Seq
And b.tph_id=c.Placeholder_Id
And b.Tph_Placeholder_Seq=c.placeholder_seq
And b.Lang_Cd=c.Lang_Cd
And b.tph_id Is Not Null
And b.LANG_CD = d.LANG_CD
Union
Select a.Appr_Comment Remarks,
a.placeholder_seq placeholder_Seq,
a.Comment_Seq comment_Seq,
b.Cph_Id Placeholder_Id,
LABDB07.Cph_Value(b.Label_Id,b.Version_No,b.Cph_Id) Value,
b.label_id label_Id,
b.version_no version_No,
a.user_id user_Id,
0 text_dir,
'N' is_obsolete,
LABDB07.Cph_Format(b.Label_Id,b.Version_No,b.Cph_Id) Cph_Format,
b.tph_placeholder_seq Ph_Version
From Approver_Comments a,
Label_Placeholders b
Where a.Label_Id=b.Label_Id
And a.Version_No=b.Version_No
And a.Placeholder_Seq=b.Placeholder_Seq
And b.Cph_Id Is Not Null) order by comment_Seq
]]></SQLQuery> -
Unable to create DIR from the objects
Hi,
I want to create the DIR from the object transaction, eg., Purchase Order, I have set "1" - Create Simple Document under Define Object Links for that particular Document type, But despite this config, I am not getting the "create" button. whereas I have assigned the same document type to another Object link Appropriation Request, and I am able to create DIR from the object transaction itself. Upon, exploring the system, I found that the Purchase order uses the Program "SAPLCVOB" screen"0200" whereas Appropriation request has Program "SAPLCV140" screen"0204" So, I presume that the configuration affects only SAPLCV140 and it has no affect to SAPLCVOB. Or is there any other way to create the DIR directly from the objects which uses SAPLCVOB program? My user wants to create DIR directly from PO.Dear Mohamed,
To grant that allways the currenct screens and authorizations were
called please maintain also the value "1" into the "Authorization"
column. For further informations on this maintainance please see the
SAP note 1066915. It's important that you not enter the mentioned
screen number wihtout the leading "1" as this number is added
automatically by the system (e.g. object MARA 1201 maintain like MARA
201). You can do this in customizing under:
Transaction SPRO
> Cross-Application-Component
> Document Management
> Control Data
> Define screen for object links
If you need the dynpro number or object you will find all standard SAP
objects and their screen number in function module CV130 (Screens) by
transaction SE80. Please maintain all necessary SAP objects.
Best regards,
Christoph -
Error when creating a Proxy Object from WSDL
Hi,
when creating a proxy object in abap based on the [WSDL|http://download.mapandguide.com/EN/dev/xserver/XLocate-1.6.0.3.wsdl] i get the error 'Incorrect value: Unknown Type Referencens0:ArrayOfString'.
1- Is there a conflict with the type 'String' that's also a type in ABAP
<complexType name="ArrayOfString">
<sequence>
<element name="String" type="xsd:string" minOccurs="0" maxOccurs="unbounded" nillable="true" />
</sequence>
</complexType>
2- Is it a name space problem?
xmlns:ns0="http://types.xlocate.xserver.ptvag.com"
type="ns0:ArrayOfString"
3- Something else?
Please Help!
Thank
FouadHi Isaias,
we are working with this versions:
SAP_BASIS 700 0015 SAPKB70015 SAP Basiskomponente
SAP_AP 700 0013 SAPKNA7013 SAP Application Platform
We are not working with developer studio, only with the regular tools of the abap development workbench Transaction SE80.
Thanks,
Fouad -
How to create a Image object from action script
I need to set the back ground of charting dynamically, thus I need to create Image from a png/gif files. I have wrritten following code, but doesn't work.
public function addBackground():void
var cbg:ChartBackground=new ChartBackground();
var bgs:Array=new Array();
bgs.push(cbg);
lineChart.backgroundElements=bgs;
package arubaUI
import mx.controls.Image;
[Embed(source="../assets/chart_16.png")]
public class ChartBackground extends Image
Does any one knows how to do that?
Thanks!I put the code like and got compile error:
public class ArubaLinePanel extends Panel
private var lineChart:LineChart;
private var lineData:ArrayCollection=new ArrayCollection( [
{ Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 },
{ Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
{ Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 },
{ Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 },
{ Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]);
public function ArubaLinePanel()
super();
lineChart=new LineChart();
lineChart.dataProvider=lineData;
lineChart.showDataTips=true;
var axisX:CategoryAxis=new CategoryAxis()
axisX.categoryField="Month";
lineChart.horizontalAxis=axisX;
var seriesArray:Array = new Array();
var ls:LineSeries=new LineSeries();
ls.yField="Profit";
ls.displayName="Profit";
seriesArray.push(ls);
lineChart.series=seriesArray;
this.addChild(lineChart);
var legend:Legend=new Legend();
legend.dataProvider=lineChart;
this.addChild(legend);
addBackground();
public function addBackground():void
var cbg:ChartBackground=new ChartBackground();
var bgs:Array=new Array();
bgs.push(cbg);
lineChart.backgroundElements=bgs;
Another method I tried:
package arubaUI
import mx.controls.Image;
[Embed(source="../assets/chart_16.png")]
public class ChartBackground extends Image
There is no compile error, but image is not show on screen,
Thanks!
April -
Building jtree from database query
I am trying to build a JTREE from a database result-set. The resultset is listed below. I'm thinking I can somehow build a dynamic array of objects to build a TreePath, then use that to build the JTREE. Any input is appreciated.
ResultSet Output:
Here is how the results would be retrieved from the database (including the order of the output).
usr 1
local 2
sbin 2 file4
bin 3 file1
bin 3 file2
logs 3 file3
tmpdir 4
The first column is the directory name, the second column is the directory/file level/position, and the third column is the filename, if one exists.
So from above:
/usr/local/sbin has file "file4"
/usr/local/bin has files "file1" and "file2"
/usr/local/logs has file "file3" and directory "tmpdir"
How could I gather this information into an appropriate structure and create a JTREE from it.
Thanks.
-JimSo each line would:basically...
If I don't know the entire path of the parent (because I've read in a
line that only has the "one-up" parent name) .... However, when I
read the line from the database result-set, I don't know where "local" is.See... that's another problem with that data. Maybe you know cuz it's the last node if it's all in a proper order. In which case maybe you only need to hold the last parent node... Some recursive function would be useful.
If I were going to store the data, I would store either the name as a full path:
/usr
/usr/local
/usr/loca/bin
or
usr /
local /usr
bin /usr/local
If you have that, it might be easier to figure out without having to worry about what belongs where.
Maybe you are looking for
-
Unable to capture video off of Hitachi DVD+HDD combined hybrid to iMovie
I have video captured on a hard drive in my Hitachi consumer grade camera. I am trying to capture that media into iMovie. iMovie is not recognizing the files on the camera and I am unable to select the media to transfer. I am connecting to my Macbook
-
Iweb 3.0.3 paste and close
I have 2 problem with iWeb 3.0.3 1) If i past more photos (5/6) on a page of my blog and resize these, iWeb start to go very slowly. 2) when I click on close button (red left top button) iWeb quit! It's normal? If I do the same on safari it doesn't q
-
Want shipping Point address(not Number) in the invoice layout
Dear Experts Please tell me tables and fields how get the shipping point address in invoice layout, if i give likp-vstel, it picks the shipping point number only, issue resolution is very urgent Thanks and regards Janardhan
-
IWeb?? Publish not working.
I created a website using photos from my iPhoto. I used the iWeb in iPhoto. I completed the page and then "published" it. But it is not working. It says HTML not available. Am I leaving out a step? Thank you. I have an iMac G5. Can you
-
Instal Lightroom on a second computer
I have Lightroom 5 (stand alone purchase in January 2014) on an iMac and have now purchased an Apple laptop. Can I install Lightroom on a second computer? If so, how?