[FLOW3-general] need help with f:form.select

Wasko Jugovic mailtestler at web.de
Wed May 2 16:29:53 CEST 2012


Hi,

As FLOW3 newbie I fail at this exercise:
Index.html shows a form containing a drop-down list to select a book. That 
works for me.  After form submission List.html should show a book's details 
(author, year....)
What's the right syntax in "arguments" for passing the selected item's 
identifier from f:form:select  to the listAction?

My attempts end up with:
"The requested URL's length exceeds the capacity limit for this server" , 
when using {books: books}, because all identifiers and not only the selected 
one is passed ,
"Required argument 'book' is not set" by using  {books: books.idnr}

My indexAction

 public function indexAction() {
  $this->view->assign('books', $this->bookRepository->findAll());
....
------------------

My Index.html

<f:if condition="{books}">
    <f:form action="detail"  arguments="{????}" name="books">
       <label for="idnr">Book</label><br />
       <f:form.select property="idnr" options="{books}" 
optionLabelField="name" id="idnr" sortByOptionLabel="true" /><br />
       <f:form.submit value="Show" />
    </f:form>
</f:if>

--------------

My listAction

public function listAction(Book $book) {
      $this->view->assign('bookdetail', 
$this->bookRepository->findByIdentifyer($book));
 }

Thanks! 




More information about the FLOW3-general mailing list