Navigation

    GitHub中文社区
    • GitHub排行榜

    论坛

    • Login
    • Categories
    • Recent
    • Tags
    • Popular

    关于model.Attribute()方法有些疑问

    技术交流
    1
    1
    63
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LLALLdhhdnd
      LLALLdhhdnd last edited by

      我在使用model.Attribute()时,用toString方法得到的string作为其name属性值时,在前端无法获取到对象,而用“”定义一个字符串就可以,这是什么原因?
      代码段:
      for(Type type : types)
      {
      model.addAttribute(type.toString().toLowerCase(),filterByType(ingredients,type));
      }

      1 Reply Last reply Reply Quote 0
      • First post
        Last post