Quantcast

back to current page after clicking <g:link>

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

back to current page after clicking <g:link>

didinj
Hi all,

I'm creating a friend request method, how to redirect or back to current page after I click <g:link action="save" params="[fromUser:currentUser.id,toUser:result.id]">Add Friend</g:link>?

with this code :
def friendrequest = {
        def friendRequestInstance = new FriendRequest(params)
        if (!friendRequestInstance.save(flush: true)) {
            render(view: "create", model: [friendRequestInstance: friendRequestInstance])
            return
        }

        log.info 'broadcasting'
        broadcaster['/atmosphere/sample'].broadcast("$friendRequestInstance.name : $friendRequestInstance.id created")
        
        flash.message = message(code: 'default.created.message', args: [message(code: 'friendRequest.label', default: 'FriendRequest'), friendRequestInstance.id])
        redirect(action: "index", model:[friendRequestInstance:friendRequestInstance])
    }

it's returned error:
HTTP Status 404 - /lindv2/search/save

type Status report

message /lindv2/search/save

description The requested resource (/lindv2/search/save) is not available.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: back to current page after clicking <g:link>

Graeme Rocher-2
I can't see the code or the error, anybody else?

-- 
Graeme Rocher

On Monday, July 23, 2012 at 5:50 AM, didinj wrote:

Hi all,

I'm creating a friend request method, how to redirect or back to current
page after I click <g:link action="save"
params="[fromUser:currentUser.id,toUser:result.id]">Add Friend</g:link>?

with this code :


it's returned error:




--
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: back to current page after clicking <g:link>

rlovtangen
This happens to messages sent from the nabble interface. The code is visible at http://grails.1312388.n4.nabble.com/back-to-current-page-after-clicking-lt-g-link-gt-td4632026.html
Is it possible to configure nabble to include code samples when sending email to the user list?

Ronny

On Jul 23, 2012, at 10:20 AM, Graeme Rocher wrote:

I can't see the code or the error, anybody else?

-- 
Graeme Rocher

On Monday, July 23, 2012 at 5:50 AM, didinj wrote:

Hi all,

I'm creating a friend request method, how to redirect or back to current
page after I click <g:link action="save"
params="[fromUser:currentUser.id,toUser:result.id]">Add Friend</g:link>?

with this code :


it's returned error:




--
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: back to current page after clicking <g:link>

chichibek bros
Try this it work for me:

<g:link action=${actionName} params="[fromUser:currentUser.id,toUser:result.id]">Add Friend</g:link>

I hope it can help you

2012/7/23 Ronny Løvtangen <[hidden email]>
This happens to messages sent from the nabble interface. The code is visible at http://grails.1312388.n4.nabble.com/back-to-current-page-after-clicking-lt-g-link-gt-td4632026.html
Is it possible to configure nabble to include code samples when sending email to the user list?

Ronny

On Jul 23, 2012, at 10:20 AM, Graeme Rocher wrote:

I can't see the code or the error, anybody else?

-- 
Graeme Rocher

On Monday, July 23, 2012 at 5:50 AM, didinj wrote:

Hi all,

I'm creating a friend request method, how to redirect or back to current
page after I click <g:link action="save"
params="[fromUser:currentUser.id,toUser:result.id]">Add Friend</g:link>?

with this code :


it's returned error:




--
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:




Loading...