need help for code understanding

42 views
Skip to first unread message

Ravi

unread,
Jun 11, 2014, 2:25:45 AM6/11/14
to open...@googlegroups.com
hi Team,

scenario :

after user logined to the application,there is an tab called user management,in that click on create user link.it will display  New Create User Form with all the fields(username,firstname,lastname,email,etc..).i have added two new fields in this form
(one text field and one checkbox) .see the code below

userPropertiesContext.xml

  <entry key="org.olat.admin.user.NewUserForm">
                    <bean class="org.olat.user.propertyhandlers.UserPropertyUsageContext">
                        <property name="propertyHandlers">
                            <list>
                                <ref bean="userPropertyFirstName" />
                                <ref bean="userPropertyLastName" />
                                <ref bean="userPropertyEmail" />
                                .
                                .
                                <ref bean="userPropertyOrgName" />
                                <ref bean="userPropertyUserType" />

                            </list>
                        </property>
                    </bean>

userPropertiesHandlerContext.xml

<bean id="userPropertyOrgName" class="org.olat.user.propertyhandlers.Generic127CharTextPropertyHandler">
        <property name="name" value="orgName" />
        <property name="deletable" value="false" />
</bean>
   
<bean id="userPropertyUserType" class="de.bps.olat.user.propertyhandlers.GenericCheckboxPropertyHandler">
        <property name="name" value="userType" />
        <property name="deletable" value="true" />
</bean>

this is working fine.values are saved in table (o_userproperty)in the form of key-value pairs.

need help on the below

1) how to make UserType check box bydeafult checked.(i mean which property i have to supply.. ).and also instead of true/false i want to save External/internal in Database.where i have to write logic for this 
2) i want to save all these values in record format(single row)either in same table or new table.

Thanks in Advacne....



Florian Gnägi

unread,
Jun 16, 2014, 7:26:22 AM6/16/14
to open...@googlegroups.com
Hi Ravi

You need to write your own custom user property handler to preset the data and save them to your needs. Have a look at the implementation and use the debugger to better understand how the code works. 

Cheers
Florian

--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOLAT".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOLAT - infinite learning - http://www.openolat.org

---
You received this message because you are subscribed to the Google Groups "OpenOLAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--------------------------------------------------------------------
professional services for the e-learning system OpenOLAT and OLATpro
 hosting - operating - support - development - mobile - consulting
--------------------------------------------------------------------

frentix  GmbH
Florian Gnägi, Geschäftsführer
Hardturmstrasse 76
CH-8005 Zürich, Switzerland

skype:gnaegi  twitter:gnaegi  xing:Florian_Gnaegi 
--------------------------------------------------------------------















Reply all
Reply to author
Forward
0 new messages