Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!

Bill Lee

Greenhorn
+ Follow
since Feb 02, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bill Lee

I am trying to create an application which adds, deletes, and updates a class with a oneToMany relationship.
Grails has the
1)addTo*
2)removeFrom*

Unfortunately, I have been stuck trying to get the update aspect to work and injecting properties on to the page. Has anyone encountered a scenario similar to this? Thanks.

10 years ago
Gregg,

Thank you very much. It was the production settings in DataSources.groovy. Have a nice day.
10 years ago
I am new to Grails and have been working on an application with Oracle as back-end. Currently I have it deployed to the Jetty server, but I need to deploy it to tomcat or websphere. I am not sure if I have to change a setting in the Config.groovy file or if there is something, but any help would be appreciated. Thanks.
10 years ago
I am working on a script of reading the contents of a file directly into a map. I have no issues reading into list. But basically have a file that has 2 fields separated by a comma (i.e.

Chicago, IL
Sacramento, CA

Is this something that anyone has had experience with? Thanks.
10 years ago
I don't control the back end.
10 years ago
I agree that this shouldn't be an issue, but the way data rules on the other side are causing the error.

<Transacation/>
<Transaction>
<element1></element1>
<element2></element2>
<element3></element3>
</Transaction>

This is interpreted as 1 transaction even if they are two. APPARENTLY, this is how it should like to reflect as 2 transactions. I agree with you in that it shouldn't make a difference.

We need to change it to:
<Transacation>
</Transaction>
<Transaction>
<element1></element1>
<element2></element2>
<element3></element3>
</Transaction>
10 years ago
I am trying to write a parser that essentially will turn the following.

<Transaction Number="1' Date="102308"/>
and turn it into the following

<Transaction Number="1' Date="102308"></Transaction>

I am assuming I would need to use a NodeBuilder to build the XML again, but am unclear if it would build it in the desired manner.

Does anyone know how to do this? Thanks.
10 years ago
I have created some XML via Groovy and am trying to figure out how to validate Groovy against an existing schema? Is there a way to do this? Thanks.
10 years ago
I am attempting to modify an attribute based on a criteria. When I attempt the following, I get

Exception in thread "main" groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: value for class: java.lang.String

allRecords.findAll{
it.'@ZipCode'.equals('60245')
}each{
it.'@State'.value = 'IL'
}

Does anyone know how to surpass this exception? Thank.s
10 years ago
I have a list of records. I am trying to attempt to write to write a sort of the children.NodeBuilder to fill it with one top level element and then have my nodes serve as reacords. In other words, my list what is below. It seems in the closure it only compares the 1st 2 kids in Qualification and Offer List and doesn't incorporate Identity List into the equation


<Transaction>
<Qualification>
<OfferList/>
<IdentityList/>
</Transaction>

I am trying to get the sort to look like.


<Transaction>
<IdentityList/>
<Qualification>
<OfferList/>

</Transaction>


When I run the following.

allRecords.each{
it.children().sort{it}

}

I am getting a totally different layout that apears like this.

<Transaction>
<OfferList/>
<Qualification>
<IdentityList/>

</Transaction>
10 years ago
Grails is very straightforward in creating NEW tables, but I am having trouble mapping to an EXISTING table. One of the problems being that it appends id and version to each table. Maybe I need to add some entries for static mapping??? Thanks.
10 years ago
Thank you so much! That worked.
10 years ago
Basically, I am attempting to iterate through a Map and change only it's values to all Caps. Does anyone know how to deal with this? Thanks.

My function changes BOTH keys and values to UpperCase and I only want the values to change.


10 years ago
I am attempting to write a parser which would replace the <Line2 FirstName="Bill" MiddleName="" LastName="Thatcher"/> to
<AddressLine2 Title="Mr" FirstName="Bill" MiddleName="" LastName="Thatcher"/> . In other words, it would replace Line2 with AddressLine2 and add the attribute Title to it. The furthest I have gotten so far is removing Line2. Does anyone have any suggestions? Thanks.


<StreetAddress>
<Address>
<AddressLine1 />
<Line2 FirstName="Bill" MiddleName="" LastName="Thatcher"/>
</Address>
</StreetAddress>
10 years ago
Hi, I have just started using Grails and I am trying to connect to an existing Oracle database. I modified the ApplicationDataSource.groovy file and added the oracle.jar to the appropriate location. Is there anything else that I need to do? Also, as for the domain classes, how would I map to the specific table? Thanks.
10 years ago