• 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
Re: Customizing the app...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customizing the app...


  • Subject: Re: Customizing the app...
  • From: Nathan Dumar <email@hidden>
  • Date: Tue, 28 Dec 2004 13:42:58 -0500

Here's how I did it:

I have 3 text fields for generic use (called uF1, uF2, and uF3). Initially they have the values "Field 1", "Field 2", and "Field 3". The client can change the title of the field in a preference page, so that in forms and table displays, instead of saying "Field 3: <text field>" it can say, for example, "Comments: <text field>".

To do this, I made a separate table (called Preference) with two text fields. The first is something like "name" and the second something like "value". All of the preferences should probably get pre-loaded by your code so that you have a default value to display. If you're offering this on a per-user basis, then the user to pref would be one to many. Then, in a method within the session, I also set an NSDictionary with the user's preference values:

thisPrefSet = new NSDictionary((NSArray)thisUser.preferences().valueForKey("value"), (NSArray)thisUser.preferences().valueForKey("name"));

// thisPrefSet was defined and instantiated in session constructor

Inside the dictionary, it would look something like:
name		value
uF1		Field 1
uF2		Field 2
uF3		Comments

Now, in WOBuilder, it's easy to get to the values. If you want a WOString to have the value of one of the fields (uF3, for example), then set the value of the WOString to: session.thisPrefSet.uF3

The heading for the field (for example, in a form) would now be the desired, "Comments: <text field>"

There are countless ways to do it, but this seemed like it would be the easiest to me, when I was doing it.
(And thanks to the people on this list who helped me get it right!)


I hope that helps.

Take care,
Nathan


On Dec 28, 2004, at 1:02 PM, Jeremy Matthews wrote:

I have a few custom fields set aside in my project; I want the users to be able to name the custom field headings as they see fit. I've heard of a few different ways this can be done, but I'm not sure about it quite yet. The basic philosophy is to set certain items (first name) to my own hard-coded criteria, while allowing certain items to be customized by the user of the app.

Has anyone out there done this?

Thanks,
Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Customizing the app... (From: Jeremy Matthews <email@hidden>)

  • Prev by Date: Adding Third Party Java Class Files
  • Next by Date: Re: Adding Third Party Java Class Files
  • Previous by thread: Customizing the app...
  • Next by thread: Re: Cannot obtain globalId for an object which is not registered in any editingContext
  • Index(es):
    • Date
    • Thread