Page management

Discuss anything that's related to the Raxan framework

Page management

Postby fc_enriqueism » Thu Sep 29, 2011 8:03 pm

Hi! Maybe it's sounds trivial, but I can't figure how to resolve it.
I have a page with a table, based on the "Employee Directory" example, when click on a row activates the rowClick event and passes to It the Id. Here everything is OK, then I need to pass this Id as a parameter to an other page in order to edit some info related to the row selected.
I tried with:
redirectTo('edit.php') but this method doesnt support parameters
appendView('edit.php',null,$id) appends the page at the end of my current page, so I need to be complete replaced

Thanks for the help.
fc_enriqueism
 
Posts: 10
Joined: Wed Sep 28, 2011 12:25 am

Re: Page management

Postby raymond » Sun Oct 02, 2011 1:15 am

redirectTo('edit.php') but this method doesnt support parameters


You can pass the parameter as part of the url:


Code: Select all
$id = $e->intVal();
redirectTo('edit.php?id='.$id)


appendView('edit.php',null,$id) appends the page at the end of my current page, so I need to be complete replaced


There are a two ways you can get this to work:

1. Clear the content of the page use $this->content('');
2. Use the data-event-view="edit" attribute to change the view when the row is clicked. See "Additional data attributes" at http://raxanpdi.com/sdk/docs/server-side-events.html
Code: Select all
        protected function _editView() {
            $this->appendView('edit.php', null, $id);
        }


__
Raymond
raymond
Site Admin
 
Posts: 215
Joined: Tue Mar 17, 2009 5:04 am


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron