Hi Tim,

thanks for your respond. I updated  "eperson-types,xml" and  
"http://dspace.org/eperson"; schema via dspace browser interface. 

I tried edit a profile-form.jsp and i added similarly:

<%
    Locale[] supportedLocales = I18nUtil.getSupportedLocales();
    EPerson epersonForm = (EPerson) request.getAttribute("eperson");

    String lastName = "";
    String firstName = "";
    *String faculty = "";*
    String phone = "";
    String language = "";


 // Get non-null values
        lastName = epersonForm.getLastName();
        if (lastName == null) lastName = "";

        firstName = epersonForm.getFirstName();
        if (firstName == null) firstName = "";

   *     faculty = epersonForm.getMetadata("faculty");*
*        if (faculty == null) faculty = "";*

        phone = epersonForm.getMetadata("phone");
        if (phone == null) phone = "";

        language = epersonForm.getMetadata("language");
        if (language == null) language = "";

and

    <div class="form-group">
                <label class="col-md-offset-3 col-md-2 control-label" 
for="faculty"><fmt:message 
key="jsp.register.profile-form.fname.faculty"/></label>
        <div class="col-md-3"><input class="form-control" type="text" 
name="faculty" id="tfaculty" size="40" value="<%= 
Utils.addEntities(faculty) %>"/></div>
        </div>

*and when i trying "edit profile" my administrator account in web 
interface  i see internal system error, in logs i see:*

Caused by: org.apache.jasper.JasperException: An exception occurred 
processing JSP page /register/profile-form.jsp at line 53

50:         firstName = epersonForm.getFirstName();
51:         if (firstName == null) firstName = "";
52:         
53:         faculty = epersonForm.getMetadata("faculty");
54:         if (faculty == null) faculty = "";
55: 
56:         phone = epersonForm.getMetadata("phone");



When i commented out 53.54 line i see new field, but when i tried add 
something, there nothing happend, the field was empty. 

What file i have to change? I have to create new field in database? Maybe i 
did it something wrong in profile-form.jsp ?

Best wishes,

Karol





W dniu środa, 22 listopada 2017 17:24:33 UTC+1 użytkownik Tim Donohue 
napisał:
>
> Hi Karol,
>
> You will need to modify the code behind the Eperson registration form in 
> order to enable this new field in the User Interface.  At this time, this 
> registration form is hardcoded within DSpace, so simply updating the 
> eperson-types.xml will not automatically update the registration form.
>
> - Tim
>
> On Thu, Nov 2, 2017 at 1:34 PM Karol S <karols...@gmail.com <javascript:>> 
> wrote:
>
>> up
>>
>>
>> W dniu wtorek, 24 października 2017 16:27:25 UTC+2 użytkownik Karol S 
>> napisał:
>>>
>>> Hi,
>>>
>>> I need add a new field metadata to "register form" and eperson profile.
>>> At the moment is:
>>>
>>> First name *
>>> Last name *
>>> Contact telephone
>>> language
>>>
>>> I need additional field like a "faculty". In the internet i found 
>>> something like this:
>>> "You have to add this field to eperson-types.xml and add this field to 
>>> eperson schema via web interface"
>>> I do this but still does not see any additional fields. What i doing 
>>> wrong? Cheers,
>>>
>>> Karol
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "DSpace Technical Support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to dspace-tech...@googlegroups.com <javascript:>.
>> To post to this group, send email to dspac...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/dspace-tech.
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
>
> Tim Donohue
> Technical Lead for DSpace & DSpaceDirect
> DuraSpace.org | DSpace.org | DSpaceDirect.org
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to