Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have never tried what you are doing, so I am not sure the best way to accomplish it. The way you are using the Loc Param, you are extracting a variable from a URL pattern. In your case, <code>http://server/item/ITEMID</code> where <code>ITEMID</code> is the string representation of an Item, and which is the value that gets passed to the <code>fetchItem</code> function. The function call will not have a value if you just arbitrarily call it, and from what I can see you are requesting a value that is not initialized. </p> <p>I would think there are two possible solutions. The first would be to use <a href="http://scala-tools.org/mvnsites/liftweb-2.4/#net.liftweb.http.S" rel="nofollow"><code>S.location</code></a> instead of <code>AnItemPage.menu.currentValue</code>. It will return a <code>Box[Loc[Any]]</code> representing the <code>Loc</code> that is currently being accessed (with the parameters set). You can use that <code>Loc</code> to retrive <code>currentValue</code> and set your parameter. </p> <p>The other option would be to instantiate the actor in your snippet. Something like this: </p> <p><strong>item.html</strong></p> <pre><code> &lt;div data-lift="AnItemPage"&gt; &lt;div id="mycomet"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>And then in your AnItemPage snippet, something like this:</p> <pre><code>class AnItemPage(item: Item) { def render = "#mycomet" #&gt; new AddCometItemPage(item).render } </code></pre> <p>I haven't tested either of those, so they'll probably need some tweaking. Hopefully it will give you a general idea. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload