Re: Incompatible type for declaration.

2003-03-27 Thread Wadhwa, Amit
use BBUser aUser = (BBUser)theUser.getUserID();

or

public BBUser getUserID()
{
 return (BBUser)m_userID.toUpperCase().trim();
}

or

public Object getUserID()  (** not sure about this one **)
{
 return (BBUser)m_userID.toUpperCase().trim();
}


Amit

-Original Message-
From: Avy Wong [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 2:24 AM
To: [EMAIL PROTECTED]
Subject: Incompatible type for declaration.


Hello,
I am learning JSP as I go
Can anyone tell me how to set it up so that I use aUser to fetch
stuff inside BBUser

Many, many thanks,
Ngai


--
<%
HttpSession mySession = pageContext.getSession();
if(mySession.getAttribute("User") == null)
{
%>

self.location = "index.jsp";

<%
}
else
{


BBUser theUser = (BBUser) mySession.getAttribute("User");
BBClient theClient= theUser.getClient();

BBUser aUser = theUser.getUserID();<~~ what to do???  I want to set
it up so that I can call everything inside BBUser. ...

getUserID return a String ( see method below)

String temp_User_Action =
OPSys.stripNull(request.getParameter("userAction"));

String temp_Dealer_ID  =
OPSys.stripNull(request.getParameter("dealerID"));
String temp_User_ID =
OPSys.stripNull(request.getParameter("userID"));
String temp_User_Name =
OPSys.stripNull(request.getParameter("userName"));

if(!temp_User_Action.equals("addUser"))

{

aUser = BBUser.getUser(temp_User_ID); <~~ before of previous
problem, I can't set this up properly..need help on this !!

temp_User_Name = aUser.getName();

}
}
-

An error occurred between lines: 30 and 123 in the jsp file: /mUser.jsp
Generated servlet error:
D:\Tomcat\work\Standalone\localhost\BB\mUser$jsp.java:115: Incompatible type
for declaration. Can't convert java.lang.String to com.bb.BBUser.
BBUser aUser = theUser.getUserID();
 1 error, 1 warning

--
In the methods of BBUser, this is one of the method called getUserID().

public String getUserID()
{
  return m_userID.toUpperCase().trim();


-

==To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com


Re: Sorry little bit off track

2003-03-12 Thread Wadhwa, Amit
>window.close();
>window.history.go(-1);
these 2 apply to the same window which is not possible.


-Original Message-
From: Isidoros [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 3:01 PM
To: [EMAIL PROTECTED]
Subject: Re: Sorry little bit off track


try this in the getIt function:
window.opener.test.action = value.
instead of giving value to the document.test
i suppose test is the name of the form right??

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED] Behalf Of Snehal Pandya
Sent: Wednesday, March 12, 2003 7:04 AM
To: [EMAIL PROTECTED]
Subject: Sorry little bit off track


hi friends,


  I have problem with the Java Script. I am  openning a child window
get select the value then the value will come to the parent window. I
have
tried it in HTML file but I am not getting .
I am sending you the code what I have written .

IF possible then send me the answer...

this is parenet window

function windowOpen(){
  //alert("it is called")
  document.test.action="b.html";
  document.test.method="post"
  document.test.target="_new";
  document.test.submit();
}

and this is childs function

function getIt(){
window.opener.document.test.action="a.html";
window.opener.document.test.method="post";
window.opener.document.test.submit();
window.close();
window.history.go(-1);
}
Please send me the mistakes where I am wrong...

Thanks in advance...

Snehal


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com