Thanks, David. Unfortunately I'm having a hard time figuring out how
to get the foundParam.
Using your code, I have:
val loc = for {req - S.request; loc - req.location} yield loc
val l = loc openOr Couldn't open
println(loc)
println(l)
The first println give me:
Full(Loc(View List(nodes),
Well if the box is empty l will be a String so of course you can't access
foundParam.
-
Peter Robinettpe...@bubblefoundry.com wrote:
Thanks, David. Unfortunately I'm having a hard time figuring out how
to get the foundParam.
Using your code, I have:
val
Instead of yielding loc which is taking it out of the box and putting it back
in, access foundParam inside the for loop.
-
Peter Robinettpe...@bubblefoundry.com wrote:
Thanks, David. Unfortunately I'm having a hard time figuring out how
to get the
On Wed, Jul 1, 2009 at 2:02 PM, Peter Robinett pe...@bubblefoundry.comwrote:
Thanks, David. Unfortunately I'm having a hard time figuring out how
to get the foundParam.
Using your code, I have:
val loc = for {req - S.request; loc - req.location} yield loc
val l = loc openOr Couldn't open
Thanks Naftoli and David, I'm starting to understand what I need to
do. However, the solution has revealed a gap in my beginner's
knowledge of Scala: why was my code printing out the Loc instead of
Couldn't open?
Second, even with foundParam.is within the for comprehension, I still
need to get
On Wed, Jul 1, 2009 at 3:34 PM, Peter Robinett pe...@bubblefoundry.comwrote:
Thanks Naftoli and David, I'm starting to understand what I need to
do. However, the solution has revealed a gap in my beginner's
knowledge of Scala: why was my code printing out the Loc instead of
Couldn't open?
A Box is a container that holds 0 or 1 elements(s). openOr means if the Box is
Full return the element; otherwise return the parameter--my default value.
One alternative approach would be to specify a default Loc.
-
Peter Robinettpe...@bubblefoundry.com
On Jul 1, 3:38 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
Are you coming from Java/C# or Ruby/Python?
PHP, Python and Javascript
I don't think you have to pull the value out of the for comprehension... do
all the work inside the for comprehension.
When you're doing your design,
On Wed, Jul 1, 2009 at 4:00 PM, Peter Robinett pe...@bubblefoundry.comwrote:
On Jul 1, 3:38 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
Are you coming from Java/C# or Ruby/Python?
PHP, Python and Javascript
Okay... makes sense.
Yes, the reference contained a Loc, but the
Everyone, I apologize for monopolizing the list but this has been very
helpful for me. I've learned a bunch from similar, old entries in the
list and hope this thread will help future Lift beginners.
On to my reply to David:
On Jul 1, 4:19 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
If you know the Box is full you can write open_! (you'll get a runtime error if
it wasn't). Otherwise openOr a default, e.g., an invalid id.
You have first answer the question, what _should_ happen if it's Empty after
all? :)
-
Peter
Thanks, Naftoli. For now open_! does the trick for me.
Peter
On Jul 1, 5:55 pm, Naftoli Gugenhem naftoli...@gmail.com wrote:
If you know the Box is full you can write open_! (you'll get a runtime error
if it wasn't). Otherwise openOr a default, e.g., an invalid id.
You have first answer the
On Wed, Jul 1, 2009 at 7:39 PM, Peter Robinett pe...@bubblefoundry.comwrote:
Thanks, Naftoli. For now open_! does the trick for me.
Please do not use open_! The ! is there for a reason... it means use this
at your peril.
Either use openOr and have the expression on the right side of the
If you look at the default _viewTemplate:
1.def _viewTemplate =
2.lift:crud.view
3. table id={viewId} class={viewClass}
4. crud:row
5. tr
6. tdcrud:name//td
7. tdcrud:value//td
8. /tr
9.
On Fri, Jun 26, 2009 at 6:39 PM, Peter Robinett pe...@bubblefoundry.comwrote:
Thanks, Derek and Jeppe, your responses were very helpful. I
implemented Jeppe's solution and added my own snippet tag within
_viewTemplate. Unfortunately, I spent the whole day trying to figure
out how pass the
Thanks, Derek and Jeppe, your responses were very helpful. I
implemented Jeppe's solution and added my own snippet tag within
_viewTemplate. Unfortunately, I spent the whole day trying to figure
out how pass the current CRUDified object to my snippet. Do I retrieve
it in _viewTemplate from
Naftoli, you would overload the _editTemplate field or the
editTemplate method, I imagine.
Peter
On Jun 24, 11:49 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
How would you customize the edit view, say to allow editing all child
entities on the same screen?
On Wed, Jun 24, 2009 at 2:01
Well, it's the viewTemplate method, but it's supposed to return a NodeSeq,
so if you're pulling from a file you'll need to do the file load yourself.
You can do that with LiftRules.loadResourceAsXml:
...
override def viewTemplate = LiftRules.loadResourceAsXml(foo) openOr
pError loading template/p
On 24 Jun 2009, Peter Robinett wrote:
Hi all,
I'm using CRUDify on one of my models and I'd like to display some
additional data on the view template. I believe that I need to
override one of the model definitions with some sort of reference to
my own XHTML file. Which one?
How would you customize the edit view, say to allow editing all child
entities on the same screen?
On Wed, Jun 24, 2009 at 2:01 PM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:
On 24 Jun 2009, Peter Robinett wrote:
Hi all,
I'm using CRUDify on one of my models and I'd like to display
20 matches
Mail list logo