PropertyDescriptor.isBound() returns "true" for text-property of JTextField
Hello,
I have this simple code to retrieve all bound properties of a JTextField:
BeanInfo beanInfo = Introspector.getBeanInfo( JTextField.class );
PropertyDescriptor[] discriptors = beanInfo.getPropertyDescriptors();
for ( PropertyDescriptor propertyDescriptor : discriptors ) {
System.out.println( "propertyDescriptor.getDisplayName(): " + propertyDescriptor.getDisplayName() );
System.out.println( "propertyDescriptor.isBound(): " + propertyDescriptor.isBound() );
System.out.println();
}When I run this, I can see that the property "text" is listet as "bound" (isBound() == true ). I know there is no JTextFieldBeanInfo, so the Introspector does a runtime introspection. And I know that "text" is not a bound property on JTextField. So why is "isBound()" reporting "true" for the "text" property? (I was hoping to get all bound properties of a class this way, but appearently it does not word).
Thanks a lot for your help!
Hello,
so far I was not able to solve the problem... regarding my question my isBound() is true for the "text" Property, does anyone know why? And furthermore, how could one gather all bound properties of a swing component?
Similar Messages
-
MachineID.matches() returns true for different devices
We are seeing this issue when using Windows XP running IE6. Our customer is seeing the same issue when using IE8.
In our testing we used two Macbook Pro devices running Windows XP Bootcamp. We used Internet Explorer 6.
The following code returns true for bytes obtained from two different machine ids.
currentMachineId.matches(new MachineId(registeredDeviceBytes)
The two devices give us the following machine IDs, the Base64 representation is below
MIIBezCBwgYJKoZIhvcvAwIAMYG0MCsGCSqGSIb3LwMCZDAeDBxtL2xwQWlPSGhibUNoemNNb0FoQzRoTG95bXM9MC sGCSqGSIb3LwMCZTAeDBx1YWhjL3haM3FBdlZoR21lU2tWaXRTc0xZV009MCsGCSqGSIb3LwMCZjAeDBxyQkFMeXBR YkZLaStTSlhGUm1CNHlUeXhBNmc9MCsGCSqGSIb3LwMCZzAeDBxYc0E3cXBzbGkrVFZveTkyRGhJbnhUMkJ3LzA9BC BmOGI0MTAzMTQ3MDNkMjYxNDc2ODI2YzIzMDMzNjdhMqCBkTCBjjAFDANXaW4xgYQwgYECAQECAQEweQIBPDF0MA4G CSqGSIb3LwMCaAIBCjAOBgkqhkiG9y8DAmkCAQowEwYJKoZIhvcvAwJkAgEPoAMBAf8wEwYJKoZIhvcvAwJlAgEPoA MBAf8wEwYJKoZIhvcvAwJmAgEUoAMBAf8wEwYJKoZIhvcvAwJnAgEeoAMBAf8=
MIIBezCBwgYJKoZIhvcvAwIAMYG0MCsGCSqGSIb3LwMCZDAeDBx2dkZoNXRMOEFqK2NoSmVZVXc0T3dPUzZJcVE9MC sGCSqGSIb3LwMCZTAeDBxXYlJqcTl1N3Z4aUY2YnVqNWpBQTBhU1dUVEU9MCsGCSqGSIb3LwMCZjAeDBxyQkFMeXBR YkZLaStTSlhGUm1CNHlUeXhBNmc9MCsGCSqGSIb3LwMCZzAeDBxYc0E3cXBzbGkrVFZveTkyRGhJbnhUMkJ3LzA9BC A4NGFiZTJjN2VhM2M1NDgxOWQxM2RiZGNmYjVhMjgzNKCBkTCBjjAFDANXaW4xgYQwgYECAQECAQEweQIBPDF0MA4G CSqGSIb3LwMCaAIBCjAOBgkqhkiG9y8DAmkCAQowEwYJKoZIhvcvAwJkAgEPoAMBAf8wEwYJKoZIhvcvAwJlAgEPoA MBAf8wEwYJKoZIhvcvAwJmAgEUoAMBAf8wEwYJKoZIhvcvAwJnAgEeoAMBAf8=
Can you tell us why this is happening? Under what circumstances can this happen? How to avoid this or any workarounds?
We need an answer really soon. We are about to launch a service that counts on being able to restrict the number of devices for watching videos.
ThanksHi DruMmer,
1. Nice play on words with your forum alias. : )
2. Adobe Access DRM's "Device Binding" algorithm takes into play several different available machine attributes (imagine a set of various attributes that we check every time you attempt to play protected content). Our MachineID.matches() allows for small variations in attributes, since it's expected that desktop users will likely upgrade their hardware over time. Because of this, MachineID.matches() will allow for a small tolerance in difference before returning "FALSE".
In your situation, you are seeing "TRUE" == MachineID.matches(otherMachineID) because surprisingly, almost all of the available attributes are the same between the 2 macbook pros' you're testing. We will review our Device Binding Algorithm to determine if there should be some possible tweaking, as what we have access to on the MBP hardware may have changed.
In the meantime, an additional check you can perform to see if 2 machines are different (without using the underlying hardware) is MahineID.getUniqueID. However, please understand the limitations of this API (read the Javadocs). Of particular interest is that across DRM resets, this ID is not resilient (as apposed to MachineID.matches()).
cheers,
/Eric. -
IsSiteLocalAddress() of inetAddress class returns true for IPv4 Adresses
Any idea why isSiteLocalAddress() method of inetAddress class returns true for IPv4 Adresses?
To my knowledge the IPv4 address can't be a site local address.
Is it expected behaviour?
Here is the snippet of the code.
InetAddress inet=InetAddress.getByName(samplehost);
// Verifying the address type of IPv6.
if(inet.isAnyLocalAddress())
System.out.println("Any local address is " + inet);
if(inet.isLinkLocalAddress())
System.out.println("Link local address is " + inet);
if(inet.isLoopbackAddress() && ip.indexOf(":") != -1)
System.out.println("Loopback address " + inet);
if(inet.isMulticastAddress())
System.out.println("Multicast address " + inet);
if(inet.isSiteLocalAddress())
System.out.println("Site local Address " + inet);
if(ip.indexOf(":") != -1)
System.out.println("Its an IPv6 global address " + inet);
if(ip.indexOf(".") != -1 && ip.indexOf(":") == -1)
System.out.println("Its an IPv4 global address " + inet);Here is the output and program for your reference.
D:\DIA>java testIPv6 shash10-w2k3
Host name is shash10-w2k3
Inet Address Object is : shash10-w2k3/192.168.126.1
Site local Address shash10-w2k3/192.168.126.1
Its an IPv4 global address shash10-w2k3/192.168.126.1
Here is the program.
import java.util.*;
import java.io.*;
import java.util.*;
import java.util.logging.Level;
import java.rmi.*;
import java.net.InetAddress;
import java.net.Socket;
import com.ca.dia.dna.*;
import com.ca.dia.common.rmiClient.*;
public class testIPv6 {
public static void main(String args[])
try{
System.out.println("Host name is "+args[0]);
InetAddress inet=InetAddress.getByName(args[0]);
System.out.println("Inet Address Object is : "+inet.toString());
String ip = inet.getHostAddress();
// Verifying the address type of IPv6.
if(inet.isAnyLocalAddress())
System.out.println("Any local address is " + inet);
if(inet.isLinkLocalAddress())
System.out.println("Link local address is " + inet);
if(inet.isLoopbackAddress() && ip.indexOf(":") != -1)
System.out.println("Loopback address " + inet);
if(inet.isMulticastAddress())
System.out.println("Multicast address " + inet);
if(inet.isSiteLocalAddress())
System.out.println("Site local Address " + inet);
if(ip.indexOf(":") != -1)
System.out.println("Its an IPv6 global address " + inet);
if(ip.indexOf(".") != -1 && ip.indexOf(":") == -1)
System.out.println("Its an IPv4 global address " + inet);
catch(Exception e)
System.out.println("Exception Happened");
System.out.println("Not reachable");
} -
Error in context binding for text property
Hello experts,
I receive this error in my WD4A application:
The following error text was processed in the system XXX : Context binding for property TEXT of "T_MONTHTO"
cannot be resolved: Node MAINVIEW.1.TEMPVAL2 does not contain any elements
The error occurred on the application server sapxxxxx_XXX_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: RAISE_FOR of program CX_WDR_ADAPTER_EXCEPTION======CP
Method: RAISE_BINDING_EXCEPTION of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
Method: GET_BOUND_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
TEMPVAL2 has cardinality 0..1, selection 0..1, Inizialization Lead Selection false and the ST22 dump says:
33
34 if l_adapter->m_view_element is bound.
35 l_component ?= l_adapter->m_view_element->view->if_wd_controller~get_component( ).
36 l_view_name = l_adapter->m_view_element->view->name.
37 l_view_element_id = l_adapter->m_view_element->id.
38 l_component_name = l_component->component_name.
39 endif.
40
41 if l_adapter->m_context_element is bound.
42 l_path = l_adapter->m_context_element->get_path( ).
43 endif.
44
>> raise exception type cx_wdr_adapter_exception
46 exporting
47 textid = textid
48 previous = previous
49 component_name = l_component_name
50 view_name = l_view_name
51 view_element_id = l_view_element_id
52 adapter_stack = l_adapter_stack
53 path = l_path
54 p1 = l_p1
55 p2 = l_p2
56 p3 = l_p3
57 p4 = l_p4
58 reason = reason.
59 endmethod.
Could anybody please tell me why exactly this error is occuring?
Many regards,
MartinHi Martin,
I am getting the same error. can you please help me resolve this error.
Error:
Note
The following error text was processed in the system RS2 : Adapter error in &VIEW_ELEMENT_TYPE& "VBELN" of view "Z_MYFIRST_WEBDYNPRO.MAIN": Context binding of property VALUE cannot be resolved: Node MAIN.1.NODE_VBAK does not contain any elements
My Code is in the Method for the action is created for a button on MAIN VIEW
METHOD onactionaction_find .
wd_this->fire_to_alv_table_plg( ).
DATA: node_node_vbak TYPE REF TO if_wd_context_node,
elem_node_vbak TYPE REF TO if_wd_context_element,
stru_node_vbak TYPE if_main=>element_node_vbak .
stru_node_vbak type wd_this->element_node_vbak.
navigate from <CONTEXT> to <NODE_VBAK> via lead selection
break dasarikb.
node_node_vbak = wd_context->get_child_node( name =
wd_this->wdctx_node_vbak ).
get element via lead selection
elem_node_vbak = wd_context->get_element( ).
get all declared attributes
elem_node_vbak->get_attribute(
exporting
name = 'VBELN'
IMPORTING
value = stru_node_vbak ).
DATA: ls_where(72) TYPE c,
lt_where LIKE TABLE OF ls_where,
lt_vbak TYPE STANDARD TABLE OF vbak.
create where condition
IF NOT stru_node_vbak-vbeln EQ ''.
CONCATENATE 'VBELN = ''' stru_node_vbak-vbeln '''' INTO ls_where.
APPEND ls_where TO lt_where.
ENDIF.
IF NOT stru_node_vbak-erdat EQ '00000000'.
CONCATENATE 'ERDAT = ''' stru_node_vbak-erdat '''' INTO ls_where.
IF stru_node_vbak-vbeln NE ''.
CONCATENATE 'AND' ls_where INTO ls_where SEPARATED BY space.
ENDIF.
APPEND ls_where TO lt_where.
ENDIF.
SELECT *
FROM vbak
INTO TABLE lt_vbak
WHERE (lt_where).
DATA: node_node_alv TYPE REF TO if_wd_context_node,
stru_node_alv TYPE if_main=>element_node_alv.
navigate from <CONTEXT> to <NODE_ALV> via lead selection
node_node_alv = wd_context->get_child_node( name =
if_main=>wdctx_node_alv ).
get all declared attributes
node_node_alv->bind_table( lt_vbak ).
ENDMETHOD.
Thanks,
Kiran -
Boolean User Properties always returns TRUE
Hi, I am trying to get some propeties from the user on the AD and I found out with the following issue, all the boolean attributes always return TRUE as value. The Code that I am using to extract them is the following
foreach ($objUser in $objUsers)
$bolPasswordNeverExpires = [boolean] $objUser.Properties['PasswordNeverExpires'];
$bolEnabled = [boolean] $objUser.Properties['Enabled'];
$bolAccountExpired = [boolean] $objUser.Properties['AccountExpired'];
Could you please guide me into the proper direction to solve it. I looked up in most of powershell related topic and did not find a way to solve it. I even attempt using UserAccountControl Attribute to check Enabled status do not matter agains which value
I check it, it always returns TRUE.Thank´s for the tip. Unluckily when I attempt it, if I left only
$objUsers.PasswordNeverExpires or $objUsers.Enabled, it only return whites spaces and no comparison from True or False is feasible.
If I change it to [boolean] $objUsers.PasswordNeverExpires or $objUsers.Enabled instead of using the Properties option, it returns False for all values.
I attempt to use the UserAccountControl field for look up the property Ex: (objUser.UserAccountControl AND 2) for Enabled and it also returns True for all situation
I look up for the properties on the ISE interface and the only ones displayed are the following ones:
distinguishedname
displayname
whencreated
samaccountname
sn
accountexpires
pwdlastset
samaccounttype
adspath
useraccountcontrol
whenchanged
cn
userprincipalname
lastlogontimestamp
msds-user-account-control-computed
May it be an issue with the filter that does not load the specified properties? -
I am working no one SSRS my table headers are freeze cangrow property is false and my report is working perfect while rendering data on RDL and i want same report after exporting in Excel also , i want my table header to be freeze and wrap text property
to work after exporting in my report in excel but its not working ,is there any solution ? any patch ? any other XML code for different rendering ?Hi Amol,
According to your description, you find the wrap text property and fix column is not working after exporting into Excel. Right?
In Reporting Services, when exporting to excel file, it has limitation for textbox.
Text boxes are rendered within one Excel cell. Font size, font face, decoration, and font style are the only formatting that is supported on individual text within an Excel cell.
Excel adds a default padding of approximately 3.75 points to the left and right sides of cells. If a text box’s padding settings are less than 3.75 points and is just barely wide enough to accommodate the text, the text may wrap in Excel.
In this scenario, it supposed to be wrap text unless you merge cells. If cells are merged, word-wrap does not work correctly. If any merged cells exist on a row where a text box is rendered with the
AutoSize property, autosize will not work. For the Fix Data Property, it can't be working in Excel. These are features when exporting to Excel. We can't change it because it's by design.
Reference:
Exporting to Microsoft Excel (Report Builder and SSRS)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Searching for a string in an excel file and return true if found.
How can I search for a string in an excel file and return true if found, its location and also a value.
The problem with searching an excel file is that it contains a header. It would be easiest if you just read the file into a LabVIEW array and search the array. This way you can also get the index and the value of the location.
-
Can i search multiple sheets in a document for text in column a to return the entire row if column a matches in a
separate sheet?Thank you, Barry. That was helpful, and am hopeful that what I want to do is possible.
I am creating a spreadsheet that currently has 20 sheets, of which certain sheets have more than one table. I will be adding more sheets. I would like to return results for all occurences of the search string. Preferably into a seperate spreadsheet. It would be perfect if that seperate sheet updated whenever I update information in the first spreadsheet. To give an example:
Sheet: baskets
Tables: straw
wire
Sheet: barware
Tables: glasses
decanters
coasters
My tables all have the same titiels:
Vendor Description Cost Selling Price
Since I will have upwards of 100 sheets, with multiple tables, and most of my vendors will fit into multiple sheet categories, it would be helpful if I could also see what my order will be from each vendor, not just who I will be ordering each item from. How would I do that?
I hope I conveyed that properly.
Thank you in advance for your help,
Rana -
I have an 800 page pdf document to index and so far I have a script that will search for a list of keywords. But the text has large sections of code in a different font, and I think we would like to generate an index of just code examples. Is there a way to search for text of a given font in applescript? Something like
set theSel to find text theText
if the font of theSel is "Times"
write to file, etc.Please do send a page, I might be able to spot where the font problem is coming from - but no guarantee Address is in my profile.
You asked about the script formatter. red_menace of this forum wrote the script I use. To use it, you copy the script that you want to format to the clipboard and run the formatter. This then places the marked-up text in the clipboard so that you can paste it into the forum page.
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;">
script formatter - formats the clipboard text for forum posting
last reviewed January 19, 2009 red_menace[at]mac[dot]com
Input: text read from the clipboard
Output: formatted text copied to the clipboard
set AppleScript's text item delimiters to " "
-- some constants and switches
property TextColor : "#000000" -- black (see http://www.w3schools.com/tags/ref_colornames.asp)
property BackgroundColor : "#FFDDFF" -- a light plum/purple
property BorderColor : "#000000" -- black
property TheWidth : "width: 720px; " -- a width attribute (deprecated in HTML 4.01)
property UseWidth : true -- use the width attribute?
property LineCount : 25 -- the number of lines before including the height attribute
property TheHeight : "height: " & ((LineCount * 13.6) as integer) & "px; " -- a maximum height for the <pre> box
property Emphasize : false -- emphasise (bold) the script text?
property UseURL : false -- include a Script Editor message link?
property AltURL : false -- use an alternate URL encoding?
property ToolTips : {¬
"this text can be pasted into the Script Editor", ¬
"this text can be pasted into an Automator 'Run AppleScript' action", ¬
"this text can be pasted into an Automator 'Run Shell Script' action", ¬
"this text can be pasted into a HTML editor", ¬
"this text can be pasted into a text editor", ¬
"- none -"}
property TooltipDefault : {item 1 of ToolTips} -- keep track of the last tooltip used
property TempFile : "Script_Formatter_TempFile" -- a temporary work file
try
-- write the clipboard to the temporary file
set TheClipboard to (the clipboard) as text
if TheClipboard is in {"", space, tab, return} then return -- clipboard is (basically) empty
set MyOpenFile to open for access ("/tmp/" & TempFile & ".txt" as POSIX file) with write permission
set eof of MyOpenFile to 0 -- empty any previous temp file
write TheClipboard to MyOpenFile
close access MyOpenFile
if UseURL then
-- encode URL (see http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/pydoc.1. html)
do shell script "/usr/bin/python -c 'import sys, urllib; print urllib.quote(sys.argv[1])' " & quoted form of TheClipboard
-- add a link wrapper
set URLtext to "applescript://com.apple.scripteditor?action=new&script=" & the result
if AltURL then -- use an alternate URL encoding
set URLtext to "Click here to [url=" & URLtext & "]open this script in the Script Editor[/url]:<br />"
else -- use HTML anchor tag
set URLtext to "Click here to <a href=\"" & URLtext & "\">open this script in the Script Editor</a>:<br />"
end if
set PromptText to ((count URLtext) as text) & " URL and "
else
set {URLtext, PromptText} to {"", ""}
end if -- UseURL
-- convert to HTML (see http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/textutil .1.html)
do shell script "cd /tmp/; /usr/bin/textutil -convert html -excludedelements '(html, head, title, body, p, span, font)' -encoding US-ASCII " & TempFile & ".txt"
-- fix up some formatting and add a pre wrapper (see http://www.w3schools.com/tags/default.asp)
set HTMLtext to rest of paragraphs of (read ("/tmp/" & TempFile & ".html" as POSIX file))
if (count HTMLtext) is less than LineCount then -- skip the height attribute
set Height to ""
else
set Height to TheHeight
end if
set HTMLtext to FixCharacters from (HTMLtext as text) -- additional character encodings
if UseWidth then
set Width to TheWidth
else
set Width to ""
end if
if Emphasize then set HTMLtext to "<strong>" & HTMLtext & "</strong>"
set HTMLtext to "<pre style=\"
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid " & BorderColor & ";
" & Width & Height & "
color: " & TextColor & ";
background-color: " & BackgroundColor & ";
overflow: auto;\"
title=\"\">
" & HTMLtext & "</pre>
-- assemble everything on the clipboard
set TheResult to choose from list ToolTips ¬
with title "Script Formatted" with prompt PromptText & ((count HTMLtext) as text) & " HTML characters will be placed on the clipboard (plus the following ToolTip):" default items TooltipDefault OK button name "OK" cancel button name "Cancel" with empty selection allowed without multiple selections allowed
if TheResult is false then -- cancel button
error number -128
else -- add the selected title attribute (tooltip), if any
set TooltipDefault to TheResult as text
set Here to (offset of " title=" in HTMLtext) - 1
set There to (offset of ">" in HTMLtext) - 1
if TheResult is in {{}, "- none -"} then -- no tooltip
set the clipboard to URLtext & (text 1 thru (Here - 1) of HTMLtext) & (text (There + 1) thru -1 of HTMLtext)
else
set the clipboard to URLtext & (text 1 thru (Here + 9) of HTMLtext) & TheResult & (text There thru -1 of HTMLtext)
end if
end if -- TheResult is false
on error ErrorMessage number ErrorNumber
log space & (ErrorNumber as text) & ":" & tab & ErrorMessage
try
close access MyOpenFile
end try
if (ErrorNumber is -128) or (ErrorNumber is -1711) then -- nothing (user cancelled)
else
activate me
display alert "Error " & (ErrorNumber as text) message ErrorMessage as warning buttons {"OK"} default button "OK"
end if
end try
to FixCharacters from TheText
fixes (converts) formatting characters used in some message forums (see http://www.asciitable.com/)
parameters - TheText [text]: the text to fix
returns [text]: the fixed text
-- this list of lists contains the characters to encode - item 1 is the character, item 2 is the HTML encoding
set TheCharacters to {¬
{"!", "!"}, ¬
{"*", "*"}, ¬
{"+", "+"}, ¬
{"-", "-"}, ¬
{"[", "["}, ¬
{"\\", "\"}, ¬
{"]", "]"}, ¬
{"^", "^"}, ¬
{"_", "_"}, ¬
{"~", "~"}}
set TempTID to AppleScript's text item delimiters
repeat with SomeCharacter in TheCharacters
if item 1 of SomeCharacter is in TheText then -- replace
set AppleScript's text item delimiters to item 1 of SomeCharacter
set the ItemList to text items of TheText
set AppleScript's text item delimiters to item 2 of SomeCharacter
set TheText to the ItemList as text
end if
end repeat
set AppleScript's text item delimiters to TempTID
return TheText
end FixCharacters
</pre> -
Validation for text field: Null and contains no spaces
Currently on APEX 3.2
I want to check 1 text field and 2 text areas to ensure they are not null and blank (hitting the space bar in the field) before submitting the page. How do I do both validations for on each field?I created a validation with a type of 'Function Returning Boolean' and using the following code in the expression:
IF( TRIM( :P1_Text_Field) IS NULL
Or LTRIM( :P1_Text_Field ) != :P1_Text_Field )
THEN
RETURN false;
ELSE
RETURN true;
END IF;
Edited by: Jeremy_F on Apr 12, 2012 8:15 AM -
Can I use the value returned from a Text Function in another Formula?
I'm writing a report in Hyperion System 9 BI + Financial Reporting Studio version 9.2. I have 2 grids in my report.
Grid1 Column A is set up as a text function using the function type - <<GetCell("Grid2", 1, a, 1)>>. I would like to use the values returned from this text function in Column A (Grid 1) in a formula in Column B (Grid 1).
Is it possible to use the values returned in Column A of the text function in another formula? My report does not seem to recognize Column A as numerical values, even though the values to be returned are numerical.
If so, how do I recognize the values in Column A Grid 1 as numerical values and not text?
Thanks for any help you can offer!Hi Edson,
Yes you need to use the CALC_ERROR macro function to be able to test whether the last macro function returned an error. CALC_ERROR will return an 'X' if there an error occured during the execution of the last macro function.
You can use a macro similar to the following:
IF
CALC_ERROR( )
= 'X'
DO SOMETHING HERE
ENDIF
Let me explain how this works internally. The SAP system maintains a global variable g_flg_calc_error during the execution of macros in the planning book. The g_flg_calc_error variable will contain the value of f_calc_error that was set by the last macro function which executed. The ABAP coding of a planning book is something like this:
data: g_flg_calc_error type /SAPAPO/FLAG.
* SAP will pass g_flg_calc_error variable to all macro
* functions. When SAP calls a macro function, it does
* something like this.
call function '/SAPAPO/MACRO_FUNCTION_HERE'
exporting
plob_values = i_s_adv_plob_values
sdp_book = g_c_advf_sdp_book
sdp_view = g_c_advf_sdp_view
tables
cols_index = i_t_cols
value_tab = l_t_value_tab
changing
f_calc_error = g_flg_calc_error
As you can see, the g_flg_calc_error variable
is passed in the "changing" part of the call. The macro function being called can then use the f_calc_error
variable to change the value of the global
g_flg_calc_error variable. In fact, the macro function being called can also check (by looking at the f_calc_error variable) if the last macro function reported an error. The CALC_ERROR macro function just checks the value of f_calc_error parameter (w/c in fact is the value of the g_flg_calc_error variable) and returns "true/X" if the f_calc_error was set to true by the last macro function.
Hope this helps in clearing things out -
Best external monitor for text editing
Hi all - I have a 2011 MBP and want to connect it to an external monitor (+ mouse and keyboard) for text editing and web browsing. Text clarity is very important to me. First I've tried to connect a mainstream Acer monitor, and then Lenovo ThinkVision eIPS LT2452pwc at work, and in both cases Mac fonts looked somewhat "fuzzy" where Windows and Linux fonts looked nice and sharp. In all cases I've used native screen resolution. There is nothing wrong with Laptop either (I tried a couple), and it has probably to do with different antialiasing algorithm that Apple is using, which looks good on higher pixel density laptop panels, but not that great on exteranal monitors.
So... any advice from those using Macs with external monitor for text tasks? Obviously there are Mac displays, but I have some concerns about the glare. Then I heard good feedback about Dell UltraSharp and NEC IPS monitors. Trully appreciate your input for somebody new to Mac.Yes, I did get Dell Ultrasharp U2713HM. I am happy with it with one caviat (which would be the same for 27 Apple monitor). The picture quality is absolutely amazing - the text is very shart and clear, I can't imagine it to be better. The color is very good and natural, plenty of brigtness and contrast to produce a good picture in any light conditions, plus *no glare* screen surface, arguably making this monitor better than the Apple monitor.
The somewhat unexpected caviat is that since this monitor packs pretty high resolution in a 27" screen, the text appears smaller than on most other monitors (but would be the same as on Apple 27" monitor). It even *appears* smaller than on my 13" Macbook Pro, however at closer examination, that turned out to be not true. The text on the monitor is actually bigger than on laptop, but looks smaller since typically the external monitor is farther away from the eyes than a laptop monitor.
At first I wanted to return the monitor and exchange for smaller and lower DPI (read bigger text) 24" Ultrasharp, but then got used to my 27" monitor and decided to keep it. Hope this helps. -
Content repository - Multiple unrestricted ordering issue for a property
Hi there,
I have a problem in terms of getting the correct ordering for a property that I have defined in the BEA Content Repository. Does anyone know what can be done?
Below is a description of what I am doing. I hope someone can help me order the vector returned or advise me on a better way on doing this. Thanks for your help in advance!
Andrew
Description
In the BE Content Repository, I have set up a type with properties set to "Multiple Unrestricted" and of Data Type "String". Basically the entries for this property will be used to fill in a table on my HTML page.
e.g.
column_1 Multiple Unrestricted String
column_2 Multiple Unrestricted String
column_3 Multiple Unrestricted String
column_4 Multiple Unrestricted String
What I am planning to do is fill this in for say the weather. Column 1 will be the city name, column 2 will be the temperature, column 3 will be another city name and column 4 will be the temperature.
e.g.
Column 1 | Column 2 | Column 3 | Column 4
=========================================
City 1 | 12-20C | City 2 | 14-19C
City 3 | 20-25C | City 4 | 25-30C
City 5 | 5-10C | City 6 | -10-5C
and so on...
So for the defined content item I have entered in the following:
column_1 >> "City 1", "City 3", "City 5"
column_2 >> "12-20C", "20-25C", "25-30C"
column_3 >> "City 2", "City 4", "City 6"
column_4 >> "14-19C", "25-30C", "-10-5C"
However when I reference the content item in my HTML page, the ordering in the returned vector is totally different to the way in which i entered the data into the content repository...
I access the information this way:
<cm:getProperty resultId="vect_col_1" node="<%= content_node%>" name= "<%= RepositoryProps.COLUMN_1%>" isMultiple="true" resultType="String" />
Thanks for your help!Hi there,
I have a problem in terms of getting the correct ordering for a property that I have defined in the BEA Content Repository. Does anyone know what can be done?
Below is a description of what I am doing. I hope someone can help me order the vector returned or advise me on a better way on doing this. Thanks for your help in advance!
Andrew
Description
In the BE Content Repository, I have set up a type with properties set to "Multiple Unrestricted" and of Data Type "String". Basically the entries for this property will be used to fill in a table on my HTML page.
e.g.
column_1 Multiple Unrestricted String
column_2 Multiple Unrestricted String
column_3 Multiple Unrestricted String
column_4 Multiple Unrestricted String
What I am planning to do is fill this in for say the weather. Column 1 will be the city name, column 2 will be the temperature, column 3 will be another city name and column 4 will be the temperature.
e.g.
Column 1 | Column 2 | Column 3 | Column 4
=========================================
City 1 | 12-20C | City 2 | 14-19C
City 3 | 20-25C | City 4 | 25-30C
City 5 | 5-10C | City 6 | -10-5C
and so on...
So for the defined content item I have entered in the following:
column_1 >> "City 1", "City 3", "City 5"
column_2 >> "12-20C", "20-25C", "25-30C"
column_3 >> "City 2", "City 4", "City 6"
column_4 >> "14-19C", "25-30C", "-10-5C"
However when I reference the content item in my HTML page, the ordering in the returned vector is totally different to the way in which i entered the data into the content repository...
I access the information this way:
<cm:getProperty resultId="vect_col_1" node="<%= content_node%>" name= "<%= RepositoryProps.COLUMN_1%>" isMultiple="true" resultType="String" />
Thanks for your help! -
Customizing Undo for Text Editor
Hi,
After some effort, I finally made the undo action on the menu to work. But all it does it add or remove the last action that was performed. For instance, if I enter "abc" in the text area and I undo it, it would be "ab". What I want from the editor is to bring back whatever I've entered before pressing "Backspace" or "del" button. Just like Windows Notepad.
For the implimentaion, I have this method:
output.getDocument().addUndoableEditListener(new UndoableEditListener() {
public void undoableEditHappened(UndoableEditEvent e) {
undoManager.addEdit(e.getEdit()) ;
updateButtons();
I know I have to alter the above code somehow, but I'm not sure what am I supposed to do with it.
Any help is appreciated.Here is a class I called CompoundUndoManager, which may be what you are looking for:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.text.*;
import javax.swing.event.*;
import javax.swing.undo.*;
public class CompoundUndoManager extends UndoManager implements UndoableEditListener
public CompoundEdit compoundEdit;
private JTextComponent editor;
private int lastOffset;
public CompoundUndoManager(JTextComponent editor)
this.editor = editor;
editor.getDocument().addUndoableEditListener( this );
** Whenever an UndoableEdit happens the edit will either be absorbed
** by the current compound edit or a new compound edit will be started
public void undoableEditHappened(UndoableEditEvent e)
// Start a new compound edit
if (compoundEdit == null)
compoundEdit = startCompoundEdit( e.getEdit() );
return;
// Check for an incremental edit, backspace or attribute change
AbstractDocument.DefaultDocumentEvent event =
(AbstractDocument.DefaultDocumentEvent)e.getEdit();
System.out.println(event.getLength());
int diff = editor.getCaretPosition() - lastOffset;
if (Math.abs(diff) == 1
|| event.getType().equals(DocumentEvent.EventType.CHANGE) )
compoundEdit.addEdit( e.getEdit() );
lastOffset += diff;
return;
// Not incremental edit, end previous edit and start a new one
compoundEdit.end();
compoundEdit = startCompoundEdit( e.getEdit() );
** Each CompoundEdit will store a group of related incremental edits
** (ie. each character typed or backspaced is an incremental edit)
private CompoundEdit startCompoundEdit(UndoableEdit anEdit)
// Track the starting offset of this compound edit
lastOffset = editor.getCaretPosition();
// The compound edit is used to store incremental edits
compoundEdit = new MyCompoundEdit();
compoundEdit.addEdit( anEdit );
// The compound edit is added to the UndoManager. All incremental
// edits stored in the compound edit will be undone/redone at once
addEdit( compoundEdit );
return compoundEdit;
class MyCompoundEdit extends CompoundEdit
public boolean isInProgress()
// in order for the canUndo() and canRedo() methods to work
// assume that the compound edit is never in progress
return false;
public void undo() throws CannotUndoException
// End the edit so future edits don't get absorbed by this edit
if (compoundEdit != null)
compoundEdit.end();
super.undo();
// Always start a new compound edit after an undo
compoundEdit = null;
public static void main(String[] args)
final JTextPane textPane = new JTextPane();
textPane.setPreferredSize( new Dimension(200, 200) );
// Comment out this code when not using SyntaxDocument class
// http://www.discoverteenergy.com/files/SyntaxDocument.java
EditorKit editorKit = new StyledEditorKit()
public Document createDefaultDocument()
return new SyntaxDocument();
textPane.setEditorKit(editorKit);
final CompoundUndoManager undoManager = new CompoundUndoManager( textPane );
JPanel panel = new JPanel();
panel.setLayout( new BorderLayout() );
panel.add( new JScrollPane(textPane), BorderLayout.CENTER );
JPanel buttons = new JPanel();
panel.add(buttons, BorderLayout.SOUTH);
JButton undo = new JButton( "Undo" );
undo.addActionListener( new ActionListener()
public void actionPerformed(ActionEvent e)
try
undoManager.undo();
textPane.requestFocus();
catch (CannotUndoException ex)
System.out.println("Unable to undo: " + ex);
buttons.add( undo );
JButton redo = new JButton( "Redo" );
redo.addActionListener( new ActionListener()
public void actionPerformed(ActionEvent e)
try
undoManager.redo();
textPane.requestFocus();
catch (CannotRedoException ex)
System.out.println("Unable to redo: " + ex);
buttons.add( redo );
JFrame frame = new JFrame("Compound Edit");
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
frame.getContentPane().add( panel );
frame.pack();
frame.setVisible(true);
} -
Alert Content for text without any XML tag
Hi All,
For the XML workflow,
Need a alert content or select content for the text without any xml tag.
Please help for my XML job request.
Regards
SirajHi All,
New to XML, just learning stage only.
Already I asked and got the coding through forum. It alert text frame ID only.
But, guide me how to get the
1. alert or select the contents.
2. alert the page number or select text frame etc.
Coding is below:
#target InDesign
#include "/Applications/Adobe InDesign CS6/Scripts/Xml Rules/glue code.jsx"
main();
exit();
function main() {
var myDoc = app.activeDocument;
var myStories = myDoc.stories.everyItem().getElements();
var idArray = new Array(0);
var storyArray = new Array(0);
// store all stories of the document in an array
for(var j=0; j < myStories.length; j++) {
storyArray.push(myStories[j].id);
// *** here start the XML-Rules ******************************//
var elements = myDoc.xmlElements;
var myRuleSet = new Array(
alleObj = new all(idArray)
__processRuleSet(elements.item(0), myRuleSet);
// *** here stop the XML-Rules *******************************//
for (var i=0; i < idArray.length; i++) {
for (var k=0; k < storyArray.length; k++) {
if (idArray[i] == storyArray[k]) {
storyArray[k] = -1;
for (var i=0; i < storyArray.length; i++) {
if (storyArray[i] > 0) {
alert(storyArray[i]);
} // if …
} // for()
} // main()
// XML-Rule
function all(idArray) {
this.name = "all";
this.xpath = "//*";
this.apply = function(myElement, myRuleProcessor) {
var storyId = myElement.parentStory.id;
var i=0, found = false;
while ((i < idArray.length) && (!found)) {
if (idArray[i++] == storyId) found=true;
// store anly the number of the stories which are not stored up to now
if (!found) idArray.push(storyId);
return true;
} // this.apply
} // all()
Regards
Siraj
Maybe you are looking for
-
Error while making joins between ODS in a Infoset
I am getting these 2 errors while making a join between ODS In InfoSet 1).Incomplete ON conditions in an outer join 2).Invalid ON condition for left outer join (ZSDO015) Please help what to do?
-
SRM - PO is not getting created.
Hi Team, I have created a free text shopping cart. I have assigned the vendor to the SC from sourcing cockpit . In the "Process Purchase Order", I was trying to create the PO. But the below message is showing. Vendor XXXXX is not permitted for autom
-
XSLT Mapping with Dynamic Configuration for Mail Adapter
Hi Guys, I am wondering if somebody can help me please. I have a requirement in which I need to pick up the file from FTP and email it to the user as an attachment with the same file name and content. I know it is possible via 3 method either by depl
-
To call subscreen in another screen
hi How to call a subscreen if i check certain checkbox.please help
-
IPhone in recovery mode can not be restored
Phone was unplugged from PC while updating software. Now receiving messge "The iPhone 'iPhone' could not be restored. The device cannot be found." Phone displays the connect to iTunes; I have the latest version of iTunes installed. No error codes dis