• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
convert string to object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

convert string to object?


  • Subject: convert string to object?
  • From: "Janice M. Cheung" <email@hidden>
  • Date: Mon, 01 Dec 2003 12:48:42 -0500

   Hi there,

   Is there a simple function to convert a string to an object?

I am attempting to use something like this for outputting PDFs in WebObjects, so that
any selections from a dropdown menu (String type) will create those selected Objects
in a report:


Here is one of my functions to change selected String values into objects of type Department:
public java.lang.String toObject(){
String currentDept;
currentDept = toObject();
return currentDept;
}


I've also tried to set string types in Search.java and set them in Session.java to type Department, to
no avail:


   --- Search.java
   String m_currentDept;
   s.setCurrentDepartment(m_currentDept);

(basically I want "currentDept" to be converted to type Department)
--- Session.java
public Department currentDepartment(String currentDept){
return currentDepartment;
}


   public Department getCurrentDepartment(String currentDept){
      return currentDepartment;
   }

public void setCurrentDepartment(Department newCurrentDepartment){
currentDepartment=newCurrentDepartment;
}
These string values are retrieved as qualifiers from the database... any advice or guidance
would be greatly appreciated!!


   Thanks very much!

   Happy Happy Holidays!

   Janice
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: convert string to object?
      • From: arturo <email@hidden>
  • Prev by Date: [ANN] WOLips 1.0.7.40
  • Next by Date: Re: convert string to object?
  • Previous by thread: [ANN] WOLips 1.0.7.40
  • Next by thread: Re: convert string to object?
  • Index(es):
    • Date
    • Thread