Customization problem - Bundle.properties & dataverse_header.xhtml

50 views
Skip to first unread message

Yan Na Cheng

unread,
Jul 18, 2025, 3:26:29 AMJul 18
to Dataverse Users Community
Greetings!  Here are 2 questions about dataverse customization. Hope experts can help me! We are using version 6.0

1. Update the content in Bundle.properties

We directly edited Bundle.properties file in /home/XXXXX/dataverse/src/main/java/propertyFiles
Then I tried to stop and restart paraya
However, the update cannot be shown on user interface. We still in development stage
may I know any step is missing?

 Examples of changes (change the wording dataverses to folders)
header.search.title=Search all folders and datasets...
notification.generic.objectDeleted=The folder, dataset, or file for this notification has been deleted.
 
2. Update in dataverse_header.xhtml

As similar, we directly edited dataverse_header.xhtml in /home/XXXX/dataverse/src/main/webapp . I want to add customized session in nvg bar
Then, i also tried to stop and restart paraya. Nothing is changed
may I know any step is missing?

Current:
 <li>
                            <h:outputLink value="#{settingsWrapper.get(':NavbarGuidesUrl', settingsWrapper.guidesBaseUrl.concat('/').concat(settingsWrapper.guidesVersion).concat('/user'))}" target="_blank" rel="noopener">
                                <h:outputText value="#{bundle['header.guides.user']}"/>
                            </h:outputLink>
                        </li>
 
To make User guide as dropdown , containing two user guides:

 <li>
                                    <h:outputLink value="#{settingsWrapper.get(':NavbarGuidesUrl', settingsWrapper.guidesBaseUrl.concat('/').concat(settingsWrapper.guidesVersion).concat('/user'))}" target="_blank" rel="noopener">
                                        <h:outputText value="#{bundle['header.guides.user']}"/>
                                    </h:outputLink>
                                </li>
                                <li>
                                    <h:outputLink value="#{settingsWrapper.get(':NavbarGuidesUrl', settingsWrapper.guidesBaseUrl.concat('/').concat(settingsWrapper.guidesVersion).concat('/api'))}" target="_blank" rel="noopener">
                                        <h:outputText value="#{bundle['header.guides.api']}"/>
                                    </h:outputLink>
                                </li>


James Myers

unread,
Jul 21, 2025, 12:45:39 PMJul 21
to dataverse...@googlegroups.com

I’m not sure where the trouble is. If you are editing the files in the source tree, you’ll need to build the war file and redeploy it.

 

Dataverse picks up the properties from the file usually in /usr/local/payara6/glassfish/domains/domain1/applications/dataverse-6.0/WEB-INF/classes/propertyFiles/Bundle.properties (If you edit in the /src tree and rebuild and re-deploy the war file, this is the file that is ultimately updated.)

 

I think if you edit that file and restart payara, you’ll see the new text. You might also consider using the Internationalization functionality in Dataverse – configuring a lang directory and just editing in the Bundle_en.properties there (and/or files for other languages)  these files override what is in Bundle.properties and wouldn’t be overwritten when you deploy a new war file/version of Dataverse.

 

Similarly, the files to edit to make UI changes would usually be in /usr/local/payara6/glassfish/domains/domain1/applications/dataverse-6.0, so you’ll need to edit the copy there or build/deploy the war with your changes from the /src tree.

 

The one additional issue with editing .xhtml files directly in /usr/local/payara6/glassfish/domains/domain1/applications/dataverse-6.0 is that Payara, by default, caches the compiled forms of them, so simple restarting payara will not update what you see when running Dataverse. One way to address this is to change the javax.faces.FACELETS_REFRESH_ PERIOD. To do that you can edit the /usr/local/payara6/glassfish/domains/domain1/applications/dataverse-6.0/WEB-INF/web.xml file to change its value from -1 (cache forever) to 1 (cache for 1 second). If you do that and restart Payara, you should see changes you make to the .xhtml files immediately as you develop (you should change back to -1 for production). As noted in https://guides.dataverse.org/en/latest/developers/debugging.html#java-server-faces-jsf-configuration-options, you can also change this value in other ways using microprofile config.

 

An alternative to editing the .xhtml files might be to use a custom header or footer – i.e. adding a small JavaScript that adds the additional menu entry you want. The advantage is that you can maintain your changes without having to build a custom dataverse war file whenever you upgrade to a new version (or having to reapply your changes in the /usr/local/payara6/glassfish/domains/domain1/applications/dataverse-6.1 dir, etc.).

 

I hope that helps, if I’m misunderstanding what you are trying to do, we may be able to help if you provide more details of your overall process.

 

-- Jim

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dataverse-community/559dba95-d654-4f5c-bc7b-ca8f005247e2n%40googlegroups.com.

Yan Na Cheng

unread,
Jul 24, 2025, 3:08:36 AMJul 24
to Dataverse Users Community
HI Jim,

Thank you for your instruction. I tried to edit properties from the file in /usr/local/payara6/glassfish/domains/domain1/applications/dataverse-6.0/WEB-INF/classes/propertyFiles/Bundle.properties
It works now, Thank you. I will consider to use Internationalization functionality

And I also tried the alternative to create custom header by adding a small JavaScript. It also works now. Thank you so much!!
Reply all
Reply to author
Forward
0 new messages