I thought you might want to secure it so that you set the company in the
webtop, rather than letting the user change their company. If they can
change it themselves, doesn't that mean that can pick a different company
at any time and then go and update data that doesn't belong to them?

Anyway, if you want to create an "edit user profile" page in the front end
of the site, you would do something like this:

1. Create a "type webskin" called something like displayTypeUserProfile.cfm
in a dmProfile folder
2. In that webskin, add an ft:form tag with an ft:object in which you pass
in the current logged in users objectid, and specify the fields you want in
the form (e.g. firstname, lastname, aCompany) and an ft:button for the Save
action
3. At the top of the same webskin, add a ft:processform tag for the Save
action and ft:processformobjects for the dmProfile object
4. Link to the new type webskin by either adding it somewhere in the tree
using a dmInclude, or generate the URL using skin:buildLink or
application.fapi.getLink() by passing in the typename and the body view
webskin name (dmProfile and displayTypeUserProfile).

cheers,
Justin


On Sun, Oct 14, 2012 at 7:23 PM, kayde <[email protected]> wrote:

> Hi there,
>
> I have extended the dmProfile.cfc with
> <cfproperty name="aCompany" type="array" default="" required="no"
> hint="Company" ftSeq="60" ftFieldset="Hotelaccess" ftLabel="Company"
> ftJoin="company" />
> and in the WebTop I can add Companies (new Type) to the users. This works
> perfectly.
>
> Now, for a LoggedIn User, I want to show him a DropDpwn Box with the
> Companies he has access to.
>
> From the Session I can read out which Companies he has access to:
> <cfset stlocal.companies = #session.dmProfile.aCompany# />
>
> With a loop I can also show them as Teasers:
> <cfloop from="1" to="#ArrayLen(stlocal.companies)#" index="i">
>             <skin:view typename="company"
> objectid="#stlocal.companies[i]#" webskin="displayTeaserStandard" />
>             <cfset stlocal.company =
> application.fapi.getContentObject(objectid="#stlocal.companies[i]#",
> typename="company") />
>
> But how can I bring this data to a form with a DropDown Box to select the
> Company the User will now "work" for?
> I am banging my head against the wall, as I really have no idea.
>
> Thanks for your help,
> Kay
>
> --
> You received this message cos you are subscribed to "farcry-dev" Google
> group.
> To post, email: [email protected]
> To unsubscribe, email: [email protected]
> For more options: http://groups.google.com/group/farcry-dev
> --------------------------------
> Follow us on Twitter: http://twitter.com/farcry
>
>
>

-- 
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry


Reply via email to