How to obtain the current panel name
Hi
Is there a way to get, with a function or something, the name of the current Panel I am on?
Thanks,
Daniel
Hi
Is there a way to get, with a function or something,
the name of the current Panel I am on?
Thanks,
DanielYes there is a way.
A far quicker way of getting an answer to such a basic question is to consult the API documentation at http://java.sun.com/j2se/1.5.0/docs/api/
If you have already looked and couldnt fin the answer then have a look at the methods inherited.
Similar Messages
-
A very simple question: how to obtain the mail server name?
In our JSP application, at one point an email will be sent to notify one event. Currently, that is done by using the html tag: mailto. To have more control on the email in tems of context format (a bad layout right now) and others. I would like to have it processed at servlet by using the JavaMail API, so that it have a nice format and have the sender's email address right in case email client is not installed in the machine where the browser in. The JavaMail API is straight forward. The question is how to obtain the mail server name, and the sender's email address if there is one?
Thanks.
v.How to obtain the mail server's name? It's your server, you should know its name. Or if it isn't your server, you should ask the administrator for its name. Point is, you need to decide in advance what server you are going to use and hard-code its name into the program or into a properties file.
And how to obtain the client's e-mail address? You have to ask the client, probably by putting a box in the HTML and asking them to type it. -
How to get the current schema name
Hi,
Can anybody please tell me how to get the current schema name, there is some inbuilt function for this,but i am not getting that. Please help me.
Thanks
Jogeshok folks, I found the answer at Tom's as usual.
http://asktom.oracle.com/tkyte/who_called_me/index.html
I rewrote it into a function for kicks. just pass the results of DBMS_UTILITY.FORMAT_CALL_STACK to this function and you will get back the owner of the code making the call as well some extra goodies like the name of the code and the type of code depending on the parameter. This ignores the AUTHID CURRENT_USER issues which muddles the schemaid. Quick question, does the average user always have access to DBMS_UTILITY.FORMAT_CALL_STACK or does this get locked down on some systems?
cheers,
paul
create or replace
FUNCTION SELF_EXAM (
p_call_stack VARCHAR2,
p_type VARCHAR2 DEFAULT 'SCHEMA'
) RETURN VARCHAR2
AS
str_stack VARCHAR2(4000);
int_n PLS_INTEGER;
str_line VARCHAR2(255);
found_stack BOOLEAN DEFAULT FALSE;
int_cnt PLS_INTEGER := 0;
str_caller VARCHAR2(30);
str_name VARCHAR2(30);
str_owner VARCHAR2(30);
str_type VARCHAR2(30);
BEGIN
str_stack := p_call_stack;
-- Loop through each line of the call stack
LOOP
int_n := INSTR( str_stack, chr(10) );
EXIT WHEN int_cnt = 3 OR int_n IS NULL OR int_n = 0;
-- get the line
str_line := SUBSTR( str_stack, 1, int_n - 1 );
-- remove the line from the stack str
str_stack := substr( str_stack, int_n + 1 );
IF NOT found_stack
THEN
IF str_line like '%handle%number%name%'
THEN
found_stack := TRUE;
END IF;
ELSE
int_cnt := int_cnt + 1;
-- cnt = 1 is ME
-- cnt = 2 is MY Caller
-- cnt = 3 is Their Caller
IF int_cnt = 1
THEN
str_line := SUBSTR( str_line, 22 );
dbms_output.put_line('->' || str_line);
IF str_line LIKE 'pr%'
THEN
int_n := LENGTH('procedure ');
ELSIF str_line LIKE 'fun%'
THEN
int_n := LENGTH('function ');
ELSIF str_line LIKE 'package body%'
THEN
int_n := LENGTH('package body ');
ELSIF str_line LIKE 'pack%'
THEN
int_n := LENGTH('package ');
ELSIF str_line LIKE 'anonymous%'
THEN
int_n := LENGTH('anonymous block ');
ELSE
int_n := null;
END IF;
IF int_n IS NOT NULL
THEN
str_type := LTRIM(RTRIM(UPPER(SUBSTR( str_line, 1, int_n - 1 ))));
ELSE
str_type := 'TRIGGER';
END IF;
str_line := SUBSTR( str_line, NVL(int_n,1) );
int_n := INSTR( str_line, '.' );
str_owner := LTRIM(RTRIM(SUBSTR( str_line, 1, int_n - 1 )));
str_name := LTRIM(RTRIM(SUBSTR( str_line, int_n + 1 )));
END IF;
END IF;
END LOOP;
IF UPPER(p_type) = 'NAME'
THEN
RETURN str_name;
ELSIF UPPER(p_type) = 'SCHEMA.NAME'
OR UPPER(p_type) = 'OWNER.NAME'
THEN
RETURN str_owner || '.' || str_name;
ELSIF UPPER(p_type) = 'TYPE'
THEN
RETURN str_type;
ELSE
RETURN str_owner;
END IF;
END SELF_EXAM; -
How to get the current function name in java
How to get the current function name in java.
In c it is done as
printf("%s",__func__);
Thanx in advance.j0o wrote:
System.out.println("Class Name: " + new Exception().getStackTrace()[0].getClassName() +
"/n Method Name : " + new Exception().getStackTrace()[0].getMethodName() +
"/n Line number : " + new Exception().getStackTrace()[0].getLineNumber());
I pointed the OP at this approach yesterday in one of his multi-posts. I still have not been given my Dukes! -
InfoPath 2013: How to find the current file name?
Hello,
Is there any way to find the file name in the rule formulas when an existing xml file in a sharepoint form library is being edited in InfoPath? I am looking for a function that returns the current file name that is being edited.
Thank you,Hi,
According to your post, my understanding is that you want to get the current file name in the InfoPath form.
Here is a similar thread for you to take a look at:
http://social.technet.microsoft.com/Forums/en-US/a24f01d5-744c-4b75-b30d-3295311ab054/how-do-i-find-the-file-name-of-the-currently-open-infopath-form?forum=sharepointcustomizationlegacy
Best Regards
Dennis Guo
TechNet Community Support -
Uix frameset - how to get the current frame name?
I have a frameset with 3 different frames in it. a top, center and bottom.
There is a menu in the top frame that changes the contents of the center or bottom frame.
How can I get the value of the frame name for the current frame into a bound value like a httpsession or page?
for example if I change the center frame to "listadmin.uix" how can I load a bound value with the frames new source?
Is there a way to pass javascript to a boundvalue? I could get the frames new properties from javascriptIn Jdev 9.0.3 you could do something like this:<frameBorderLayout>
<start>
<frame name="sideFrame">
<boundAttribute name="source">
<ctrl:pageURL name="sideFramePage">
<ctrl:properties>
<ctrl:property key="currentFrame"
value="sideFrame"/>
</
</
</
</
</
</then in startFramePage.uix you can access the current frame name by doing:<styledText data:text="currentFrame@ctrl:page"/> -
How to obtain the updated column name in a trigger?
Hello everyone,
I need to know for audit propose the updated column name in a After Update Trigger on a Table.
The table have more than 20 columns, and i think that do more than 20 conditions asking for the difference between the :new value and the :old value is not the best way.
Thanks for the help!
LCJHi,
Thanks to all for the replays.
I didn't know that i can pass the column name to the UPDATING. This is only possible on 10g??
Any way, i pass the column name and works fine, but i have another issue because of that.
I obtain the column name from a cursor that query user_tab_columns view, when i try to obtain the value of the :old or :new, i can't because i don't know how to obtain the value of the value.
This example show better:
DECLARE
vOldValue Varchar2(50);
Cursor cur_Column_Names Is
Select COLUMN_NAME
From User_Tab_Columns
Where TABLE_NAME = 'table_name';
BEGIN
For var_cursor In cur_Column_Names Loop
If Updating(var_cursor.COLUMN_NAME) Then
vOldValue := '?'; -- How obtain the value of the :old. + >var_cursor.COLUMN_NAME??
End If;
End Loop;
END;Thanks to all for the help.
LCJ -
How to get the current class name in static method?
Hi,
I'd like to get the current class name in a static method. This class is intended to be extended. So I would expect that the subclass need not to override this method and at the runtime, the method can get the subclass name.
getClass() doesn't work, because it is not a static method.
I would suggest Java to make getClass() static. It makes sense.
But in the mean time, does anybody give an idea to work around it?
Thank you,
BillWhy not create an instance in a static method and use getClass() of the instance?
public class Test {
public static Class getClassName() {
return new Test().getClass(); -
How to find the current User Name and stored in which table
In which table the current user name (Login) is stored?
Hi Mohanapriya
The query provided by Gordon can not run on query generator as the $USER is a runtime variable.
You need to save it to a query then use it in a FMS(Formatted Search.)
Just open a form(ex:sales order ), click the field in which you want to show the user name,
then press ****+F2 or Tools->Search Function->Define,
Search by Saved query,then assign the save query to the field.
After that ,you can run the FMS(shift+F2) to get the current user info.
Regards,
Syn Qin
SAP Business One Forums Team -
I own a copy of lightroom 5 (a download copy) and have had to install a new hard disk. I can't remember how I got the current copy but I think I may have downloaded a monthly rental copy because the program is asking me to pay a subscription fee. I was expecting to get a message to install my serial numbers.
You downloaded the trial version for the creative cloud. It doesn't work with a serial number. It is licensed differently. You will have to uninstall it and then download and install from here:
Product updates -
Indesign CS3: How to get the current document name?
Hallo!
How do I get the name of the current document loaded in Indesign?
Thanks,
Alois Blaimer...Plese Ignore the last post...<br /><br />docRef is the UIDRef of the document. Plese consider the following code<br /><br />IDocument *docFrom = Utils<ILayoutUIUtils>()->GetFrontDocument(); <br />if (docFrom == NULL ) <br /> break; <br />UIDRef docRef = GetUIDRef(docFrom )); <br /><br />InterfacePtr<IDocument> iDocument (docRef, IID_IDOCUMENT); <br />if(iDocument == nil) <br /> break; <br /><br />PMString docName; <br />iDocument->GetName(docName);
-
How to determine the Current Domain name from inside an Mbean / Java Prog
We have registered an Application Defined MBean. The mbean has several APIs. Now we want to determine the currrent domain using some java api inside this Mbean. Similarly we have deployed a Webapp/Service in the Weblogic domain. And inside this app we need to know the current Domain. Is there any java api that will give this runtime information.
Note: We are the MBean providers not clients who can connect to the WLS (using user/passwd) and get the domain MBean and determine the domain.
Fusion ApplcoreNot sure if this will address exactly what you are looking to do, but I use this technique all the time to access runtime JMX information from within a Weblogic deployed application without having to pass authentication credentials. You are limited, however, to what you can access via the RuntimeServiceMBean. The example class below shows how to retrieve the domain name and managed server name from within a Weblogic deployed application (System.out calls only included for simplicity in this example):
package com.yourcompany.jmx;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.naming.InitialContext;
public class JMXWrapper {
private static JMXWrapper instance = new JMXWrapper();
private String domainName;
private String managedServerName;
private JMXWrapper() {
public static JMXWrapper getInstance() {
return instance;
public String getDomainName() {
if (domainName == null) {
try {
MBeanServer server = getMBeanServer();
ObjectName domainMBean = (ObjectName) server.getAttribute(getRuntimeService(), "DomainConfiguration");
domainName = (String) server.getAttribute(domainMBean, "Name");
} catch (Exception ex) {
System.out.println("Caught Exception: " + ex);
ex.printStackTrace();
return domainName;
public String getManagedServerName() {
if (managedServerName == null) {
try {
managedServerName = (String) getMBeanServer().getAttribute(getRuntimeService(), "ServerName");
} catch (Exception ex) {
System.out.println("Caught Exception: " + ex);
ex.printStackTrace();
return managedServerName;
private MBeanServer getMBeanServer() {
MBeanServer retval = null;
InitialContext ctx = null;
try {
//fetch the RuntimeServerMBean using the
//MBeanServer interface
ctx = new InitialContext();
retval = (MBeanServer) ctx.lookup("java:comp/env/jmx/runtime");
} catch (Exception ex) {
System.out.println("Caught Exception: " + ex);
ex.printStackTrace();
} finally {
if (ctx != null) {
try {
ctx.close();
} catch (Exception dontCare) {
return retval;
private ObjectName getRuntimeService() {
ObjectName retval = null;
try {
retval = new ObjectName("com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean");
} catch (Exception ex) {
System.out.println("Caught Exception: " + ex);
ex.printStackTrace();
return retval;
}I then created a simply test JSP to call the JMXWrapper singleton and display retrieved values:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="com.yourcompany.jmx.JMXWrapper"%>
<%
JMXWrapper jmx = JMXWrapper.getInstance();
String domainName = jmx.getDomainName();
String managedServerName = jmx.getManagedServerName();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JMX Wrapper Test</title>
</head>
<body>
<h2>Domain Name: <%= domainName %></h2>
<h2>Managed Server Name: <%= managedServerName %></h2>
</body>
</html> -
How to know the current jvm name executable ?
Hi,
I should want know what is the current jvm executable, from a java program. For exemple c:\foo\bar\bin\java.exe, or /home/foo/bar/java_1.6/jre/bin/java and other.
With system properties, I can know java home, version, vendor etc of JVM, but how I can know "bin\java.exe" or other ?
Thanks.Yes.
I see java.runtime.name=Java(TM) SE Runtime Environment, I see the classpath, I see java.runtime.version=1.6.0_14-b08, I see java.home=/home/herve/java/jdk1.6.0_14/jre, but I don't see the name of java programme.
For me it is something like {java.home}/bin/java. I don't see that in system properties. -
How to get the current user name in Provider hosted app using appOnlyAccessToken
Hi,
Please help me, how to get the HostWeb UserName in Provider Hosted App
i have Provider hosted App, and Anonymous Authentication is enabled on AppWeb, using appOnlyAccessToken
Below code does not return current user who Log in in hostweb, it is returning
SharePoint App (app@sharepoint)
Web web = clientContext.Web;
clientContext.Load(web);
clientContext.ExecuteQuery();
clientContext.Load(web.CurrentUser);
clientContext.ExecuteQuery();
clientContext.Web.CurrentUser.LoginName;
Below code gives a blank name when Anonymous Authentication is enabled, if Anonymous Authentication is disabled
app prompts for credentials
HttpContext.Current.User.Identity.Name
Thanks
RamHi,
Since you are using a provider Hosted app if you want to get the current logged in name than do not use AppOnlyAccessToken else use AccessToken which is App + user Context AccessToken.
then
Web web = clientContext.Web;
clientContext.Load(web);
clientContext.ExecuteQuery();
clientContext.Load(web.CurrentUser);
clientContext.ExecuteQuery();
clientContext.Web.CurrentUser.LoginName;will return proper user Name.
HttpContext.Current.User.Identity.Name will never return the user as this object is related to IIS server of your App Server not sharepoint.you should set this as Anonymous in case of provider hosted app.you can download the below sample which uses the AccessToken which has user name in it.https://code.msdn.microsoft.com/Working-provider-hosted-8fdf2d95
Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer -
How to get the current user name of the host who is occupying a specific VM?
I'm developing a winform app with c# code to manage Hyper-V. I need to remind someone if he/she would take a VM which has already been occupied by others.
Is there any powershell cmd or WMI interface to get the current user of a specific VM?
Thanks!Hiya,
from cmd there are quser(Query user) and qwinsta(Query Session)
which should give you that. Don't know how you can incoorperate that in C#, but that should give you something to work with :)
https://technet.microsoft.com/en-us/library/cc785434.aspx
https://technet.microsoft.com/en-us/library/cc788125.aspx
Maybe you are looking for
-
Service ticket process caters to multiple product scenario ?
Hi All, We have an existing business process where in we use IC service ticket to trouble shoot customers problems. The process is a) Agent confirms the customer b) Agent registers the product or confirms the registered product. c) Agent creates the
-
HTML table display issues in Safari and Firefox
Hey, A few days ago, in both firefox and safari, i noticed that whenever i go to certain sites with (i'm assuming) what are HTML tables, they aren't displaying properly. The tables are going way bigger than they should. ex. When i go to craigslist.or
-
Copy of the scanning software - HPLJ 3330
Does anybody have a copy or can point me to it's location on the hp website (I"ve looked but nothing obvious) for the multifunction software that came with this unit. I have a user that I need to install if for and she doesn't know were her CD's are.
-
Cluster enviornment i get session failover exception
Hi All, In cluster enviornment i get session failover exception comes when one of my node is down . How can i inform all manage server at the time of creation of session object in cluster enviornment. Thanks in advance, Sumit Bhasin
-
Itunes 7.3.1 crashes windows xp
After rebooting from the 7.3.1 update my PC will no longer boot not even in safe mode or from a cd. A week later I installed it on my other PC and now have the same problem. Does Apple have a fix that anyone knows about? "Stop 0x0000007B (0xF78D6528,