Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5988207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:55:35+00:00 2026-05-22T22:55:35+00:00

I am wanting to create a page that can load a property file into

  • 0

I am wanting to create a page that can load a property file into a text box, edit the properties, and then save the new properties to the file.

Would this be possible by simply using HTML markup? How do I get the push buttons to correlate with my Grails application?

The HTML seems simple enough:

<p>
Select property file:
<input type="file" name"propertyList" size="50"/>
</p>

<p>
<input type="submit" value="Open File"/>
<input type="submit" value="Save File"/>
</p>

<p>
<input type="text" name="properties" size="300"/>
</p>

I’m not quite sure about the submit button as I don’t know a whole lot of HTML.

My goal is to simply locate the property file, use groovy to open it and read it line by line and display it in the text box, then be able to edit the properties and save it.

My biggest question deals with the buttons. How do I have the Open File use the button event (onclick) to activate a function I have written in groovy? Or instead of a submit button, what type of input should I use?

Any information leading me in the right direction would be appreciated

EDIT

Is it correct to do something like the following:

<input type="button" onclick="<g:link action="readFile" controller="propertyRead">Open File</g:link>"/>

If not, what would be the proper way to go about it?

EDIT 2

I looked into actionSubmit and also looked a bit more into g:link and was wondering which way (if either) is the better way to go:

actionSubmit (unsure if it allows one to specify the controller as it wasn’t stated in the attributes):

<g:actionSubmit value="Open File" action="readFile" controller="propertyRead"</g:actionSubmit>

Or using a menuButton and g:link

g:link:

<span class="menuButton"><g:link action="readFile" controller="propertyRead">Open File</g:link>

Also forgot to ask, is there a way to get the file path from the input type="file" ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:55:36+00:00Added an answer on May 22, 2026 at 10:55 pm

    In order to make full use of Grails functionality, you’ll probably want to use the associated HTML tags – form (or uploadForm for a form that’s uploading the file) and actionSubmit. Grails doesn’t offer a custom file input for reasons which I don’t remember, so you’ll need to use the <input type="file" ...> as shown in your example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to the .Net world, and was wanting to create a class
In the book The Art of Unit Testing it talks about wanting to create
I was wanting to create a personal note database, to store notes in HTML
This is a noob question, but I will ask it anyway... I'm wanting to
We have the following table: CREATE TABLE [dbo].[CampaignCustomer]( [ID] [int] IDENTITY(1,1) NOT NULL, [CampaignID]
We have the following table: CREATE TABLE [dbo].[CampaignCustomer]( [ID] [int] IDENTITY(1,1) NOT NULL, [CampaignID]
I'm building a poll widget using ASP.NET controls and Linq-to-Sql for a high traffic
Backstory: In the past users have complained about how long it takes to generate
I just started using datatables (java script) for tabular data, due to js I
I am not understanding how to use the tentacle part of the anemone. If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.