मेरे पास एक Grails 2.4.4 ऐप है और मैं एक जीएसपी लागू करने की कोशिश कर रहा हूं जो jQuery DataTable का लाभ उठाता है। मुझे लगता है कि पुरानाDataTable plugin है लेकिन यह अनियमित और Grails 2.x के साथ असंगत दिखता है। उल्लेख नहीं है, किसी भी ग्रेल्स में जेएस लिब को स्पष्ट रूप से इसके लिए प्लगइन की आवश्यकता के बिना शामिल करने का तरीका बनना चाहिए।Grails में jQuery डेटाटेबल आयात करने के लिए 2.4.4
यहाँ मेरी BuildConfig
की plugins
अनुभाग है:
plugins {
build ":release:3.0.1"
build ":tomcat:7.0.52.1"
compile "org.grails.plugins:gson:1.1.4"
compile ":rest-client-builder:1.0.3"
compile ":yammer-metrics:3.0.1-2"
runtime ":jquery:1.11.1"
runtime ":cached-resources:1.0"
runtime ":resources:1.2.14"
compile ":cache-headers:1.1.7"
compile ":rest-client-builder:1.0.3"
compile ":export:1.6"
compile ":standalone:1.2.3"
compile ":cache-headers:1.1.7"
compile ":scaffolding:2.1.2"
compile ':cache:1.1.3'
runtime ":resources:1.2.14"
runtime ":hibernate:3.6.10.15"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"
}
इस quesiton के दायरे से बाहर कारणों के लिए, मैं नहीं निकाल सकते या plugins
अनुभाग में किसी भी मौजूदा घोषणाओं बदलने के लिए, लेकिन मैं करने के लिए जोड़ सकते हैं उन्हें। मैंने सुना है कि "संपत्ति पाइपलाइन" नामक कुछ चीज जेल्स लिब को एक ग्रेल्स ऐप में जोड़ने का नया शानदार तरीका है, लेकिन इस पाइपलाइन पर जो भी साहित्य मैं पा सकता हूं वह अस्पष्ट और उच्च स्तरीय है। और मुझे Grails ऐप में डेटाटेबल्स को शामिल करने के लिए इस पाइपलाइन का उपयोग करने के किसी वास्तविक दुनिया ठोस उदाहरण नहीं मिल रहे हैं।
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
</tr>
...lots of more rows
</tbody>
</table>
$(document).ready(function() {
$('#example').DataTable();
});
तो मैं पूछता हूँ: मैं कैसे (ऊपर) "नमस्ते दुनिया" एक जीएसपी के अंदर DataTable का प्रदर्शन शुरू करने जाना
"! नमस्ते विश्व" एक DataTable के संस्करण इस प्रतीत हो रहा है ?विशिष्ट कॉन्फ़िगरेशन, प्लगइन्स, आदि क्या मुझे यह काम करने के लिए तार करने की आवश्यकता है?