如何调整g的宽度长度:grails中的字段类型=“数字”

时间:2016-03-21 03:21:01

标签: grails gsp

我尝试了ff:

 <g:field type="number" name="refNumber" width="100 px"/>

 <g:field type="number" name="refNumber" size="100"/>

但没有运气。

2 个答案:

答案 0 :(得分:0)

没有什么与grails,但只是简单的HTML。 “100 px”不应该有空格。它应该是,

void RequestVolley() {

    // Instantiate the RequestQuee
    RequestQueue queue = Volley.newRequestQueue(getApplication());

    //create new volley request
    JsonObjectRequest requestNew = new JsonObjectRequest(Request.Method.GET, Url, null, createMyReqSuccessListener(), createMyReqErrorListener());

    //Response.Listener and Error.Listener defined afterwards


    //first param is TIMEOUT ...integer
    //second param is number of retries ...integer
    //third is backoff multiplier ...integer

    requestNew.setRetryPolicy(new DefaultRetryPolicy(6000, 1, 1));

    queue.add(requestNew);
}

private Response.Listener < JSONObject > createMyReqSuccessListener() {
    return new Response.Listener < JSONObject > () {
        @Override
        public void onResponse(JSONObject response) {

            //do something
        }
    };
}

private Response.ErrorListener createMyReqErrorListener() {
    return new Response.ErrorListener() {
        @Override
        public void onErrorResponse(VolleyError error) {

            //do something
        }
    };
}

答案 1 :(得分:0)

只需添加一种风格:

<g:field type="number" name="refNumber" style="width: 100px"/>

甚至更好的课程:

<g:field type="number" name="refNumber" class="yourClass"/>