Search Results

Search found 33 results on 2 pages for 'bsreekanth'.

Page 2/2 | < Previous Page | 1 2 

  • Grails pattern to reuse template on error

    - by bsreekanth
    Hello, I have a gsp template, where the data for create view is passed through the controller. def create = { def bookInstance = new Book() bookInstance .properties = params def map = getDefaultValues() render(template: "create", model: [bookInstance : bookInstance , title: map.title, somelist: somelist ....]) the gsp template <g:select optionKey="id" from="${somelist}" name="somelist.id" value="${bookInstance ?.somelist?.id}" noSelection="['null': '']"></g:select> now, in the save method, if there is an error, it returns currently populated and validated instance (default scaffold implementation) render(template: "create", model: [bookInstance : bookInstance ]) But the fields in the gsp (error page rendered from save action) is empty. I could see the reason as it looks the value in "${somelist}" , but it is not used in save method. Do i just need to check for null in the gsp and use whichever map is available, or any better method (passing all the map in the save method is not an option) .. thanks in advance..

    Read the article

  • JQgrid - escape ':' in searchoptions (value part)

    - by bsreekanth
    Hello, How to set the values for filter is explained here link text. I have two requirements. 1. the default value needs to be empty. I expect, if defaultValue is not set, the filter is empty, but that is not happening in my case. The first value is 2. How to escape ':' in my value. The character ':' and ';' are used to seperate the index and values. But, in my value string it contains a ':' (eg: searchoptions:{value:"1:'Level: 1'"} , where Level: 1 is my first value). How to escape : in the value part. I tried \ , / etc. thanks.

    Read the article

  • Grails/Hibernate max for string type

    - by bsreekanth
    Hello, In my table I have a serial number field, which is represneted by string.. It has a prefix and some numbers follow. Eg: ABC1234, ABC2345 etc. How to retrieve the largest value (max equivalent of int type) from this column. In my case it would be ABC2345. I probably could retrieve all the data,, sort it and get the same, but that would be slow. thanks in advance..

    Read the article

  • Android - Basic CRUD (REST/RPC client) to remote server

    - by bsreekanth
    There are lot of discussion about REST client implementation in android, based on the talk at GoogleIO 2010, by Virgil Dobjanschi. My requirement may not necessarily involved, as I have some freedom to choose the configuration. I only target tablets configuration changes can be prevented if no other easy way (fix at Landscape mode etc) I am trying to achieve. Basic CRUD operation to my server (JSON RPC/ REST). Basically mimic an ajax request from android app (no webview, need native app) Based on the above mentioned talk, and some reading I see these options. Implement any of the 3 mentioned in the Google IO talk Especially, the last pattern may be more suitable as I don't care much of caching. But not sure how "real time" is sync implementation. Use HTTP request in AsyncTask. Simplest, but need to avoid re-sending request during change in device configuration (orientation change etc). Even if I fix at one orientation, recreation of activity still happens. So need to handle it elegantly. Use service to handle http request. So far, it say use service for long ruiing request. Not sure whether it is a good approach for simple GET/POST/PUt requests. Please share your experience on what could be the best way.

    Read the article

  • Java : Inner class of an interface (from google guice)

    - by bsreekanth
    Hello, I was going through the source of google guice, and found an unfamiliar piece of code. It would be great learning if someone can clarify it. I have very basic understanding of inner classes, as they keep the implementation details close to the public interface. Otherwise the inner class may pollute the namespace. Now, I see the below lines at public static final Scope SINGLETON = new Scope() { public <T> Provider<T> scope(final Key<T> key, final Provider<T> creator) { return new Provider<T>() { ......... } It assign an inner class instance to the static variable, but Scope is an interface defined as (at) public interface Scope Is it possible to instantiate the interface?? or is it a succinct syntax for an anonymous implementation of an interface?? If anyone can explain what the author is intended by multiple nested classes above (Scope and Provider), and why it make sense to implement this way, it would help me to understand. thanks.

    Read the article

  • CSS Print Style Sheets - Examples

    - by bsreekanth
    Trying to learn about how to effectively use print.css, so that graphical and navigational elements are not shown in print preview/print. Read some articles, and part of print css of html5 boilerplate. Two sites, which was quite impressive the way they change the look during print are http://css-tricks.com/ http://bottlerocketcreative.com/ But I cannot see the css related to print. Can you please point to the css they use to learn how to do similar transformation. thanks.

    Read the article

  • AngularJS - Processing $http response in service

    - by bsreekanth
    I recently posted a detailed description of the issue I am facing here at SO. As I couldn't send an actual $http request, I used timeout to simulate asynchronous behavior. Data binding from my model to view is working correct, with the help of @Gloppy Now, when I use $http instead of $timeout (tested locally), I could see the asynchronous request was successful and data is filled with json response in my service. But, my view is not updating. updated Plunkr here

    Read the article

< Previous Page | 1 2